/* =============================================
   榴动仓管理系统 - 主样式表
   主色：#E8720C / #F5A623  深棕描边
   ============================================= */

/* --- 全局变量 --- */
:root {
    --hali-primary:    #E8720C;
    --hali-primary-d:  #C45E00;
    --hali-primary-l:  #F5A623;
    --hali-accent:     #FFF3E0;
    --hali-brown:      #5D3A1A;
    --hali-brown-l:    #8B5E3C;
    --hali-bg:         #FFF8F0;
    --hali-card-bg:    #FFFFFF;
    --hali-border:     #E8C49A;
    --hali-text:       #2C1810;
    --hali-text-muted: #8B7355;
    --hali-success:    #4CAF50;
    --hali-danger:     #E53935;
    --hali-warning:    #FB8C00;
    --hali-radius:     10px;
    --hali-shadow:     0 2px 12px rgba(232,114,12,0.10);
    --hali-shadow-md:  0 4px 24px rgba(232,114,12,0.15);
}

/* --- 页面基础 --- */
.hali-page {
    background: var(--hali-bg);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--hali-text);
}

/* =============================================
   前端公共组件
   ============================================= */

/* 顶部导航 */
.hali-navbar {
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hali-navbar-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hali-navbar-logo img { height: 32px; border-radius: 6px; }
.hali-navbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.hali-navbar-user { opacity: 0.9; }
.hali-navbar-user-toggle {
    border-radius: 6px;
    padding: 3px 8px;
    transition: background 0.15s, opacity 0.15s;
    user-select: none;
}
.hali-navbar-user-toggle:hover {
    background: rgba(255,255,255,0.2);
    opacity: 1;
}
.hali-navbar-user-toggle.active {
    background: rgba(255,255,255,0.28);
    opacity: 1;
}
.hali-navbar-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.hali-navbar-logout:hover { background: rgba(255,255,255,0.35); }

/* 容器 */
.hali-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}
.hali-container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* 卡片 */
.hali-card {
    background: var(--hali-card-bg);
    border-radius: var(--hali-radius);
    border: 1px solid var(--hali-border);
    box-shadow: var(--hali-shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.hali-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--hali-brown);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--hali-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hali-card-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--hali-primary);
    border-radius: 2px;
}

/* 警告框 */
.hali-alert {
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.hali-alert-success { background: #E8F5E9; border-left: 4px solid var(--hali-success); color: #2E7D32; }
.hali-alert-error   { background: #FFEBEE; border-left: 4px solid var(--hali-danger);  color: #B71C1C; }
.hali-alert-info    { background: var(--hali-accent); border-left: 4px solid var(--hali-primary); color: var(--hali-brown); }

/* Toast 全局浮动提示 */
#hali-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    z-index: 99999;
    min-width: 200px;
    max-width: 88vw;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#hali-toast.hali-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
#hali-toast.hali-toast-success {
    background: #2E7D32;
    color: #fff;
}
#hali-toast.hali-toast-error {
    background: #C62828;
    color: #fff;
}
#hali-toast.hali-toast-info {
    background: var(--hali-primary);
    color: #fff;
}

/* =============================================
   表单组件
   ============================================= */
.hali-form-group {
    margin-bottom: 18px;
}

/* 销售订单表单分组布局 */
.hali-sale-form-wrap {
    padding: 0 16px;
}
.hali-sale-form-block {
    padding: 14px 0;
    border-bottom: 1px solid var(--hali-border);
}
.hali-sale-form-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--hali-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
/* 两列：姓名+手机 */
.hali-sale-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
/* 三列：数量+单位+单价 */
.hali-sale-row3 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: end;
}
.hali-sale-unit-sel {
    width: 68px;
    padding-left: 6px;
    padding-right: 4px;
}
@media (max-width: 480px) {
    .hali-sale-row2 { grid-template-columns: 1fr; }
    .hali-sale-row3 { grid-template-columns: 1fr auto; }
    .hali-sale-row3 > :last-child { grid-column: 1 / -1; }
}
.hali-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .hali-form-grid { grid-template-columns: 1fr; }
}
.hali-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hali-brown);
    margin-bottom: 6px;
}
.hali-required { color: var(--hali-danger); }
.hali-input,
.hali-select,
.hali-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--hali-text);
    background: #FAFAFA;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
/* iOS Safari / 微信浏览器 select 重置 */
.hali-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B7355' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    cursor: pointer;
}
.hali-input:focus,
.hali-select:focus,
.hali-textarea:focus {
    border-color: var(--hali-primary);
    box-shadow: 0 0 0 3px rgba(232,114,12,0.12);
    background: #fff;
}
.hali-textarea { resize: vertical; min-height: 80px; }
.hali-input::placeholder { color: #B0A090; }

/* =============================================
   按钮
   ============================================= */
.hali-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.hali-btn-primary {
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(232,114,12,0.3);
}
.hali-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(232,114,12,0.4); }
.hali-btn-primary:active { transform: translateY(0); }

.hali-btn-block { width: 100%; }
.hali-btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }

/* =============================================
   徽章 / 状态标签
   ============================================= */
.hali-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.hali-badge-pending  { background: #FFF3E0; color: #E65100; border: 1px solid #FFB74D; }
.hali-badge-ok       { background: #E8F5E9; color: #2E7D32; border: 1px solid #81C784; }
.hali-badge-disabled { background: #EEEEEE; color: #757575; border: 1px solid #BDBDBD; }
button.hali-order-status-badge { cursor: pointer; font-family: inherit; line-height: inherit; transition: opacity .15s; }
button.hali-order-status-badge:hover { opacity: .75; }
.hali-badge-expired  { background: #FCE4EC; color: #C62828; border: 1px solid #EF9A9A; }
.hali-badge-warning  { background: #FFF8E1; color: #F57F17; border: 1px solid #FFD54F; }

/* =============================================
   信息展示
   ============================================= */
.hali-info-box {
    background: linear-gradient(135deg, var(--hali-accent) 0%, #FFF 100%);
    border: 2px solid var(--hali-primary-l);
    border-radius: var(--hali-radius);
    padding: 20px 24px;
}
.hali-info-no {
    font-size: 28px;
    font-weight: 800;
    color: var(--hali-primary);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}
.hali-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--hali-border);
    font-size: 14px;
}
.hali-info-row:last-child { border-bottom: none; }
.hali-info-label { color: var(--hali-text-muted); min-width: 80px; }
.hali-info-value { font-weight: 600; color: var(--hali-text); text-align: right; }

/* =============================================
   货盘卡片
   ============================================= */
.hali-pallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.hali-pallet-card {
    background: var(--hali-card-bg);
    border: 1.5px solid var(--hali-border);
    border-radius: var(--hali-radius);
    box-shadow: var(--hali-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hali-pallet-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hali-shadow-md);
}
.hali-pallet-header {
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    padding: 14px 18px;
    color: #fff;
}
.hali-pallet-name { font-size: 16px; font-weight: 700; }
.hali-pallet-spec { font-size: 12px; opacity: 0.85; margin-top: 3px; }
.hali-pallet-body { padding: 16px 18px; }
.hali-pallet-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--hali-primary);
}
.hali-pallet-price small { font-size: 14px; font-weight: 400; }
.hali-pallet-stock {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--hali-text-muted);
    margin: 10px 0;
    padding: 8px 12px;
    background: var(--hali-accent);
    border-radius: 6px;
}
.hali-pallet-desc {
    font-size: 13px;
    color: var(--hali-text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
    min-height: 40px;
}
.hali-pallet-footer { padding: 0 18px 18px; }

/* 订货表单 */
.hali-order-form { margin-top: 12px; }
.hali-qty-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.hali-qty-btn {
    width: 32px; height: 32px;
    min-width: 32px; min-height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--hali-primary);
    background: #fff;
    color: var(--hali-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
    transition: all 0.15s;
}
.hali-qty-btn:hover { background: var(--hali-primary); color: #fff; }
.hali-qty-num {
    font-size: 17px; font-weight: 700;
    width: 64px; min-width: 64px;
    text-align: center;
    border: 1.5px solid #E8C49A;
    border-radius: 8px;
    padding: 4px 6px;
    outline: none;
    -moz-appearance: textfield;
}
.hali-qty-num::-webkit-inner-spin-button,
.hali-qty-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hali-qty-num:focus { border-color: var(--hali-primary); box-shadow: 0 0 0 2px rgba(232,114,12,0.15); }

/* 选项卡 */
.hali-tabs {
    display: flex;
    border-bottom: 2px solid var(--hali-border);
    margin-bottom: 24px;
    gap: 4px;
}
.hali-tab {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    color: var(--hali-text-muted);
    border: none;
    background: none;
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
    border: 1.5px solid transparent;
}
.hali-tab:hover { color: var(--hali-primary); }
.hali-tab.active {
    color: var(--hali-primary);
    border-color: var(--hali-border);
    border-bottom-color: #fff;
    background: #fff;
}
.hali-tab-content { display: none; }
.hali-tab-content.active { display: block; }

/* 数据列表 */
.hali-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hali-list-table th {
    background: var(--hali-accent);
    color: var(--hali-brown);
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1.5px solid var(--hali-border);
    white-space: nowrap;
}
.hali-list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F0E8DC;
    vertical-align: middle;
    color: var(--hali-text);
}
.hali-list-table tr:hover td { background: #FFF8F0; }
.hali-list-empty {
    text-align: center;
    padding: 40px;
    color: var(--hali-text-muted);
    font-size: 14px;
}

/* 登录页 */
.hali-login-wrap {
    max-width: 420px;
    margin: 60px auto;
    padding: 16px;
}
.hali-login-header {
    text-align: center;
    margin-bottom: 32px;
}
.hali-login-logo {
    margin: 0 auto 16px;
    text-align: center;
}
.hali-logo-img {
    width: 200px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.hali-login-title { font-size: 24px; font-weight: 800; color: var(--hali-brown); }
.hali-login-sub {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.hali-login-sub-line1 {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.05em;
    background: linear-gradient(120deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hali-login-sub-line2 {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.05em;
    background: linear-gradient(120deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 注册页 */
.hali-register-wrap {
    max-width: 520px;
    margin: 40px auto;
    padding: 16px;
}
.hali-register-header { text-align: center; margin-bottom: 28px; }
.hali-register-title  { font-size: 22px; font-weight: 800; color: var(--hali-brown); }
.hali-register-sub    { font-size: 13px; color: var(--hali-text-muted); margin-top: 4px; }

/* 仪表盘 */
.hali-dashboard-header {
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 60%, #FFD080 100%);
    border-radius: var(--hali-radius);
    padding: 28px 24px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: var(--hali-shadow-md);
    position: relative;
    overflow: hidden;
}
.hali-dashboard-header::after {
    content: '🏪';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    opacity: 0.2;
}
.hali-dashboard-name   { font-size: 22px; font-weight: 800; }
.hali-dashboard-no     { font-size: 14px; opacity: 0.85; margin-top: 4px; font-family: monospace; letter-spacing: 1px; }
.hali-dashboard-expire { font-size: 13px; opacity: 0.75; margin-top: 6px; }

/* 统计数字 */
.hali-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.hali-stat-card {
    background: var(--hali-card-bg);
    border: 1.5px solid var(--hali-border);
    border-radius: var(--hali-radius);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--hali-shadow);
}
.hali-stat-num   { font-size: 28px; font-weight: 800; color: var(--hali-primary); }
.hali-stat-label { font-size: 12px; color: var(--hali-text-muted); margin-top: 4px; }

/* 空状态 */
.hali-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--hali-text-muted);
}
.hali-empty-icon { font-size: 48px; margin-bottom: 12px; }
.hali-empty-text { font-size: 14px; }

/* 模态框 */
.hali-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.hali-modal-overlay.active { display: flex; }
.hali-modal {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    animation: haliSlideUp 0.25s ease;
}
@keyframes haliSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.hali-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--hali-brown);
    margin-bottom: 20px;
}
.hali-modal-close {
    float: right;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    line-height: 1;
    margin-top: -2px;
}

/* Loading */
.hali-loading {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: haliSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes haliSpin { to { transform: rotate(360deg); } }

/* 文字工具 */
.hali-text-danger  { color: var(--hali-danger); font-weight: 600; }
.hali-text-muted   { color: var(--hali-text-muted); }
.hali-text-primary { color: var(--hali-primary); font-weight: 700; }
.hali-price        { color: var(--hali-primary); font-weight: 700; }

/* =============================================
   后台管理样式（WordPress Admin）
   ============================================= */
.hali-admin-wrap { padding: 20px; }
.hali-admin-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--hali-brown);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hali-logo-icon { font-size: 22px; }

.hali-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--hali-border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.hali-stat-pills { display: flex; gap: 8px; }
.hali-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.hali-pill-pending  { background: #FFF3E0; color: #E65100; }
.hali-pill-ok       { background: #E8F5E9; color: #2E7D32; }
.hali-pill-disabled { background: #EEE;    color: #757575; }

.hali-table-wrap {
    background: #fff;
    border: 1px solid var(--hali-border);
    border-radius: 8px;
    overflow: auto;
}
.hali-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hali-admin-table th {
    background: var(--hali-accent);
    color: var(--hali-brown);
    font-weight: 700;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--hali-border);
    white-space: nowrap;
}
.hali-admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #F5EDDF;
    vertical-align: middle;
}
.hali-admin-table tr:hover td { background: #FFF8F0; }
.hali-admin-table tr.hali-row-expired td { background: #FFF5F5; }

/* 后台按钮 */
.hali-btn-success { background: var(--hali-success); color: #fff; }
.hali-btn-danger  { background: var(--hali-danger);  color: #fff; }
.hali-btn-warning { background: var(--hali-warning); color: #fff; }
.hali-btn-outline { background: #fff; color: var(--hali-primary); border: 1.5px solid var(--hali-primary); }
.hali-btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.hali-btn:not(.hali-btn-sm) { padding: 8px 16px; font-size: 13px; }

.hali-select-sm { padding: 5px 8px; font-size: 12px; border-radius: 6px; }
.hali-input-sm  { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

.hali-code {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    padding: 2px 7px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--hali-brown);
}
.hali-code-pwd { color: var(--hali-primary); }

.hali-action-cell { white-space: nowrap; min-width: 160px; }

/* 后台表单网格 */
.hali-admin-wrap .hali-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.hali-admin-wrap .hali-card {
    background: #fff;
    border: 1px solid var(--hali-border);
    border-radius: 8px;
    padding: 20px;
}
.hali-admin-wrap .hali-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hali-brown);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--hali-accent);
}

/* =============================================
   对账单 Modal
   ============================================= */
.hali-modal-overlay {
    z-index: 99999;
    padding: 16px;
}
.hali-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}
.hali-modal-scrollable {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}
.hali-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1.5px solid #E8C49A;
    background: #FFF8F0;
    flex-shrink: 0;
}
.hali-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--hali-brown);
}
.hali-modal-sub {
    font-size: 12px;
    color: #8B7355;
    margin-top: 4px;
}
.hali-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #B0A090;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 0 12px;
    flex-shrink: 0;
}
.hali-modal-close:hover { color: var(--hali-danger); }
.hali-modal-body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
}

/* 收款状态 badge */
.hali-badge-warning { background: #FFF3CD; color: #856404; }

/* 选项卡红点角标 */
.hali-tab-badge {
    display: inline-block;
    background: var(--hali-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 14px;
}

/* =============================================
   我的账单卡片
   ============================================= */
.hali-bill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.hali-bill-card {
    background: #fff;
    border: 1.5px solid #E8C49A;
    border-radius: 12px;
    overflow: hidden;
}
.hali-bill-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    background: #FFF8F0;
    border-bottom: 1px solid #F5EDDF;
    gap: 10px;
}
.hali-bill-pallet {
    font-size: 15px;
    font-weight: 700;
    color: var(--hali-brown);
}
.hali-bill-date {
    font-size: 11px;
    color: #8B7355;
    margin-top: 3px;
}
.hali-bill-status {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.hali-bill-items {
    padding: 10px 16px;
    border-bottom: 1px solid #F5EDDF;
}
.hali-bill-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #5C4033;
    padding: 3px 0;
}
.hali-bill-footer {
    padding: 12px 16px;
}
.hali-bill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 14px;
    color: #5C4033;
}

/* =============================================
   自定义确认弹窗（替代 confirm()）
   ============================================= */
.hali-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44, 24, 16, 0.45);
    z-index: 99998;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.hali-confirm-overlay.active { display: flex; }
.hali-confirm-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(232,114,12,0.22), 0 4px 16px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: haliConfirmPop 0.22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes haliConfirmPop {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.hali-confirm-header {
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    padding: 18px 22px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hali-confirm-icon {
    font-size: 22px;
    line-height: 1;
}
.hali-confirm-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}
.hali-confirm-body {
    padding: 20px 22px 10px;
    font-size: 15px;
    color: var(--hali-text);
    line-height: 1.7;
    word-break: break-all;
}
.hali-confirm-footer {
    display: flex;
    gap: 10px;
    padding: 12px 22px 20px;
    justify-content: flex-end;
}
.hali-confirm-cancel {
    padding: 9px 22px;
    border-radius: 8px;
    border: 1.5px solid var(--hali-border);
    background: #fff;
    color: var(--hali-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.hali-confirm-cancel:hover { background: #FFF8F0; border-color: var(--hali-primary-l); color: var(--hali-brown); }
.hali-confirm-ok {
    padding: 9px 26px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--hali-primary) 0%, var(--hali-primary-l) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(232,114,12,0.32);
    transition: all 0.18s;
}
.hali-confirm-ok:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(232,114,12,0.42); }
.hali-confirm-ok:active { transform: translateY(0); }

/* 响应式 */
@media (max-width: 768px) {
    .hali-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hali-pallet-grid { grid-template-columns: 1fr; }
    .hali-admin-wrap .hali-form-grid { grid-template-columns: 1fr; }
    .hali-tabs { overflow-x: auto; }
    .hali-list-table { font-size: 12px; }
}
@media (max-width: 480px) {
    .hali-stats-grid { grid-template-columns: 1fr; }
    .hali-dashboard-header::after { display: none; }
    .hali-info-no { font-size: 20px; }
}

/* =============================================
   子账号管理面板（/hali-adminpanel/）移动端样式
   ============================================= */

/* 面板页整体 */
.hali-panel-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--hali-bg);
}

/* 顶部导航角色徽章 */
.hali-panel-role-badge {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

/* Tab 导航栏（水平滚动，吸顶） */
.hali-panel-tabbar {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #fff;
    border-bottom: 2px solid var(--hali-border);
    position: sticky;
    top: 52px;
    z-index: 90;
    padding: 0 4px;
    gap: 2px;
}
.hali-panel-tabbar::-webkit-scrollbar { display: none; }

.hali-panel-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 14px 8px;
    min-width: 60px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--hali-text-muted);
    font-size: 12px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.18s;
    flex-shrink: 0;
    position: relative;
    bottom: -2px;
}
.hali-panel-tab-icon { font-size: 18px; line-height: 1; }
.hali-panel-tab-label { font-size: 11px; }
.hali-panel-tab:hover { color: var(--hali-primary); }
.hali-panel-tab.active {
    color: var(--hali-primary);
    border-bottom-color: var(--hali-primary);
}

/* 主内容区 */
.hali-panel-body {
    flex: 1;
    padding: 12px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 模块区块 */
.hali-panel-section { }

.hali-panel-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}
.hali-panel-section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--hali-brown);
    display: flex;
    align-items: center;
    gap: 6px;
}
.hali-panel-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--hali-primary);
    border-radius: 2px;
}

/* 搜索栏 */
.hali-panel-search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--hali-border);
    border-radius: 10px;
    padding: 10px 12px;
}
.hali-panel-search-input {
    flex: 1;
    min-width: 120px;
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--hali-text);
    background: #FAFAFA;
    outline: none;
    font-family: inherit;
}
.hali-panel-search-input:focus {
    border-color: var(--hali-primary);
    box-shadow: 0 0 0 3px rgba(232,114,12,0.10);
    background: #fff;
}
.hali-panel-search-select {
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--hali-text);
    background: #FAFAFA;
    outline: none;
    font-family: inherit;
    min-width: 90px;
}

/* 数据卡片 */
.hali-panel-card {
    background: #fff;
    border: 1.5px solid var(--hali-border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(232,114,12,0.07);
    transition: box-shadow 0.18s;
}
.hali-panel-card:active { box-shadow: 0 3px 14px rgba(232,114,12,0.15); }
.hali-panel-card-warn { border-color: #FFB74D; background: #FFFDE7; }
.hali-panel-card-self { border-color: var(--hali-primary-l); }

.hali-panel-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 14px 8px;
    gap: 10px;
    background: #FFF8F0;
    border-bottom: 1px solid #F5EDDF;
}
.hali-panel-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hali-brown);
    line-height: 1.4;
}
.hali-panel-card-sub {
    font-size: 12px;
    color: var(--hali-text-muted);
    margin-top: 3px;
}

.hali-panel-card-body {
    padding: 8px 14px 4px;
}

.hali-panel-card-footer {
    padding: 8px 14px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #F5EDDF;
}

/* KV 行 */
.hali-panel-kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #F5EDDF;
    gap: 8px;
    font-size: 13px;
}
.hali-panel-kv:last-child { border-bottom: none; }
.hali-panel-kv-k {
    color: var(--hali-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 72px;
}
.hali-panel-kv-v {
    color: var(--hali-text);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

/* 空状态 */
.hali-panel-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--hali-text-muted);
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1.5px dashed var(--hali-border);
}

/* 统计汇总网格 */
.hali-panel-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.hali-panel-summary-card {
    background: #fff;
    border: 1.5px solid var(--hali-border);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: var(--hali-shadow);
}
.hali-panel-summary-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--hali-primary);
    line-height: 1.2;
}
.hali-panel-summary-label {
    font-size: 11px;
    color: var(--hali-text-muted);
    margin-top: 4px;
}

/* 折叠表单框 */
.hali-panel-form-box {
    background: #FFF8F0;
    border: 1.5px solid var(--hali-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.hali-panel-form-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hali-brown);
    margin-bottom: 12px;
}
.hali-panel-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 内联操作表单 */
.hali-panel-inline-form {
    background: #FFF8F0;
    border: 1px solid var(--hali-border);
    border-radius: 8px;
    padding: 12px;
}

/* 角色/状态统计 pills */
.hali-panel-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 辅助色 */
.hali-text-danger { color: var(--hali-danger) !important; }
.hali-price { color: var(--hali-primary); font-weight: 700; }

/* =============================================
   批次自定义下拉选择器（.hali-ib-picker）
   ============================================= */
.hali-ib-picker {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* 触发按钮（显示当前选中值） */
.hali-ib-trigger {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    background: #FAFAFA;
    color: var(--hali-text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.15s;
    user-select: none;
}
.hali-ib-trigger:hover {
    border-color: var(--hali-primary-l);
    background: #fff;
}
.hali-ib-trigger.open {
    border-color: var(--hali-primary);
    box-shadow: 0 0 0 3px rgba(232,114,12,0.12);
    background: #fff;
    border-radius: 8px 8px 0 0;
}
.hali-ib-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hali-ib-trigger-text.placeholder {
    color: #B0A090;
}
.hali-ib-trigger-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hali-text-muted);
    transition: transform 0.2s;
    font-size: 12px;
}
.hali-ib-trigger.open .hali-ib-trigger-arrow {
    transform: rotate(180deg);
    color: var(--hali-primary);
}

/* 下拉列表面板 */
.hali-ib-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 9990;
    background: #fff;
    border: 1.5px solid var(--hali-primary);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(232,114,12,0.15), 0 2px 8px rgba(0,0,0,0.08);
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 防止长选项撑破屏幕 */
    min-width: 100%;
    width: max-content;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}
.hali-ib-dropdown.open {
    display: block;
    animation: haliIbSlide 0.18s ease;
}
@keyframes haliIbSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hali-ib-dropdown::-webkit-scrollbar { width: 4px; }
.hali-ib-dropdown::-webkit-scrollbar-thumb { background: var(--hali-border); border-radius: 4px; }

/* 每个选项 */
.hali-ib-opt {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #F5EDDF;
    transition: background 0.12s;
}
.hali-ib-opt:last-child { border-bottom: none; }
.hali-ib-opt:hover,
.hali-ib-opt.hovered  {
    background: var(--hali-accent);
}
.hali-ib-opt.selected {
    background: #FFF3E0;
}
.hali-ib-opt-main {
    font-size: 14px;
    font-weight: 600;
    color: var(--hali-brown);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    overflow: hidden;
}
.hali-ib-opt-id {
    font-family: monospace;
    font-size: 12px;
    color: var(--hali-primary);
    background: #FFF3E0;
    border: 1px solid #FFD0A0;
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}
.hali-ib-opt-name {
    font-weight: 700;
    color: var(--hali-brown);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hali-ib-opt-spec {
    font-size: 12px;
    color: var(--hali-primary-d);
    background: #FFF8EE;
    border: 1px solid var(--hali-border);
    border-radius: 4px;
    padding: 1px 6px;
}
.hali-ib-opt-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--hali-text-muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hali-ib-opt-meta span { display: flex; align-items: center; gap: 3px; }

/* 「不关联」选项特殊样式 */
.hali-ib-opt.opt-none .hali-ib-opt-main {
    color: var(--hali-text-muted);
    font-weight: 400;
    font-style: italic;
}

/* =============================================
   出库开单弹窗 - 主理人搜索下拉
   ============================================= */
.hali-agent-search-input {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--hali-text);
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}
.hali-agent-search-input:focus {
    border-color: var(--hali-primary);
    box-shadow: 0 0 0 3px rgba(232,114,12,0.12);
}
.hali-agent-dropdown {
    border: 1.5px solid var(--hali-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(232,114,12,0.13);
    max-height: 180px;
    overflow-y: auto;
}
.hali-agent-opt {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--hali-text);
    cursor: pointer;
    transition: background 0.12s;
}
.hali-agent-opt:hover { background: var(--hali-accent); }
.hali-agent-selected-tag {
    margin-top: 6px;
    padding: 7px 12px;
    background: var(--hali-accent);
    border: 1.5px solid var(--hali-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--hali-brown);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hali-agent-clear {
    cursor: pointer;
    color: var(--hali-primary);
    font-size: 18px;
    line-height: 1;
    margin-left: 8px;
    flex-shrink: 0;
}
.hali-agent-clear:hover { color: var(--hali-primary-d); }


/* 移动端适配 */
@media (max-width: 480px) {
    .hali-panel-body { padding: 8px; }
    .hali-panel-tab { padding: 8px 10px 6px; min-width: 52px; }
    .hali-panel-tab-icon { font-size: 16px; }
    .hali-panel-form-grid { grid-template-columns: 1fr; }
    .hali-panel-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .hali-panel-card-head { padding: 10px 12px 6px; }
    .hali-panel-card-body { padding: 6px 12px 2px; }
    .hali-panel-card-footer { padding: 6px 12px 10px; }
    .hali-navbar { padding: 10px 12px; }
    .hali-navbar-logo { font-size: 14px; }
    .hali-panel-role-badge { display: none; }
}

/* ======================================================
   主理人角色宣传册卡片（hali-role-card）
   ====================================================== */
.hali-role-card {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(230,81,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
    border: 1.5px solid #F2E3D0;
}

/* 顶部 Banner */
.hali-role-card-banner {
    background: linear-gradient(135deg, #E65100 0%, #FF8F00 100%);
    padding: 18px 18px 14px;
    position: relative;
    overflow: hidden;
}
.hali-role-card-banner::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hali-role-card-banner-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 2px 8px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.hali-role-card-banner-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.hali-role-card-banner-date {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    margin-top: 4px;
}

/* 内容区 */
.hali-role-card-body {
    padding: 14px 18px 4px;
}

/* 区块 */
.hali-role-section {
    margin-bottom: 14px;
}
.hali-role-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #E65100;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.hali-role-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 13px;
    background: linear-gradient(180deg, #E65100, #FF8F00);
    border-radius: 2px;
    flex-shrink: 0;
}
.hali-role-section-content {
    font-size: 13px;
    color: #4A3B2A;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 权益列表（解析 ①② 序号为badge） */
.hali-role-benefit-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hali-role-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #4A3B2A;
    line-height: 1.65;
}
.hali-role-benefit-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #E65100, #FF8F00);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

/* 底部操作栏 */
.hali-role-card-footer {
    padding: 10px 18px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #F5EDDF;
    background: #FDFAF6;
}

/* 分隔线 */
.hali-role-section + .hali-role-section {
    border-top: 1px dashed #F0E6D8;
    padding-top: 14px;
}

@media (max-width: 480px) {
    .hali-role-card-banner { padding: 14px 14px 12px; }
    .hali-role-card-banner-title { font-size: 17px; }
    .hali-role-card-body { padding: 12px 14px 2px; }
    .hali-role-card-footer { padding: 8px 14px 12px; }
}

/* ======================================================
   客户卡片（高级感重设计）
   ====================================================== */
.hali-customer-card {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(230,81,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
    border: 1.5px solid #F2E3D0;
    transition: box-shadow .2s, transform .2s;
}
.hali-customer-card:hover {
    box-shadow: 0 8px 28px rgba(230,81,0,0.14), 0 2px 8px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

/* 顶部色带：编码 + 操作按钮 */
.hali-cust-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 10px 16px;
    background: linear-gradient(90deg, #E65100 0%, #FF8F00 100%);
}
.hali-cust-card-no {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
}
.hali-cust-card-actions {
    display: flex;
    gap: 6px;
}
.hali-cust-action-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    padding: 0;
}
.hali-cust-action-btn:hover {
    background: rgba(255,255,255,0.32);
}
.hali-cust-action-btn--del:hover {
    background: rgba(229,57,53,0.55);
}

/* 卡片主体：头像 + 信息 */
.hali-cust-card-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 10px;
}
.hali-cust-card-avatar {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E65100 0%, #FF8F00 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(230,81,0,0.28);
    letter-spacing: 0;
}
.hali-cust-card-info {
    flex: 1;
    min-width: 0;
}
.hali-cust-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #2D1B00;
    margin-bottom: 5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hali-cust-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: #7A5C3A;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}
.hali-cust-meta-icon {
    flex-shrink: 0;
}

/* 卡片底部：日期 */
.hali-cust-card-footer {
    padding: 7px 16px 10px;
    border-top: 1px solid #F5EDDF;
    background: #FDFAF6;
    display: flex;
    align-items: center;
}
.hali-cust-card-date {
    font-size: 11px;
    color: #B89070;
    letter-spacing: 0.3px;
}
.hali-cust-card-creator {
    margin-left: auto;
    font-size: 11px;
    color: #B89070;
    letter-spacing: 0.3px;
}

@media (max-width: 480px) {
    .hali-cust-card-body { padding: 13px 13px 8px; gap: 11px; }
    .hali-cust-card-avatar { width: 40px; height: 40px; font-size: 17px; }
    .hali-cust-card-name { font-size: 15px; }
    .hali-cust-card-footer { padding: 6px 13px 9px; }
    .hali-cust-card-header { padding: 7px 12px; }
}

/* =============================================
   客户编码搜索联想下拉
   ============================================= */
.hali-cust-search-box {
    position: relative;
}
.hali-cust-search-input {
    width: 100%;
    box-sizing: border-box;
}
.hali-cust-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--hali-border);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(232,114,12,0.13);
    z-index: 999;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}
.hali-cust-drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #F5EDE4;
}
.hali-cust-drop-item:last-child {
    border-bottom: none;
}
.hali-cust-drop-item:hover,
.hali-cust-drop-item:active {
    background: #FFF3E8;
}
.hali-cust-drop-no {
    font-size: 12px;
    font-weight: 700;
    color: var(--hali-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.hali-cust-drop-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--hali-brown);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hali-cust-drop-phone {
    font-size: 12px;
    color: var(--hali-text-muted);
    flex-shrink: 0;
}
.hali-cust-drop-empty {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--hali-text-muted);
    text-align: center;
}

/* 订单卡片：客户编码标签 */
.hali-order-cust-no {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--hali-primary);
    background: rgba(232,114,12,0.10);
    border: 1px solid rgba(232,114,12,0.25);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'SF Mono', 'Consolas', monospace;
    white-space: nowrap;
    line-height: 1.6;
}

/* 入库记录：未出账单标签 */
.hali-badge-no-stmt {
    background: #F5F5F5;
    color: #9E9E9E;
    border: 1px solid #E0E0E0;
}

/* 订单卡片：无编码时的操作按钮组 */
.hali-order-cust-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}
.hali-cust-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    line-height: 1.6;
    white-space: nowrap;
    transition: all 0.15s;
}
.hali-order-add-new-cust-btn {
    color: #2E7D32;
    background: rgba(76,175,80,0.10);
    border: 1px solid rgba(76,175,80,0.3);
}
.hali-order-add-new-cust-btn:hover {
    background: rgba(76,175,80,0.18);
    border-color: rgba(76,175,80,0.5);
}
.hali-order-bind-cust-btn {
    color: var(--hali-primary);
    background: rgba(232,114,12,0.08);
    border: 1px solid rgba(232,114,12,0.25);
}
.hali-order-bind-cust-btn:hover {
    background: rgba(232,114,12,0.16);
    border-color: rgba(232,114,12,0.45);
}

/* 录入/绑定弹窗 head */
.hali-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1.5px solid var(--hali-border);
    background: #FFF8F0;
    flex-shrink: 0;
    font-size: 15px;
    color: var(--hali-brown);
}

/* ======================================================
   客户卡片：订单数标签 & 订单统计弹窗
   ====================================================== */

/* 客户卡片 footer 中的订单数标签 */
.hali-cust-order-count-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--hali-primary);
    background: rgba(232,114,12,0.10);
    border: 1px solid rgba(232,114,12,0.28);
    border-radius: 20px;
    padding: 2px 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s;
    user-select: none;
}
.hali-cust-order-count-badge:hover {
    background: rgba(232,114,12,0.18);
    border-color: rgba(232,114,12,0.50);
    transform: scale(1.04);
}
.hali-cust-order-count-badge:active {
    transform: scale(0.97);
}

/* 当卡片 footer 中同时有 date 和 creator 时，badge 始终在最右 */
.hali-cust-card-footer .hali-cust-card-creator + .hali-cust-order-count-badge,
.hali-cust-card-footer .hali-cust-card-date + .hali-cust-order-count-badge {
    margin-left: auto;
}

/* 品鉴官标签 */
.hali-taster-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.5;
    margin-right: 6px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* 订单统计弹窗 */
.hali-order-stats-box {
    max-width: 520px;
    width: 92%;
}
.hali-order-stats-body {
    padding: 16px 20px 4px;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 总单数汇总行 */
.hali-order-stats-summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 12px 0 14px;
    border-bottom: 1.5px solid #F2E3D0;
    margin-bottom: 12px;
}
.hali-order-stats-total-label {
    font-size: 13px;
    color: #8B7355;
}
.hali-order-stats-total-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--hali-primary);
    line-height: 1;
    font-family: 'SF Mono', 'Consolas', monospace;
}
.hali-order-stats-total-unit {
    font-size: 14px;
    color: #8B7355;
    font-weight: 600;
}

/* 每日明细表格 */
.hali-order-stats-table-wrap {
    overflow-x: auto;
}
.hali-order-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hali-order-stats-table thead tr {
    background: #FFF3E0;
}
.hali-order-stats-table th {
    text-align: left;
    padding: 8px 12px;
    color: #8B5E3C;
    font-weight: 600;
    border-bottom: 1.5px solid #F2E3D0;
    white-space: nowrap;
}
.hali-order-stats-table td {
    padding: 8px 12px;
    color: #3C2A10;
    border-bottom: 1px solid #FAF0E6;
    vertical-align: middle;
}
.hali-order-stats-table tbody tr:hover {
    background: #FFF8F0;
}
.hali-order-stats-table td:nth-child(3) {
    font-weight: 700;
    color: var(--hali-primary);
}

/* 加载中 / 空状态 / 错误状态 */
.hali-order-stats-loading,
.hali-order-stats-empty,
.hali-order-stats-error {
    text-align: center;
    padding: 28px 0;
    font-size: 13px;
    color: #B89070;
}
.hali-order-stats-error {
    color: var(--hali-danger);
}

@media (max-width: 480px) {
    .hali-order-stats-box { width: 96%; }
    .hali-order-stats-body { padding: 12px 14px 4px; }
    .hali-order-stats-total-num { font-size: 26px; }
    .hali-order-stats-table th,
    .hali-order-stats-table td { padding: 7px 8px; font-size: 12px; }
}

/* 省份批发价弹窗：省份输入框小尺寸 */
.hali-input-sm {
    padding: 4px 8px !important;
    font-size: 13px !important;
    height: auto !important;
}

/* 省份批发价弹窗：省份列表区域 */
#pp-province-list {
    background: #fff;
}
#pp-province-list .pp-province-input:focus {
    border-color: var(--hali-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(232,114,12,0.15);
}

/* ================================================
   客户 Tab：分组标题 & 卡片样式
   ================================================ */
.hali-agent-group-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: linear-gradient(90deg,#FFF3E8 60%,transparent 100%);
    border-left: 4px solid var(--hali-primary);
    border-radius: 0 8px 8px 0;
    margin-bottom: 4px;
}
.hali-agent-group-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--hali-brown);
    flex: 1;
}

/* 客户卡片外壳（共用 .hali-customer-card） */
.hali-customer-card {
    background: #fff;
    border: 1.5px solid var(--hali-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(232,114,12,0.07);
    transition: box-shadow 0.18s, transform 0.18s;
}
.hali-customer-card:hover {
    box-shadow: 0 6px 20px rgba(232,114,12,0.15);
    transform: translateY(-2px);
}
.hali-cust-card-header {
    background: linear-gradient(90deg, #E65100 0%, #FF8F00 100%);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid var(--hali-border);
    min-height: 28px;
}
.hali-cust-card-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
}
.hali-cust-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hali-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232,114,12,0.25);
}
.hali-cust-card-info {
    flex: 1;
    min-width: 0;
}
.hali-cust-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--hali-brown);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hali-cust-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--hali-text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hali-cust-meta-icon {
    font-size: 12px;
    flex-shrink: 0;
}
.hali-cust-card-footer {
    padding: 6px 12px;
    border-top: 1px solid var(--hali-border);
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.hali-cust-card-date {
    font-size: 11px;
    color: #6B4C2A;
}
/* 客户卡片响应式网格：宽屏双列，窄屏单列 */
.hali-cust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}
@media (max-width: 600px) {
    .hali-cust-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   库存盘点样式
   ============================================================ */

/* 盘点类型 Tab 切换 */
.hali-inv-type-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 14px;
    flex-wrap: wrap;
}
.hali-inv-type-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid var(--hali-border);
    color: var(--hali-text-muted);
    background: #fff;
    text-decoration: none;
    transition: all .2s;
}
.hali-inv-type-tab.active,
.hali-inv-type-tab:hover {
    background: var(--hali-primary);
    border-color: var(--hali-primary);
    color: #fff;
}

/* 提交表单卡片 */
.hali-inv-submit-card {
    border: 2px solid var(--hali-primary);
    border-radius: 12px;
    overflow: hidden;
}

/* 三状态数量输入网格 */
.hali-inv-qty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
@media (max-width: 420px) {
    .hali-inv-qty-grid {
        grid-template-columns: 1fr;
    }
}
.hali-inv-qty-input {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

/* 状态颜色圆点 */
.hali-inv-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.hali-inv-dot-normal  { background: #4CAF50; }
.hali-inv-dot-minor   { background: #FF9800; }
.hali-inv-dot-major   { background: #F44336; }

/* 合计栏 */
.hali-inv-total-bar {
    background: #FFF8F0;
    border: 1px solid #FFD9A8;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    color: #7A4A1E;
    margin-bottom: 12px;
    text-align: center;
}
.hali-inv-total-bar strong {
    font-size: 20px;
    color: var(--hali-primary);
    margin: 0 2px;
}

/* 盘点记录卡片 */
.hali-inv-record-card {
    background: #fff;
    border: 1px solid var(--hali-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* 卡片头 */
.hali-inv-record-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(90deg, #FFF3E8 0%, #FDEBD0 100%);
    border-bottom: 1px solid #FFD9A8;
}
.hali-inv-record-date {
    font-size: 14px;
    font-weight: 600;
    color: #5A3210;
}
.hali-inv-record-agent {
    font-size: 12px;
    color: #8B5E3C;
    margin-left: 10px;
}
.hali-inv-record-total {
    background: var(--hali-primary);
    color: #fff;
    border-radius: 12px;
    padding: 2px 12px;
    font-size: 13px;
    font-weight: 700;
}

/* 卡片体：三状态统计 */
.hali-inv-record-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.hali-inv-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-right: 1px solid var(--hali-border);
}
.hali-inv-stat-item:last-child { border-right: none; }
.hali-inv-stat-label {
    font-size: 11px;
    color: var(--hali-text-muted);
    margin-bottom: 4px;
}
.hali-inv-stat-val {
    font-size: 22px;
    font-weight: 700;
}
.hali-inv-stat-normal  .hali-inv-stat-val { color: #4CAF50; }
.hali-inv-stat-minor   .hali-inv-stat-val { color: #FF9800; }
.hali-inv-stat-major   .hali-inv-stat-val { color: #F44336; }

/* 卡片脚 */
.hali-inv-record-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: #FAFAFA;
    border-top: 1px solid var(--hali-border);
}
.hali-inv-record-remark {
    font-size: 12px;
    color: #7A6050;
}
.hali-inv-record-time {
    font-size: 11px;
    color: #B0A090;
}

/* 管理员盘点列表：双列网格 */
.hali-inv-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}
@media (max-width: 700px) {
    .hali-inv-admin-grid {
        grid-template-columns: 1fr;
    }
}
