/* POS 收银后台 - Stripe 设计系统 */
/* Tailwind CDN 已加载，本文件仅包含自定义组件和银豹布局样式 */

/* ===== CSS 变量 ===== */
:root {
    --brand: #008fd7; --brand-hover: #007bbb;
    --brand-10: rgba(0,143,215,0.10); --brand-50: rgba(0,143,215,0.05);
    --heading: #000000; --body: #777777; --border: #e5e5e5;
    --bg: #ffffff; --bg-subtle: #f5f5f5; --bg-canvas: #f2f2f2;
    --success: #16825d; --success-bg: #e5f4ec;
    --danger: #bf3d4f; --danger-bg: #fbeaec;
    --warning: #c26b19; --warning-bg: #fff3e2;
    --info: #008fd7; --info-bg: #eef8fd;
    --shadow-sm: none;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 32px rgba(0,0,0,0.16);
    --radius-btn: 2px; --radius-card: 2px; --radius-input: 2px;
    --sidebar-icons: 44px; --sidebar-menu: 136px; --topbar-h: 54px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; }
body { margin:0; font-family:var(--font); color:var(--body); background:var(--bg-canvas); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
a { color:var(--brand); text-decoration:none; } a:hover { color:var(--brand-hover); }
h1,h2,h3,h4 { color:var(--heading); font-weight:600; }
h1{font-size:22px} h2{font-size:18px} h3{font-size:16px}
::-webkit-scrollbar{width:6px} ::-webkit-scrollbar-thumb{background:#d1d9e6;border-radius:3px}

/* ===== 登录页 ===== */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#f2f5f8 0%,#e8f3fa 100%); }
.login-card { background:rgba(255,255,255,.98); border:1px solid rgba(255,255,255,.35); border-radius:20px; padding:48px 44px; width:420px; box-shadow:var(--shadow-lg); }
.login-card h1 { color:var(--brand); font-size:26px; font-weight:700; margin-bottom:6px; }
.login-subtitle { color:var(--body); font-size:14px; margin-bottom:28px; display:block; }
.login-error { background:var(--danger-bg); color:var(--danger); padding:10px 14px; border-radius:var(--radius-btn); margin-bottom:18px; font-size:13px; display:none; }
.login-error.show { display:block; }

/* ===== 主布局 - 银豹三栏 ===== */
.app-layout { display:flex; height:100vh; }

/* 左侧导航容器（hover 联动展开） */
.left-nav { display:flex; flex-shrink:0; }

/* 左侧图标栏 */
.icon-sidebar { width:var(--sidebar-icons); background:#333638; display:flex; flex-direction:column; align-items:center; padding:0; flex-shrink:0; gap:0; overflow-y:auto; }
.icon-sidebar .icon-item {
    width:100%; height:50px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
    border-radius:0; cursor:pointer; color:#aeb2b4; font-size:20px; transition:background .15s, color .15s; position:relative;
}
.icon-sidebar .icon-item:hover { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.08); }
.icon-sidebar a.icon-item { text-decoration:none; }
.icon-sidebar .icon-item.active { color:#fff; background:var(--brand); }
.icon-sidebar svg { width:22px; height:22px; fill:currentColor; }
.icon-sidebar .nav-toggle { width:100%; height:50px; flex-shrink:0; border:0; border-bottom:1px solid #444; background:#282a2c; color:#bfc2c4; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.icon-sidebar .nav-toggle:hover { color:#fff; }
.icon-sidebar .icon-item:focus-visible, .icon-sidebar .nav-toggle:focus-visible { outline:2px solid #fff; outline-offset:-3px; }

/* 二级菜单 - 银豹风格自动伸缩 */
.menu-sidebar {
    width:0; overflow:hidden; overflow-y:auto; background:#eeeeee; border-right:1px solid #d6d6d6;
    display:flex; flex-direction:column; flex-shrink:0;
    transition: width .18s ease-out;
}
.menu-sidebar.show { width:var(--sidebar-menu); }
.menu-sidebar .menu-section { min-height:48px; padding:13px 12px; border-bottom:1px solid #dedede; font-size:14px; font-weight:400; color:#000000; opacity:0; transition:opacity .1s .05s; }
.menu-sidebar.show .menu-section { opacity:1; }
.menu-sidebar .menu-group-title { margin:8px 8px 2px; padding:7px 4px 3px; border-top:1px solid #dcdcdc; color:var(--heading); font-size:12px; font-weight:400; opacity:0; transition:opacity .1s .05s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.menu-sidebar .menu-group-title { font-size:14px; font-weight:600; color:#3f5664; padding-top:11px; padding-bottom:6px; }
.menu-sidebar.show .menu-group-title { opacity:1; }
.menu-sidebar .menu-item { margin:0; min-height:32px; padding:6px 12px; border-radius:0; cursor:pointer; color:#888; font-size:12px; display:flex; align-items:center; gap:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; opacity:0; transition:opacity .1s .05s, background .12s, color .12s; }
.menu-sidebar.show .menu-item { opacity:1; }
.menu-sidebar .menu-item:hover { background:var(--brand-50); color:var(--heading); }
.menu-sidebar a.menu-item { text-decoration:none; }
.menu-sidebar .menu-item.active { background:transparent; color:var(--brand); font-weight:600; border-right:none; }
.menu-badge { background:var(--danger); color:#fff; padding:1px 7px; border-radius:10px; font-size:11px; font-weight:500; margin-left:auto; }

/* 主内容区 */
.main-area { position:relative; flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.top-bar { height:var(--topbar-h); background:#fff; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 18px; flex-shrink:0; }
.top-bar .breadcrumb { font-size:16px; color:#32637d; }
.top-bar .breadcrumb span { color:var(--heading); font-weight:500; }
.top-bar .user-area { display:flex; align-items:center; gap:14px; font-size:14px; }
.top-bar .user-name { font-weight:500; color:var(--heading); }
.top-bar .user-role { font-size:12px; color:var(--body); background:var(--bg-subtle); padding:3px 10px; border-radius:var(--radius-btn); }
.content-scroll { flex:1; min-width:0; padding:18px; overflow:auto; }

.content-scroll.sales-ticket-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.sales-ticket-page { flex:1; min-height:0; min-width:0; display:flex; flex-direction:column; }
.consignment-report-controls { margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; min-width:0; }
.consignment-report-toolbar { align-items:flex-start; gap:8px; }
.consignment-report-controls > input:not(.search-w) { width:120px; }
.consignment-report-controls .search-w { width:215px; }
.consignment-report-controls select { max-width:160px; }
.consignment-report-table { table-layout:fixed; width:100%; min-width:max-content; }
.consignment-report-page .consignment-report-table th, .consignment-report-page .consignment-report-table td { border:1px solid var(--border); padding:12px 10px; text-align:center; vertical-align:middle; overflow-wrap:anywhere; white-space:normal; overflow:hidden; }
.consignment-report-table th { height:42px; background:#f5f5f5; white-space:nowrap; font-weight:500; }
.consignment-report-table tbody tr { height:52px; }
.consignment-report-table tbody tr:hover { background:#e7f7fd; }
.consignment-report-page .consignment-report-table td.c-brand { color:var(--brand); font-weight:600; }
.consignment-report-table .consignment-empty { height:120px; color:var(--body); }
.consignment-report-page .sales-ticket-footer .table-totals { gap:16px; padding:10px 12px; }
.consignment-report-page .sales-ticket-table-card { border-radius:0; }
.consignment-report-page .consignment-report-table { width:100%; min-width:0!important; }
.consignment-report-page .consignment-report-table th,
.consignment-report-page .consignment-report-table td { padding:7px 3px; font-size:12px; line-height:1.45; overflow-wrap:anywhere; white-space:normal; }
.consignment-report-page .consignment-report-table th { height:36px; }
.consignment-report-page .consignment-report-table tbody tr { height:42px; }
.consignment-statistics-page .consignment-report-controls > select { width:140px; min-width:0; }
.consignment-details-page .consignment-report-controls { flex:1 1 600px; }
.consignment-details-page .consignment-report-controls > select { width:120px; min-width:0; }
.consignment-details-page .consignment-report-controls > select[aria-label="存取类型"] { width:120px; }
.consignment-search { display:flex; align-items:center; gap:0; max-width:100%; }
.consignment-search select { width:76px; padding-left:8px; padding-right:20px; border-radius:var(--radius-input) 0 0 var(--radius-input); }
.consignment-search .search-w { width:196px; min-width:0; height:38px; padding:8px 12px; border:1px solid var(--border); background:#fff; color:var(--heading); font:14px var(--font); border-radius:0 var(--radius-input) var(--radius-input) 0; }
.consignment-search .search-w:focus { outline:none; border-color:var(--brand); }
.consignment-details-page .sales-date-picker .sales-date-menu { right:0; left:auto; }
.consignment-report-page .sales-ticket-footer { flex-wrap:wrap; overflow:visible; }
.consignment-report-page .sales-ticket-footer .table-totals { flex-wrap:wrap; gap:12px; padding:8px; }
.sales-ticket-page .sales-ticket-filter { flex:0 0 auto; margin-bottom:0; border-bottom:0; }
.sales-ticket-page .sales-ticket-table-card { flex:1 1 0; min-height:0; max-height:none; display:flex; flex-direction:column; padding:0; margin-bottom:0; overflow:hidden; }
.sales-ticket-table-card .table-scroll { flex:1 1 auto; min-height:0; max-height:none; overflow:auto; }
.sales-tickets-table th { position:sticky; top:0; z-index:1; }
.sales-ticket-footer { z-index:5; flex:0 0 auto; margin-top:0; display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; overflow-x:auto; border:1px solid var(--border); background:#f5f5f5; }
.sales-ticket-footer .table-totals { margin:0; padding:6px 8px; border:0; border-radius:0; gap:5px; flex:0 0 auto; flex-wrap:nowrap; white-space:nowrap; font-size:11px; }
.sales-ticket-footer .table-totals .total-item { gap:3px; }
.sales-ticket-footer .table-totals .total-label { font-size:11px; }
.sales-ticket-footer .table-totals .total-value { font-size:12px; }
.sales-ticket-footer .table-totals .total-divider { height:14px; }
.sales-ticket-footer .pagination { margin:0; padding:5px 6px; gap:3px; flex:0 0 auto; flex-wrap:nowrap; white-space:nowrap; font-size:11px; }
.sales-ticket-footer .pagination .page-btn { padding:5px 4px; border:0; background:transparent; font-size:11px; }
.sales-ticket-footer .pagination .page-info { padding:0 2px; font-size:11px; }
.sales-ticket-footer .pagination select { padding:4px; border:1px solid var(--border); background:var(--bg); color:var(--body); font-size:11px; }
.sales-ticket-footer .sales-page-input { width:30px; height:24px; padding:2px; text-align:center; border:1px solid var(--border); color:var(--brand); background:#fff; font-size:11px; }
.sales-document-page .sales-ticket-footer .table-totals { align-items:center; gap:0; padding:6px 10px; font-size:12px; line-height:20px; }
.sales-document-page .sales-ticket-footer .table-totals .total-item { align-items:center; gap:4px; height:20px; }
.sales-document-page .sales-ticket-footer .table-totals .total-label { color:var(--body); font-size:12px; line-height:20px; }
.sales-document-page .sales-ticket-footer .table-totals .total-value { color:var(--body) !important; font-size:12px; font-weight:400; line-height:20px; }
.sales-document-page .sales-ticket-footer .table-totals .total-label .sales-ticket-link { color:var(--brand); font-size:12px; line-height:20px; }
.sales-document-page .sales-ticket-footer .table-totals .total-divider { height:14px; margin:0 12px; background:var(--border); }
.sales-goods-filter { flex:0 0 auto; margin-bottom:0; border-bottom:0; }
.sales-goods-filter .sales-ticket-controls { margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.sales-goods-filter .sales-ticket-controls select, .sales-goods-filter .sales-ticket-controls input { height:32px; min-height:32px; padding:4px 8px; font-size:12px; }
.sales-goods-filter .sales-flow-input { width:190px; min-width:140px; }
.sales-goods-advanced-filter { top:45px; right:10px; }
.sales-goods-statistics-card { flex:1 1 0; min-height:0; padding:0; margin:0; overflow:hidden; border-radius:0; }
.sales-goods-statistics-card .table-scroll { height:100%; overflow:auto; }
.sales-goods-statistics-table { width:100%; min-width:1180px; table-layout:fixed; }
.sales-goods-statistics-table th { position:sticky; top:0; z-index:1; height:38px; padding:6px 4px; text-align:center; white-space:nowrap; }
.sales-goods-statistics-table td { height:40px; padding:6px 4px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sales-goods-statistics-table .sales-goods-actions { white-space:normal; line-height:1.35; }
.sales-goods-statistics-table .sales-goods-actions .sale-print-link { margin:0 3px; }
.sales-goods-statistics-table .table-empty { height:180px; color:var(--body); }
.sales-goods-footer { flex-wrap:wrap; overflow:visible; }
.sales-goods-footer .table-totals { gap:12px; padding:8px 10px; flex-wrap:wrap; }
.product-sales-page { position:relative; }
.product-sales-page .sales-goods-statistics-table { width:100%; font-size:12px; }
.product-sales-page .sales-goods-statistics-table th,.product-sales-page .sales-goods-statistics-table td { border:1px solid var(--border); font-size:12px; font-weight:400; color:var(--heading); }
.product-sales-page .sales-goods-statistics-table td:nth-child(3) { text-align:left; }
.product-sales-page .sales-goods-statistics-table .sales-goods-actions { white-space:nowrap; }
.product-sales-page .sales-goods-statistics-card { display:flex; }
.product-sales-page .sales-goods-statistics-card .table-scroll { flex:1; min-height:0; max-height:none; }
.product-sales-page .sales-goods-footer .table-totals { font-size:12px; flex:1 1 700px; white-space:normal; }
.product-sales-page .sales-goods-footer .pagination { margin-left:auto; }
.product-sales-sort { border:0; background:transparent; padding:0; cursor:pointer; font:inherit; color:inherit; }
.product-sales-sort span { margin-left:5px; color:var(--brand); font-size:10px; }
.product-sales-panel-close { float:right; background:none; border:0; color:var(--body); cursor:pointer; font-size:20px; line-height:1; }
.product-sales-modal-layer { position:absolute; inset:0; z-index:1090; padding:20px; display:flex; justify-content:center; align-items:center; background:#0008; }
.product-sales-modal { width:1100px; max-width:100%; height:80%; max-height:100%; display:flex; flex-direction:column; background:#fff; box-shadow:var(--shadow-lg); color:var(--heading); font-size:12px; }
.product-sales-modal header { padding:10px 14px; min-height:44px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); gap:12px; flex-wrap:wrap; }
.product-sales-modal header > div { display:flex; align-items:center; gap:16px; }
.product-sales-modal header label { display:flex; align-items:center; gap:4px; }
.product-sales-close { border:0; background:none; color:#777; font-size:24px; cursor:pointer; }
.product-sales-modal-body { min-height:0; flex:1; display:flex; flex-direction:column; overflow:auto; }
.product-sales-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding:24px; font-size:14px; }
.product-sales-modal-body > p { margin:10px 22px; color:var(--body); }
.product-sales-member-scroll { flex:1; min-height:0; overflow:auto; }
.product-sales-member-table { width:100%; table-layout:fixed; font-size:12px; }
.product-sales-member-table th { position:sticky; top:0; background:#f5f5f5; z-index:1; }
.product-sales-member-table th,.product-sales-member-table td { padding:8px; height:40px; border:1px solid var(--border); text-align:center; font-size:12px; font-weight:400; white-space:normal; overflow-wrap:anywhere; }
.product-sales-member-pager { padding:9px 14px; display:flex; align-items:center; justify-content:flex-end; gap:12px; border-top:1px solid var(--border); }
.product-sales-chart-heading { display:flex; align-items:center; gap:18px; justify-content:space-between; padding:16px 22px 8px; flex-wrap:wrap; }
.product-sales-chart-heading h2 { color:var(--brand); font-size:18px; margin:0; }
.product-sales-legend { display:flex; gap:14px; flex-wrap:wrap; }
.product-sales-legend button { display:flex; align-items:center; gap:5px; border:0; padding:0; background:none; cursor:pointer; font:inherit; color:var(--heading); }
.product-sales-legend button::before { content:''; width:22px; height:12px; background:var(--metric-color); border-radius:2px; }
.product-sales-legend button.muted { opacity:.35; }
.product-sales-chart { min-height:0; flex:1; overflow:auto; padding:0 12px; }
.product-sales-chart svg { display:block; min-height:360px; height:100%; }
.product-sales-chart-note { font-size:12px; }
@media(max-width:1100px) { .product-sales-modal-layer { padding:12px; } .product-sales-modal { height:88%; } .product-sales-summary { grid-template-columns:1fr; } }

/* ===== 卡片 ===== */
.card { background:var(--bg); border-radius:var(--radius-card); border:1px solid var(--border); padding:18px 20px; margin-bottom:14px; box-shadow:var(--shadow-sm); }
.card-header { font-size:16px; font-weight:500; color:var(--heading); padding-bottom:12px; border-bottom:1px solid var(--border); margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; }

/* ===== 统计卡片（4列） ===== */
.stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:22px; }
.stats-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:18px; margin-bottom:22px; }
.stat-card { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-card); padding:20px 22px; box-shadow:var(--shadow-sm); transition:transform .15s,box-shadow .15s; }
.stat-card:hover { border-color:#bcdcec; }
.stat-card .stat-label { font-size:13px; color:var(--body); margin-bottom:6px; }
.stat-card .stat-value { font-size:30px; font-weight:700; color:var(--heading); font-variant-numeric:tabular-nums; letter-spacing:-.5px; }
.stat-card .stat-value.c-brand { color:var(--brand); } .stat-card .stat-value.c-success { color:var(--success); }
.stat-card .stat-value.c-danger { color:var(--danger); }
.stat-change { font-size:12px; margin-top:4px; }
.stat-change.up { color:var(--success); } .stat-change.down { color:var(--danger); }

/* ===== 数据表格（Stripe风格） ===== */
.data-table { width:100%; border-collapse:collapse; }
.table-scroll { width:100%; overflow-x:auto; }
.table-scroll .data-table { min-width:1180px; }
.prepaid-rule-card .table-scroll { overflow-x:hidden; }
.prepaid-rule-card .data-table { width:100%; min-width:0; table-layout:fixed; }
.prepaid-rule-card th, .prepaid-rule-card td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:8px 5px; }
.prepaid-rule-card th:nth-child(1) { width:120px; }
.prepaid-rule-card th:nth-child(2) { width:76px; }
.prepaid-rule-card th:nth-child(3) { width:auto; }
.prepaid-rule-card th:nth-child(4), .prepaid-rule-card th:nth-child(5) { width:80px; }
.prepaid-rule-card th:nth-child(6), .prepaid-rule-card th:nth-child(7), .prepaid-rule-card th:nth-child(8) { width:83px; }
.prepaid-rule-card th:nth-child(9), .prepaid-rule-card th:nth-child(10) { width:100px; }
.prepaid-rule-card th:nth-child(11) { width:56px; }
.prepaid-rule-card td:nth-child(1) { white-space:nowrap; }
.prepaid-rule-card td:nth-child(n+4):nth-child(-n+8) { text-align:center; }
.prepaid-rule-card th:first-child, .prepaid-rule-card td:first-child { text-align:center; vertical-align:middle; }
.prepaid-rule-card .btn-sm { padding:5px 7px; }
.prepaid-editor-overlay { padding:20px; box-sizing:border-box; }
.modal-box.prepaid-editor-modal { width:min(980px,94vw); max-width:980px; max-height:90vh; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.prepaid-editor-header, .prepaid-editor-footer { padding:18px 24px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; }
.prepaid-editor-header { border-bottom:1px solid var(--border); }
.prepaid-editor-header .modal-title { margin:0 0 4px; }
.prepaid-editor-body { padding:20px 24px; overflow-y:auto; min-height:0; }
.prepaid-editor-footer { border-top:1px solid var(--border); justify-content:flex-end; }
.gift-component-group { border:1px solid var(--border); border-radius:8px; margin:12px 0; overflow:hidden; }
.gift-component-heading { display:flex; align-items:center; gap:14px; padding:12px 14px; background:var(--brand-10); }
.gift-component-heading button { margin-left:auto; }
.gift-component-empty { padding:14px; color:var(--muted); }
.prepaid-editor-modal .gift-component-group .data-table { table-layout:fixed; width:100%; min-width:0; }
.gift-component-table th:first-child { width:36%; }
.gift-component-table th:nth-child(2) { width:30%; }
.gift-component-table th:last-child { width:14%; }
.gift-component-table td { overflow-wrap:anywhere; }
.gift-component-value { width:100%; max-width:140px; padding:8px; border:1px solid var(--border); border-radius:6px; background:#fff; box-sizing:border-box; }
.prepaid-rule-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.prepaid-rule-fields .form-group { margin:0; min-width:0; }
.prepaid-rule-fields input, .prepaid-rule-fields select { width:100%; box-sizing:border-box; }
.prepaid-editor-modal .rule-store-list { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:135px; }
.prepaid-scope { border-top:1px solid var(--border); padding-top:18px; }
.prepaid-scope h3 { margin:0 0 12px; font-size:15px; }
.prepaid-scope-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:8px 0 16px; }
.prepaid-scope-options label { display:flex; align-items:center; gap:10px; cursor:pointer; padding:12px; border:1px solid var(--border); border-radius:7px; }
.prepaid-scope-options label:has(input:checked) { border-color:var(--brand); background:var(--brand-50); }
.prepaid-scope-options strong, .prepaid-scope-options small { display:block; }
.prepaid-scope-options strong { font-size:14px; }
.prepaid-scope-options small { margin-top:4px; font-size:12px; color:var(--body); }
.prepaid-scope-options input { accent-color:var(--brand); }
.prepaid-selection-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.prepaid-scope-empty { padding:14px; background:#f7f9fb; border-radius:6px; color:var(--body); margin-bottom:10px; }
.prepaid-scope-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; max-height:90px; overflow:auto; }
.prepaid-scope-chips span { padding:3px 7px; border-radius:5px; background:var(--brand-50); color:var(--brand); }
.prepaid-scope-chips button { border:0; background:none; color:inherit; margin-left:8px; cursor:pointer; }
.prepaid-selected-table { max-height:250px; overflow:auto; margin-bottom:10px; }
.prepaid-selected-table .data-table { width:100%; table-layout:fixed; }
.prepaid-selected-table td { overflow-wrap:anywhere; }
.prepaid-selected-table th:first-child { width:32%; }
.prepaid-selected-table th:last-child { width:60px; }
.prepaid-selected-table th { position:sticky; top:0; z-index:1; }
.prepaid-rule-notes { margin-top:16px; line-height:1.6; }
.coupon-editor-section { padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--border); }
.coupon-editor-section h3 { margin:0 0 14px; font-size:15px; }
.coupon-editor-section .prepaid-rule-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.coupon-editor-section:has(+ .prepaid-scope) { margin-bottom:0; border-bottom:0; }
.coupon-editor-section input[readonly] { background:#f7f9fb; }
.coupon-editor-section input:not([type]) { min-height:40px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-input); color:var(--heading); font:inherit; }
.modal-overlay.prepaid-scope-picker { z-index:2100; padding:20px; box-sizing:border-box; }
.modal-box.prepaid-scope-picker-box { width:900px; max-width:100%; height:min(720px,calc(100vh - 40px)); padding:0; display:flex; flex-direction:column; overflow:hidden; }
.prepaid-scope-picker-head, .prepaid-scope-picker-filters, .prepaid-scope-picker-footer { padding:15px 20px; display:flex; align-items:center; gap:10px; flex:none; }
.prepaid-scope-picker-head { justify-content:space-between; border-bottom:1px solid var(--border); }
.prepaid-scope-picker-head .modal-title { margin:0; }
.prepaid-scope-picker-filters { border-bottom:1px solid var(--border); }
.prepaid-scope-picker-filters input { flex:1; min-width:0; }
.prepaid-scope-picker-filters .form-input { padding:10px 12px; border:1px solid var(--border); border-radius:6px; background:#fff; color:var(--heading); font:inherit; box-sizing:border-box; }
.prepaid-scope-picker-filters .form-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-10); }
.prepaid-scope-picker-filters select { width:170px; }
.prepaid-scope-picker-list { flex:1; min-height:0; overflow:auto; padding:16px 20px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-content:start; }
.prepaid-picker-item { display:flex; gap:10px; align-items:flex-start; min-height:52px; padding:12px; border:1px solid var(--border); border-radius:8px; cursor:pointer; overflow-wrap:anywhere; }
.prepaid-goods-picker .prepaid-picker-item { flex-direction:row-reverse; justify-content:space-between; min-height:125px; }
.prepaid-goods-picker .prepaid-picker-item strong { min-height:38px; margin-bottom:8px; }
.prepaid-picker-item.selected { border-color:var(--brand); }
.prepaid-picker-item:hover, .prepaid-picker-item.selected { background:var(--brand-50); }
.prepaid-picker-item input { accent-color:var(--brand); flex:none; }
.prepaid-picker-item span { min-width:0; }
.prepaid-picker-item strong { display:block; font-size:13px; }
.prepaid-picker-item small { display:block; color:var(--body); }
.prepaid-scope-picker-footer { border-top:1px solid var(--border); justify-content:flex-end; }
.prepaid-picker-count { margin-right:auto; }
@media (max-width:700px) {
    .prepaid-rule-fields, .prepaid-scope-options, .prepaid-editor-modal .rule-store-list, .prepaid-scope-picker-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .prepaid-editor-body, .prepaid-editor-header, .prepaid-editor-footer { padding:14px; }
    .prepaid-scope-picker-filters { flex-wrap:wrap; }
    .prepaid-scope-picker-filters select { width:100%; }
}
@media (max-width:440px) {
    .prepaid-rule-fields, .prepaid-scope-options, .prepaid-editor-modal .rule-store-list, .prepaid-scope-picker-list { grid-template-columns:minmax(0,1fr); }
    .prepaid-scope-picker-footer { padding:12px; gap:6px; flex-wrap:wrap; }
}
.btn.prepaid-card-count { min-width:42px; font-weight:700; border:1px solid transparent; border-radius:6px; }
.btn.prepaid-card-count-made { color:#fff; background:#0369a1; border-color:#0369a1; }
.btn.prepaid-card-count-pending { color:#92400e; background:#fff3d6; border-color:#f2c36b; }
.btn.prepaid-card-count-sold { color:#166534; background:#dcfce7; border-color:#86d7a4; }
.btn.prepaid-card-count-empty { color:#8a929c; background:#f5f6f8; font-weight:400; }
.btn.prepaid-card-count:hover { filter:brightness(.94); }
.btn.prepaid-rule-delete { color:#b42318; border-color:#f2b8b3; }
.btn.prepaid-rule-delete:hover { color:#912018; background:#fff1ef; border-color:#e99991; }
.prepaid-inventory-card .table-scroll { max-height:calc(100vh - 300px); min-height:240px; overflow:auto; }
.prepaid-inventory-card .data-table { width:100%; min-width:1380px; }
.prepaid-inventory-card th, .prepaid-inventory-card td { white-space:nowrap; }
.prepaid-inventory-card th { position:sticky; top:0; z-index:1; }
.prepaid-inventory-card th:first-child, .prepaid-inventory-card td:first-child { width:72px; text-align:center; }
.prepaid-inventory-card .prepaid-state-disable { color:#b42318; border-color:#f2b8b3; }
.prepaid-inventory-card .prepaid-state-disable:hover { color:#912018; background:#fff1ef; border-color:#e99991; }
.prepaid-inventory-card .prepaid-state-enable { color:#166534; border-color:#86d7a4; }
.prepaid-inventory-card .prepaid-state-enable:hover { color:#14532d; background:#dcfce7; border-color:#4ade80; }
.log-summary { max-width:260px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.data-table th { background:#f5f5f5; padding:9px 12px; font-size:13px; font-weight:400; color:#000000; border:1px solid var(--border); text-align:left; white-space:nowrap; }
.data-table td { padding:10px 12px; border:1px solid var(--border); font-size:13px; color:#000000; }
.data-table tbody tr { transition:background .1s; }
.data-table tbody tr:nth-child(even) td { background:#fafafa; }
.data-table tbody tr:hover td { background:#eff8fd; }
.data-table .td-amount { font-weight:500; font-variant-numeric:tabular-nums; }
.data-table .td-secondary { color:var(--body); font-size:13px; }
.sales-tickets-table { min-width:1640px; table-layout:fixed; }
.sales-document-page .table-scroll { overflow-x:hidden; }
.sales-document-table { width:100%; min-width:0 !important; }
.sales-document-table th, .sales-document-table td { padding:8px 4px; font-size:12px; text-align:center; overflow:hidden; text-overflow:ellipsis; }
.sales-document-table .sale-action-links { display:flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.sales-document-table .expand-trigger, .sales-document-table .sale-print-link { flex:0 0 auto; font-size:12px; }
.sales-document-table .expand-trigger { gap:2px; }
.sales-document-table .expand-trigger::before { content:none; }
.sales-document-table .sale-member-cell { text-align:center; }
.sales-date-sort { display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:0; border:0; background:none; color:inherit; font:inherit; cursor:pointer; }
.sales-date-sort:hover, .sales-date-sort:focus-visible { color:var(--brand); }
.sales-date-sort-arrows { display:flex; flex-direction:column; font-size:8px; line-height:8px; color:#b5bec5; }
.sales-date-sort-arrows .active { color:var(--brand); }
.sales-document-page .sales-ticket-filter, .sales-document-page .sales-ticket-controls { flex-wrap:wrap; }
.sales-document-page .sales-ticket-footer { flex-wrap:wrap; overflow-x:hidden; }
@media (max-width:1300px) {
    .sales-document-table .sale-action-links { flex-direction:column; gap:0; line-height:1.25; }
    .sales-document-table .td-amount { padding-left:1px; padding-right:1px; font-size:11px; }
}
.guide-detail-page .guide-detail-table { min-width:1678px; width:100%; table-layout:fixed; }
.guide-detail-page .guide-detail-table th, .guide-detail-page .guide-detail-table td { padding:10px 6px; text-align:center; vertical-align:middle; }
.guide-detail-page .guide-detail-table td { white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.guide-detail-page .guide-detail-table td:nth-child(7) { text-align:left; }
.guide-detail-page .guide-flow-link { display:block; width:100%; max-width:100%; white-space:normal; overflow-wrap:anywhere; line-height:inherit; }
.guide-detail-filter .sales-ticket-controls { gap:5px; }
.sales-ticket-page .guide-detail-filter .filter-label select { min-width:85px; max-width:130px; }
.guide-flow-link { border:0; background:transparent; color:var(--brand); cursor:pointer; font:inherit; padding:0; }
.filter-context { color:var(--body); font-size:12px; white-space:nowrap; }
.guide-commission-page .sales-ticket-filter { flex-wrap:nowrap; }
.guide-commission-page .sales-ticket-table-card { padding:0; }
.guide-commission-table { min-width:1180px; }
.sales-tickets-table th, .sales-tickets-table td { white-space:nowrap; }
.sales-tickets-table .sale-member-cell { overflow:hidden; text-overflow:ellipsis; }

/* ===== 可展开行（银豹风格） ===== */
.expand-trigger { color:var(--brand); cursor:pointer; user-select:none; font-weight:500; display:inline-flex; align-items:center; gap:3px; font-size:13px; white-space:nowrap; }
.expand-trigger::before { content:'▸'; display:inline-block; transition:transform .15s; font-size:10px; color:var(--body); }
.expand-trigger.expanded::before { transform:rotate(90deg); color:var(--brand); }
.expand-trigger.expanded { color:var(--brand-hover); }
.expand-row { display:none; background:#f7fafc; }
.expand-row.show { display:table-row; }
.expand-row td { padding:0; border-bottom:2px solid var(--brand); }
.expand-content { padding:14px 18px 16px 56px; }
.expand-section { margin-bottom:12px; font-size:13px; }
.expand-section:last-child { margin-bottom:0; }
.expand-section .expand-label { color:var(--body); font-weight:500; margin-bottom:6px; }
.expand-section .expand-value { color:var(--heading); }
.expand-section table { width:100%; margin-top:4px; background:var(--bg); border-radius:4px; overflow:hidden; border:1px solid var(--border); }
.expand-section table th { padding:6px 10px; font-size:11px; background:var(--bg-subtle); }
.expand-section table td { padding:6px 10px; border-bottom:1px solid var(--border); font-size:13px; }
.expand-section table tr:last-child td { border-bottom:none; }
.expand-section table tr:hover td { background:#eff8fd; }

/* ===== 销售单据展开子行（与主表列对齐，参考5007销售明细风格） ===== */
.sale-child-row { background:#f7fafc; }
.sales-document-table .sale-void-row td {
    text-align:right; color:var(--body); background:var(--bg);
    font-size:13px; font-weight:400; padding:10px 14px;
    border-top:0; border-bottom:1px solid var(--border);
}
.sales-document-table .sale-pay-row.sale-pay-has-note td {
    background:var(--bg); border-bottom:1px solid var(--border);
}
.sale-item-row td { padding:10px 14px; border-bottom:1px solid var(--border); font-size:13px; vertical-align:middle; }
.sale-item-row .sale-item-name {
    color:var(--brand);
    text-align:left;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:0;
}
.sales-document-table .sale-item-name { text-align:center; }
.sales-document-table .sale-item-row td { padding:10px 4px; }
.sales-document-table .sale-detail-error td { color:var(--danger); white-space:normal; padding:12px 14px; }
.sale-item-row:hover td { background:#eff8fd; }
.sale-discount-row td, .sale-pay-row td { padding:12px 14px; background:#eff8fd; font-size:13px; color:var(--body); vertical-align:middle; }
.sale-pay-row td { border-bottom:1px solid var(--border); }
.sale-discount-row .sale-pay-label, .sale-pay-row .sale-pay-label { text-align:right; font-weight:500; }
.sale-print-link { border:0; padding:0; background:none; color:var(--brand); font:inherit; cursor:pointer; }
.sale-print-link:hover { text-decoration:underline; }
.sales-ticket-link { display:inline-block; border:0; padding:0; margin:0; background:none; color:var(--brand); font:inherit; line-height:inherit; text-align:center; cursor:pointer; max-width:100%; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; white-space:nowrap; }
.sales-ticket-link:hover { text-decoration:underline; }
.sales-ticket-link:focus-visible { outline:2px solid var(--brand-10); outline-offset:2px; border-radius:3px; }
.top-bar .breadcrumb .sales-ticket-back { display:inline-flex; align-items:center; gap:4px; width:auto; max-width:none; margin-left:12px; padding:2px 6px; border:0; border-radius:3px; color:var(--brand); font-size:13px; font-weight:400; line-height:1.4; white-space:nowrap; }
.top-bar .breadcrumb .sales-ticket-back::before { content:'‹'; font-size:17px; line-height:1; }
.top-bar .breadcrumb .sales-ticket-back:hover { background:var(--brand-50); text-decoration:none; }
.top-bar .breadcrumb .sales-ticket-back:focus-visible { outline:1px solid var(--brand); outline-offset:1px; }
.sales-cashier-history { width:min(1050px, calc(100vw - 80px)); max-width:calc(100vw - 80px); }
.sales-cashier-history .data-table { white-space:nowrap; }
.sales-cashier-pagination { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:16px; }

/* ===== 底部统计行（银豹风格） ===== */
.table-totals {
    display:flex; gap:18px; align-items:center; padding:14px 18px; margin-top:14px;
    background:#f5f5f5; border:1px solid var(--border); border-radius:var(--radius-card);
    font-size:14px; color:var(--heading); flex-wrap:wrap;
}
.table-totals .total-item { display:flex; align-items:baseline; gap:6px; }
.table-totals .total-label { color:var(--body); font-size:13px; }
.table-totals .total-value { font-size:16px; font-weight:600; color:var(--heading); font-variant-numeric:tabular-nums; }
.table-totals .total-value.c-brand { color:var(--brand); }
.table-totals .total-value.c-success { color:var(--success); }
.table-totals .total-value.c-danger { color:var(--danger); }
.table-totals .total-value.c-warning { color:var(--warning); }
.table-totals .total-divider { width:1px; height:18px; background:var(--border); }

/* ===== 筛选栏 ===== */
.filter-bar { display:flex; gap:8px; align-items:center; padding:10px 12px; background:var(--bg); border:1px solid var(--border); margin-bottom:12px; flex-wrap:wrap; }
.filter-bar-actions, .filter-bar-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.filter-bar-controls { margin-left:auto; justify-content:flex-end; }
.filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="date"], .filter-bar input[type="month"] { min-height:38px; padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-input); font-size:14px; background:var(--bg); color:var(--heading); transition:border-color .15s,box-shadow .15s; font-family:var(--font); }
.filter-bar select:focus, .filter-bar input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-10); }
.search-w { min-width:200px; } .date-w { width:140px; }
.sales-ticket-filter { gap:14px; align-items:center; justify-content:space-between; padding:7px 10px; margin-bottom:10px; flex-wrap:nowrap; }
.sales-ticket-actions, .sales-ticket-controls { display:flex; align-items:center; gap:8px; min-width:0; }
.sales-ticket-controls { margin-left:auto; }
.sales-ticket-filter .filter-label { display:inline-flex; align-items:center; gap:6px; color:var(--body); font-size:13px; white-space:nowrap; }
.sales-ticket-filter .filter-label select { min-width:100px; min-height:32px; height:32px; padding:5px 24px 5px 8px; font-size:12px; }
.sales-ticket-filter .sales-flow-input { width:140px; min-width:120px; min-height:32px; height:32px; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius-input); font:12px var(--font); color:var(--heading); }
.sales-ticket-filter .sales-flow-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 2px var(--brand-10); }
.sales-ticket-filter .filter-label { gap:4px; font-size:12px; }
.sales-date-picker { position:relative; flex:0 0 auto; }
.discount-toolbar { display:flex; justify-content:space-between; gap:16px; }
.discount-toolbar-controls { display:flex; justify-content:flex-end; align-items:center; gap:6px; min-width:0; flex-wrap:wrap; }
.discount-toolbar-controls>select { width:auto; max-width:160px; min-width:100px; }
.discount-toolbar-controls .search-w { width:140px; min-width:90px; }
.discount-toolbar-controls>select, .discount-toolbar-controls>input { height:32px; min-height:32px; box-sizing:border-box; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius-input); background:#fff; color:var(--heading); font:12px var(--font); }
.discount-report-context { display:flex; justify-content:space-between; align-items:center; margin:-6px 0 12px; color:var(--body); font-size:12px; }
.filter-bar .sales-date-menu { left:0; right:auto; }
.discount-toolbar .sales-date-menu { right:0; left:auto; }
@media(max-width:1150px) {
    .discount-toolbar { gap:8px; padding:10px; }
    .discount-toolbar-controls { gap:4px; }
    .discount-toolbar-controls>select { max-width:135px; min-width:75px; padding-left:4px; padding-right:4px; }
    .discount-toolbar-controls .search-w { width:90px; }
    .discount-toolbar-controls .sales-date-trigger { min-width:196px; gap:4px; padding:5px; }
    .discount-toolbar .btn { padding-left:9px; padding-right:9px; }
}
.sales-date-trigger { min-width:210px; height:32px; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius-input); background:#fff; color:var(--heading); display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; font:12px var(--font); }
.sales-date-trigger:hover, .sales-date-picker.open .sales-date-trigger { border-color:var(--brand); }
.sales-date-chevron { color:var(--body); font-size:11px; }
.sales-date-menu { display:none; position:absolute; top:calc(100% + 5px); right:0; z-index:20; width:min(500px, calc(100vw - 24px)); padding:0; border:1px solid var(--border); background:#fff; box-shadow:var(--shadow); }
.sales-date-picker.open .sales-date-menu { display:block; }
.sales-date-layout { display:grid; grid-template-columns:minmax(0,1fr) 110px; min-height:270px; }
.sales-date-calendar { padding:12px; }
.sales-date-calendar-head { display:grid; grid-template-columns:28px 1fr 28px; align-items:center; text-align:center; padding-bottom:10px; border-bottom:1px solid var(--border); }
.sales-date-calendar-head button { border:0; background:transparent; color:var(--heading); cursor:pointer; font-size:24px; line-height:24px; }
.sales-date-calendar-head strong { font-size:14px; font-weight:600; color:var(--heading); }
.sales-date-calendar-selects { display:flex; justify-content:center; gap:6px; }
.sales-date-calendar-selects select { width:auto; min-height:27px; padding:2px 4px; border:1px solid var(--border); border-radius:var(--radius-input); background:#fff; color:var(--heading); font:12px var(--font); cursor:pointer; }
.sales-date-weekdays, .sales-date-days { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; text-align:center; }
.sales-date-weekdays { padding:9px 0 5px; color:var(--body); font-size:11px; }
.sales-date-day { min-height:28px; padding:4px 0; border:1px solid transparent; border-radius:var(--radius-btn); background:#fff; color:var(--heading); cursor:pointer; font:12px var(--font); }
.sales-date-day:hover { border-color:var(--brand); color:var(--brand); }
.sales-date-day.is-range { background:var(--brand-50); }
.sales-date-day.is-selected { background:var(--brand); color:#fff; border-color:var(--brand); }
.sales-date-day.is-empty { cursor:default; }
.sales-date-presets { grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:7px; padding:12px 10px; border-left:1px solid #cbd3da; background:#fff; }
.sales-date-calendar { grid-column:1; grid-row:1; }
.sales-date-preset { min-height:32px; padding:6px 4px; border:1px solid #b8c3cd; border-radius:var(--radius-btn); background:#fff; color:var(--body); cursor:pointer; font:12px var(--font); }
.sales-date-preset:hover { color:var(--brand); border-color:var(--brand); background:var(--brand-50); }
.sales-date-custom { display:flex; align-items:center; gap:5px; padding-top:10px; border-top:1px solid var(--border); margin-top:10px; }
.sales-date-custom .date-w { width:126px; min-width:0; min-height:30px; padding:5px 4px; border:1px solid var(--border); font:12px var(--font); color:var(--heading); background:#fff; }
.sales-ticket-filter .filter-date-separator { color:var(--body); }
.sales-detail-check { display:inline-flex; align-items:center; gap:6px; color:var(--heading); font-size:13px; white-space:nowrap; cursor:pointer; }
.sales-detail-check input { width:15px; height:15px; accent-color:var(--brand); }

/* ===== 按钮 ===== */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:32px; padding:6px 14px; border:1px solid var(--border); background:#fff; color:var(--body); border-radius:var(--radius-btn); cursor:pointer; font-size:13px; font-weight:400; font-family:var(--font); transition:background .15s, border-color .15s; line-height:1.4; white-space:nowrap; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-primary { background:var(--brand); color:#fff; border-color:var(--brand); } .btn-primary:hover:not(:disabled) { background:var(--brand-hover); border-color:var(--brand-hover); }
.btn-outline { background:var(--bg); color:var(--brand); border:1px solid var(--border); } .btn-outline:hover:not(:disabled) { border-color:var(--brand); background:var(--brand-50); }
.btn-ghost { background:transparent; color:var(--body); border-color:transparent; } .btn-ghost:hover:not(:disabled) { background:var(--bg-subtle); color:var(--heading); }
.btn-sm { padding:4px 10px; font-size:12px; }
.btn-success { background:var(--success); color:#fff; } .btn-success:hover:not(:disabled) { background:#10a649; }
.btn-danger { background:var(--danger); color:#fff; } .btn-danger:hover:not(:disabled) { background:#d01d57; }

/* ===== 表单 ===== */
input.form-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select.form-input, textarea.form-input {
    min-width:0; min-height:38px; padding:8px 10px;
    border:1px solid #b8c4d1; border-radius:var(--radius-input);
    background:var(--bg); color:var(--heading); font:inherit;
    transition:border-color .15s, box-shadow .15s;
}
input.form-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover, select.form-input:hover, textarea.form-input:hover { border-color:#879bab; }
input.form-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus, select.form-input:focus, textarea.form-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-10); }
input.form-input[readonly], textarea.form-input[readonly], input.form-input:disabled, select.form-input:disabled, textarea.form-input:disabled { background:var(--bg-subtle); color:var(--body); }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:13px; font-weight:500; color:var(--heading); margin-bottom:5px; }
.form-hint { font-size:12px; color:var(--body); margin-top:4px; }
.form-group input[type="text"], .form-group input[type="number"], .form-group input[type="date"],
.form-group input[type="password"], .form-group input[type="email"],
.form-group select, .form-group textarea {
    width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius-input);
    font-size:14px; font-family:var(--font); color:var(--heading); background:var(--bg);
    transition:border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-10); }
.form-group input::placeholder, .form-group textarea::placeholder { color:#c4cdd5; }
.form-group.product-stock-field input:disabled { background:#f0f2f5; color:#7b8491; border-color:var(--border); cursor:not-allowed; opacity:1; }
.guide-profile-modal .form-group input:not([type="checkbox"]) { width:100%; box-sizing:border-box; min-height:38px; padding:8px 10px; border:1px solid #aebdca; border-radius:6px; background:#fff; color:var(--heading); }
.guide-profile-modal .form-group input[readonly] { background:#f4f6f8; color:#647383; }
.guide-profile-modal .form-group input:not([readonly]):focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-10); }
.form-group textarea { resize:vertical; min-height:70px; }
.form-group select { cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748d'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:28px; }
.form-row { display:flex; gap:14px; } .form-row .form-group { flex:1; }
.rule-store-picker { border:1px solid #dbe4ec; border-radius:10px; background:#f8fafc; padding:10px; }
.rule-store-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.rule-store-toolbar .form-input { flex:1; margin:0; }
.rule-store-list { max-height:190px; overflow:auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:4px; }
.rule-store-option { display:flex!important; align-items:center; gap:8px; padding:9px 10px; margin:0!important; border:1px solid #e2e8f0; border-radius:8px; background:#fff; cursor:pointer; font-size:13px!important; font-weight:400!important; }
.rule-store-option:has(input:checked) { border-color:var(--brand); background:#eef8ff; color:var(--brand); }
.rule-store-option input { accent-color:var(--brand); width:16px; height:16px; }
.form-error { color:var(--danger); font-size:12px; margin-top:4px; }

/* ===== 状态标签 ===== */
.tag { display:inline-block; padding:2px 8px; border-radius:3px; font-size:12px; font-weight:500; line-height:1.6; }
.tag-success { background:var(--success-bg); color:#0d8a3e; }
.tag-danger { background:var(--danger-bg); color:#c41852; }
.tag-warning { background:var(--warning-bg); color:#b0780e; }
.tag-info { background:var(--info-bg); color:#1d5fcd; }
.tag-default { background:#f1f4f8; color:var(--body); }

/* ===== 分页 ===== */
.pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:18px; }
.pagination .page-btn { padding:6px 12px; border:1px solid var(--border); border-radius:var(--radius-btn); background:var(--bg); color:var(--body); cursor:pointer; font-size:13px; font:inherit; line-height:1; transition:all .12s; }
.pagination .page-btn:hover:not(.active):not(:disabled) { border-color:var(--brand); color:var(--brand); }
.pagination .page-btn.active { background:var(--brand); color:#fff; border-color:var(--brand); }
.pagination .page-btn:disabled { opacity:.4; cursor:not-allowed; }
.pagination .page-info { font-size:13px; color:var(--body); padding:0 4px; }

/* ===== Toast 通知 ===== */
.toast-container { position:fixed; inset:0; z-index:2000; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:20px; pointer-events:none; }
.toast { display:flex; align-items:center; gap:10px; padding:14px 18px; background:var(--bg); border-radius:8px; border:1px solid var(--border); box-shadow:var(--shadow-lg); font-size:14px; color:var(--heading); animation:toast-in .2s ease-out; min-width:280px; max-width:min(520px, calc(100vw - 40px)); pointer-events:auto; }
.toast-success { border-left:3px solid var(--success); } .toast-error { border-left:3px solid var(--danger); }
.toast-warning { border-left:3px solid var(--warning); }
.toast-close { margin-left:auto; cursor:pointer; color:var(--body); background:none; border:none; font-size:18px; line-height:1; }
@keyframes toast-in { from{opacity:0;transform:scale(.94) translateY(8px)} to{opacity:1;transform:scale(1) translateY(0)} }

/* ===== 模态框 ===== */
.modal-overlay { position:fixed; inset:0; background:rgba(6,27,49,0.5); display:flex; align-items:center; justify-content:center; z-index:1000; animation:fade-in .15s ease-out; }
.modal-overlay.closing { animation:fade-out .12s ease-in forwards; }
.modal-box { background:var(--bg); border-radius:8px; padding:28px 28px 22px; width:520px; max-width:92vw; max-height:85vh; overflow-y:auto; box-shadow:var(--shadow-lg); animation:scale-in .15s ease-out; }
.menu-permission-modal { width:820px; }
.new-employee-menu-permissions { border-top:1px solid var(--border); margin-top:16px; padding-top:14px; }
.menu-permission-section { border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.menu-permission-section-title { display:flex; align-items:center; justify-content:space-between; color:var(--heading); font-weight:700; margin-bottom:8px; }
.menu-permission-group-title { color:var(--body); font-size:12px; font-weight:600; margin:8px 0 5px; }
.menu-permission-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px 12px; }
.menu-permission-option { display:flex; align-items:center; gap:6px; min-width:0; font-size:13px; color:var(--heading); }
.menu-permission-option small { color:var(--body); font-size:10px; margin-left:auto; }
.menu-permission-option input { accent-color:var(--brand); }
.menu-permission-option.permission-planned { color:var(--body); opacity:.62; }
.modal-box.closing { animation:scale-out .12s ease-in forwards; }
.modal-box .modal-title { font-size:18px; font-weight:600; color:var(--heading); margin-bottom:20px; }
.pkg-items-modal { width:min(1100px,94vw); max-width:1100px; height:min(760px,88vh); max-height:88vh; display:flex; flex-direction:column; padding:0; overflow:hidden; }
.pkg-items-header, .pkg-items-footer { padding:16px 22px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.pkg-items-header { border-bottom:1px solid var(--border); }
.pkg-items-header .modal-title { margin:0; }
.pkg-items-footer { border-top:1px solid var(--border); justify-content:flex-end; gap:10px; }
.pkg-items-list { flex:1; min-height:0; overflow:auto; padding:18px 22px; }
.pkg-items-list .data-table { min-width:730px; }
.pkg-items-summary { flex-shrink:0; padding:12px 22px; background:var(--bg-subtle); font-size:13px; }
.package-management-card .card-header { gap:16px; flex-wrap:wrap; }
.package-management-card .card-title { font-size:16px; font-weight:600; margin-bottom:4px; }
.package-management-card .card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.package-management-card #pkgPagination { padding-bottom:4px; }
.package-list-filter .sales-ticket-controls { justify-content:flex-end; gap:6px; }
.package-list-filter select,.package-list-filter input[type="text"] { height:32px; min-height:32px; padding:5px 8px; font-size:12px; }
.package-list-filter select { width:140px; }
.package-list-filter input[type="text"] { width:180px; min-width:100px; }
.package-list-filter .btn { height:32px; padding:5px 12px; font-size:12px; }
.package-list-table th,.package-list-table td { white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.package-list-table .td-secondary { font-size:12px; }
.package-action-links { display:flex; align-items:center; justify-content:center; gap:7px; flex-wrap:wrap; }
.package-action-link { border:0; padding:0; background:transparent; color:var(--brand); font:inherit; cursor:pointer; white-space:nowrap; }
.package-action-link:hover { text-decoration:underline; }
.package-delete-link { color:var(--accent); }
.package-list-table .badge { max-width:100%; white-space:normal; padding:2px 4px; }
.package-editor-modal { width:min(860px,94vw); max-width:860px; max-height:90vh; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.package-editor-header { padding:20px 24px 16px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex:none; }
.package-editor-header .modal-title { margin:0 0 4px; }
.package-editor-body { padding:20px 24px; overflow-y:auto; min-height:0; }
.package-editor-footer { margin:0; padding:16px 24px; flex:none; }
.package-store-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.package-store-heading strong { font-size:13px; }
.pkg-store-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; max-height:210px; overflow:auto; }
.pkg-store-grid label { display:flex; align-items:center; gap:7px; padding:9px 10px; border:1px solid var(--border); border-radius:var(--radius-input); cursor:pointer; font-weight:400; }
.pkg-store-grid label:has(input:checked) { border-color:var(--brand); background:var(--brand-50); color:var(--brand); }
.pkg-store-grid input { accent-color:var(--brand); }
@media (max-width:700px) {
    .package-editor-body > div:first-child { grid-template-columns:1fr!important; }
    .pkg-store-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.modal-footer { display:flex; gap:10px; justify-content:flex-end; margin-top:22px; padding-top:16px; border-top:1px solid var(--border); }
.prepaid-dialog-overlay { z-index:2100; padding:20px; box-sizing:border-box; }
.prepaid-dialog-box { width:460px; max-width:100%; box-sizing:border-box; }
.prepaid-dialog-message { color:var(--body); line-height:1.7; white-space:pre-line; overflow-wrap:anywhere; }
.sync-modal-overlay { padding:24px; box-sizing:border-box; }
.sync-confirm-overlay { z-index:1200; padding:24px; box-sizing:border-box; }
.sync-confirm-modal { width:460px; max-width:100%; }
.sync-modal { width:560px; max-width:100%; max-height:min(720px,calc(100vh - 48px)); padding:0; overflow:hidden; display:flex; flex-direction:column; }
.sync-modal .modal-title { margin:0; padding:22px 24px 12px; font-size:19px; }
.sync-modal .modal-title, .sync-modal-description, .sync-select-all, .sync-modal .modal-footer { flex-shrink:0; }
.sync-modal .sync-store-list { min-height:0; }
.product-setting-modal input, .product-setting-modal select { width:100%; box-sizing:border-box; min-height:38px; padding:8px 10px; border:1px solid #b8c4d1; border-radius:6px; background:#fff; color:var(--heading); }
.sync-modal-description { padding:0 24px 16px; color:var(--body); font-size:13px; line-height:1.7; }
.sync-select-all { display:flex; align-items:center; gap:9px; margin:0 24px; padding:12px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); font-weight:600; color:var(--heading); }
.sync-select-all input, .sync-store-row input { width:16px; height:16px; accent-color:var(--brand); flex:none; }
.sync-store-list { margin:0 24px; max-height:360px; overflow-y:auto; border-bottom:1px solid var(--border); }
.sync-store-row { display:flex; align-items:center; gap:10px; min-height:46px; padding:0 10px; border-bottom:1px solid var(--border); cursor:pointer; color:var(--heading); }
.sync-store-row:last-child { border-bottom:0; }
.sync-store-row:hover { background:var(--bg-subtle); }
.catalog-sync-group { padding:8px 10px; background:var(--bg-subtle); color:var(--body); font-size:12px; font-weight:600; }
.sync-modal .modal-footer { margin:0; padding:16px 24px 20px; border-top:0; background:var(--bg-subtle); }
.content-scroll.product-list-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.product-list-page { position:relative; flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }
.sales-trend-page { max-width:1500px; margin:0 auto; }
.trend-page-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.trend-page-heading h2 { margin:0; font-size:19px; font-weight:500; }
.trend-page-heading > span { font-size:12px; color:var(--muted); }
.trend-report { background:#fff; border:1px solid var(--border); }
.trend-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 20px; background:#fafbfc; border-bottom:1px solid var(--border); }
.trend-toolbar > strong { font-size:16px; font-weight:500; white-space:nowrap; }
.trend-toolbar-controls { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.trend-toolbar select { height:34px; background:#fff; border:1px solid #aeb9c5; padding:4px 8px; border-radius:4px; }
.trend-store-picker { position:relative; width:155px; font-size:12px; }
.trend-store-picker summary { display:flex; align-items:center; justify-content:space-between; height:34px; padding:4px 10px; border:1px solid #aeb9c5; border-radius:4px; cursor:pointer; background:#fff; list-style:none; }
.trend-store-picker summary::after { content:'▾'; }
.trend-store-panel { position:absolute; right:0; top:38px; width:235px; z-index:30; background:#fff; border:1px solid #aeb9c5; border-radius:5px; box-shadow:0 6px 18px #0002; }
.trend-store-options { max-height:280px; overflow:auto; border-block:1px solid var(--border); }
.trend-store-options label { display:flex; align-items:center; gap:9px; padding:9px 12px; cursor:pointer; }
.trend-store-options label:hover { background:#f4f8fb; }
.trend-store-actions { display:flex; justify-content:space-between; gap:12px; padding:8px 10px; }
.trend-store-actions > button:not(.btn) { border:0; background:none; color:var(--brand); cursor:pointer; }
.sales-ticket-store-picker { flex-shrink:0; }
.sales-ticket-store-picker summary { gap:10px; }
.sales-ticket-store-picker .trend-store-panel { max-width:calc(100vw - 24px); }
.sales-ticket-store-picker .trend-store-options { max-height:min(280px, 45vh); }
.sales-ticket-store-picker .trend-store-options input { width:auto; flex-shrink:0; }
.sales-ticket-store-picker .trend-store-actions { align-items:center; }
.trend-section { padding:26px 24px 14px; }
.trend-section + .trend-section { border-top:1px solid var(--border); }
.trend-section h3 { margin:0 0 16px; padding-left:10px; border-left:4px solid #9aa5ae; font-size:18px; font-weight:500; }
.trend-chart-toolbar { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:14px; margin-bottom:12px; }
.trend-legend { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; flex:1; }
.trend-legend button { background:none; border:0; padding:4px 0; display:flex; align-items:center; gap:5px; font-size:12px; color:var(--body); cursor:pointer; }
.trend-legend i,.trend-tooltip i { display:inline-block; width:16px; height:10px; border-radius:3px; }
.trend-legend .is-hidden { opacity:.4; }
.trend-chart-actions { display:flex; gap:7px; }
.trend-chart-actions button { background:none; border:1px solid #d6dde3; border-radius:4px; width:28px; height:28px; color:#67737e; font-size:18px; cursor:pointer; }
.trend-chart { position:relative; overflow:auto; min-height:330px; }
.trend-chart svg { display:block; width:100%; min-width:680px; height:350px; }
.trend-chart-empty { height:320px; display:flex; align-items:center; justify-content:center; color:var(--muted); }
.trend-tooltip { position:absolute; pointer-events:none; background:#34414beF; color:#fff; padding:12px; border-radius:6px; font-size:12px; z-index:3; min-width:205px; }
.trend-tooltip strong,.trend-tooltip span { display:block; margin:3px 0; }
.trend-tooltip i { width:8px; height:8px; margin-right:5px; }
.trend-table-scroll { overflow:auto; margin-top:12px; max-height:440px; border:1px solid var(--border); }
.trend-table { min-width:700px; table-layout:fixed; }
.trend-table th,.trend-table td { text-align:center; font-size:12px; padding:12px 6px; }
.trend-table th { position:sticky; top:0; background:#f8f9fb; z-index:1; }
.trend-table tfoot td { background:#fafbfc; font-weight:600; border-top:1px solid var(--border); position:sticky; bottom:0; }
.trend-table th:first-child { width:6%; }
.trend-table th:nth-child(2) { width:19%; }
.trend-download { text-align:center; border:1px solid var(--border); border-top:0; padding:5px; }
.trend-source-note { margin:8px 24px 20px; font-size:12px; color:var(--muted); line-height:1.8; }
.trend-error { margin:14px 24px; padding:10px 12px; border:1px solid #edc7bf; border-radius:4px; background:#fff6f3; color:#a43828; }
@media(max-width:1100px) { .trend-toolbar { flex-wrap:wrap; padding:12px; } .trend-toolbar-controls { margin-left:auto; } .trend-section { padding:20px 12px 12px; } .trend-page-heading { flex-wrap:wrap; } }
.member-assignment-page { background:#fff; }
.assignment-filters { display:flex; justify-content:flex-end; align-items:flex-end; flex-wrap:wrap; gap:10px; padding:12px; border-bottom:1px solid var(--border); }
.assignment-filters #assignmentReset { margin-right:auto; }
.assignment-store-field { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--body); }
.assignment-store-picker { position:relative; width:155px; }
.assignment-store-picker summary { height:34px; display:flex; align-items:center; justify-content:space-between; border:1px solid #aeb9c5; border-radius:5px; padding:5px 9px; background:#fff; cursor:pointer; list-style:none; }
.assignment-store-picker summary::after { content:'▾'; }
.assignment-store-panel { position:absolute; top:38px; left:0; width:245px; z-index:25; background:#fff; border:1px solid #aeb9c5; border-radius:6px; box-shadow:0 5px 20px #0002; }
.assignment-store-tools { display:flex; justify-content:space-between; gap:10px; padding:8px 10px; }
.assignment-store-tools > button:not(.btn) { border:0; background:none; color:var(--brand); cursor:pointer; }
.assignment-store-options { max-height:290px; overflow:auto; border-block:1px solid var(--border); }
.assignment-filters .assignment-store-options label { flex-direction:row; align-items:center; padding:8px 12px; cursor:pointer; }
.assignment-filters .assignment-store-options label:hover { background:#f4f8fb; }
.assignment-filters #assignmentKeyword { width:200px; }
.assignment-filters label { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--body); }
.assignment-filters label[hidden] { display:none; }
.assignment-filters input,.assignment-filters select,.assignment-target select,.assignment-pager select { height:34px; padding:5px 9px; border:1px solid #aeb9c5; border-radius:5px; background:#fff; color:var(--heading); font:inherit; outline:none; }
.assignment-filters input { width:125px; min-width:0; }
.assignment-filters select { width:140px; }
.assignment-filters input:focus,.assignment-filters select:focus,.assignment-target select:focus { border-color:var(--brand); box-shadow:0 0 0 2px #22a06b18; }
.member-assignment-page .product-table-scroll { max-height:none; }
.assignment-table { table-layout:fixed; min-width:850px; }
.assignment-table th,.assignment-table td { text-align:center; font-size:12px; padding:9px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.assignment-table th { position:sticky; top:0; z-index:1; background:#f7f8fa; }
.assignment-table tbody tr.is-selected td { background:#edf8f2; }
.assignment-table .assignment-empty { height:190px; color:var(--muted); background:#fff; }
.assignment-table tbody tr:has(.assignment-empty):hover td { background:#fff; }
.assignment-table tbody tr:has(.assignment-empty):hover td { background:#fff; }
.member-assignment-page input[type="checkbox"],.member-assignment-page input[type="radio"] { accent-color:var(--brand); width:15px; height:15px; cursor:pointer; vertical-align:middle; }
.assignment-footer { padding:8px 12px; background:#fff; }
.assignment-actions,.assignment-pager { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:12px; }
.assignment-actions b { color:var(--brand); }
.assignment-dialog { width:490px; max-width:100%; max-height:calc(100% - 24px); display:flex; flex-direction:column; background:#fff; border-radius:10px; box-shadow:0 10px 40px #0003; overflow:hidden; }
.assignment-dialog header { display:flex; justify-content:space-between; align-items:center; padding:13px 20px; background:#f0f8f4; border-bottom:1px solid #d8e8df; }
.assignment-dialog-body { padding:8px 22px 14px; overflow:auto; }
.assignment-dialog-body p { font-size:13px; }
.assignment-choice { display:flex; align-items:center; flex-wrap:wrap; gap:9px; padding:13px 12px; border:1px solid #cbd4dc; border-radius:6px; margin:10px 0; cursor:pointer; font-size:14px; }
.assignment-choice:has(input:checked) { border-color:var(--brand); background:#f5fbf7; }
.assignment-choice span { flex-basis:100%; padding-left:25px; color:var(--muted); font-size:12px; }
.assignment-target { display:flex; align-items:center; gap:16px; padding:12px 0 0; font-size:13px; }
.assignment-target select { flex:1; min-width:0; }
.assignment-dialog footer { display:flex; justify-content:flex-end; gap:10px; padding:14px 22px; border-top:1px solid var(--border); }
.assignment-dialog-error { color:var(--danger); min-height:18px; }
.product-filter-bar { flex:0 0 auto; margin:0; justify-content:space-between; gap:8px; padding:7px 10px; }
.product-filter-actions, .product-filter-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.product-filter-controls { margin-left:auto; }
.product-filter-controls select, .product-filter-controls input { height:32px; min-height:32px; padding:4px 8px; font-size:12px; }
.product-filter-controls .search-w { width:190px; min-width:140px; }
.advanced-search-control { position:relative; display:inline-flex; flex:0 0 auto; align-items:center; }
.advanced-search-control > [aria-expanded="true"] { padding-right:30px; }
.advanced-search-close { position:absolute; right:2px; top:2px; bottom:2px; width:26px; padding:0; border:0; background:transparent; color:var(--muted); font:inherit; font-size:20px; line-height:1; cursor:pointer; }
.advanced-search-close[hidden] { display:none; }
.advanced-search-close:hover,.advanced-search-close:focus-visible { color:var(--heading); background:var(--bg); }
.product-advanced-filter { display:none; position:absolute; top:48px; right:10px; z-index:8; width:480px; max-width:calc(100% - 20px); overflow:auto; padding:10px 16px 16px; border:1px solid var(--border); background:#fff; box-shadow:var(--shadow); }
.product-advanced-filter.is-open { display:block; }
.product-advanced-heading { padding:4px 2px 10px; font-weight:600; color:var(--heading); }
.member-search-modal .member-advanced-title { display:flex; align-items:center; justify-content:space-between; }
.member-advanced-close { border:0; background:transparent; color:var(--muted); font-size:22px; line-height:1; padding:4px 8px; cursor:pointer; }
.member-advanced-close:hover,.member-advanced-close:focus-visible { color:var(--heading); }
.product-advanced-row { display:flex; align-items:center; min-height:46px; gap:12px; border-top:1px dashed var(--border); }
.product-advanced-row > span { width:92px; flex:0 0 92px; color:var(--body); }
.product-advanced-row select { flex:1; min-width:0; height:32px; padding:0 8px; border:1px solid var(--border); background:#fff; color:var(--heading); }
.product-status-options { display:flex; gap:8px; }
.product-status-options button { padding:4px 9px; border:1px solid transparent; background:none; color:var(--body); cursor:pointer; }
.product-status-options button.active { border-color:var(--brand); color:var(--brand); }
.product-list-card { flex:1 1 0; min-height:0; padding:0; margin:0; overflow:hidden; }
.product-list-card .product-table-scroll { max-height:639px; height:100%; overflow:auto; }
.product-list-table { min-width:0 !important; table-layout:fixed; }
.product-list-table th { position:sticky; top:0; z-index:1; height:39px; padding:6px 4px; text-align:center; }
.product-list-table td { height:40px; padding:6px 5px; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.product-list-table .product-col-seq { width:3%; }
.product-list-table .product-col-action { width:4%; }
.product-list-table .product-col-name { width:14%; }
.product-list-table .product-col-barcode { width:10%; }
.product-list-table .product-col-brand { width:6%; }
.product-list-table .product-col-spec { width:5%; }
.product-list-table .product-col-category { width:6%; }
.product-list-table .product-col-stock { width:4%; }
.product-list-table .product-col-unit { width:3%; }
.product-list-table .product-col-money { width:6%; }
.product-list-table .product-col-supplier { width:8%; }
.product-list-table .product-col-created { width:13%; }
.product-disabled-label { display:inline-block; margin-left:5px; color:#a45c00; font-size:11px; }
.product-list-table th.product-col-seq, .product-list-table td:first-child,
.product-list-table th.product-col-action, .product-list-table td:nth-child(2):has(.sale-print-link) { text-align:center; }
.product-list-footer { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:5px 8px; border:1px solid var(--border); background:#f5f5f5; }
.product-list-totals { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:12px; }
.product-list-totals b { color:var(--heading); }
.product-pagination { margin:0; gap:3px; }
.product-pagination .page-btn { padding:5px 6px; border:0; background:transparent; font-size:12px; }
.product-pagination .page-info { font-size:12px; }
.content-scroll.product-list-active:has(.inventory-query-page) { position:relative; }
.inventory-query-page { background:#fff; }
.inventory-selected-stores { flex:none; padding:6px 10px; border-bottom:1px solid var(--border); color:var(--body); font-size:12px; line-height:20px; overflow-wrap:anywhere; max-height:92px; overflow:auto; }
.inventory-query-toolbar .product-filter-controls select { width:135px; max-width:160px; border:1px solid #b5bec8; background:#fff; }
.inventory-query-toolbar .product-filter-controls input { border:1px solid #b5bec8; background:#fff; }
.inventory-query-page .product-list-card .product-table-scroll { max-height:none; }
.inventory-query-table th,.inventory-query-table td { font-size:12px; text-align:center; }
.inventory-query-table td:nth-child(2),.inventory-query-table td:nth-child(6) { text-align:left; }
.inventory-query-table .inventory-query-empty { height:200px; text-align:center; color:var(--body); }
.inventory-query-table tbody tr:has(.inventory-query-empty) td,
.inventory-query-table tbody tr:has(.inventory-query-empty):hover td { background:#fff; }
.inventory-store-picker { position:relative; width:135px; flex:none; font-size:12px; }
.inventory-store-picker summary { height:32px; padding:4px 8px; border:1px solid #b5bec8; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; list-style:none; }
.inventory-store-picker summary::-webkit-details-marker { display:none; }
.inventory-store-picker summary span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inventory-store-panel { position:absolute; top:36px; right:0; width:235px; z-index:20; background:#fff; border:1px solid #b5bec8; box-shadow:0 4px 12px #0002; }
.inventory-store-actions,.inventory-store-confirm { display:flex; justify-content:space-between; padding:8px 10px; border-bottom:1px solid var(--border); }
.inventory-store-actions button { background:none; border:0; color:var(--brand); cursor:pointer; font:inherit; }
.inventory-store-confirm { border-bottom:0; border-top:1px solid var(--border); justify-content:flex-end; }
.inventory-store-options { max-height:310px; overflow:auto; padding:4px 0; }
.inventory-store-options label { display:flex; align-items:center; gap:8px; padding:7px 10px; cursor:pointer; }
.inventory-query-toolbar .inventory-store-options input { width:14px; height:14px; min-height:0; padding:0; flex:none; accent-color:var(--brand); }
.inventory-store-options label:hover { background:#f5f5f5; }
@media(max-width:1100px) { .inventory-store-picker { width:112px; } }
.inventory-stock-link { border:0; background:none; color:var(--brand); font:inherit; cursor:pointer; padding:4px; }
.inventory-stock-link:hover { text-decoration:underline; }
.inventory-distribution-overlay { position:absolute; inset:0; z-index:50; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; padding:20px; }
.inventory-distribution-dialog { width:1100px; max-width:100%; max-height:90%; display:flex; flex-direction:column; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:var(--shadow); overflow:hidden; }
.inventory-distribution-dialog header,.inventory-distribution-dialog footer { display:flex; align-items:center; justify-content:space-between; flex:none; padding:12px 16px; border-bottom:1px solid var(--border); }
.inventory-distribution-dialog header strong { display:block; color:var(--heading); font-size:16px; }
.inventory-distribution-dialog header span { display:block; margin-top:5px; font-size:12px; color:var(--body); }
.inventory-distribution-dialog footer { border-bottom:0; border-top:1px solid var(--border); font-size:12px; }
.inventory-distribution-scroll { overflow:auto; min-height:0; }
.inventory-distribution-scroll .data-table { min-width:0; table-layout:fixed; }
.inventory-distribution-scroll th { position:sticky; top:0; }
.inventory-distribution-scroll th,.inventory-distribution-scroll td { padding:9px 6px; font-size:12px; overflow:hidden; text-overflow:ellipsis; text-align:center; }
.inventory-distribution-scroll th:nth-child(3) { width:20%; }
.inventory-distribution-scroll th:nth-child(4) { width:16%; }
@media(max-width:1100px) { .inventory-query-toolbar .product-filter-controls { gap:5px; } .inventory-query-toolbar .product-filter-controls select { width:112px; } .inventory-query-toolbar .product-filter-controls .search-w { width:150px; min-width:120px; } }
.content-scroll.stock-flow-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.stock-flow-page { flex:1; min-height:0; min-width:0; display:flex; flex-direction:column; background:#fff; font:12px/20px Helvetica,Tahoma,Arial,"Microsoft YaHei",sans-serif; }
.stock-flow-toolbar { position:relative; z-index:9; display:flex; align-items:flex-start; justify-content:space-between; gap:6px; padding:5px 6px; border-bottom:1px solid var(--border); }
.stock-flow-actions,.stock-flow-filters { display:flex; align-items:center; gap:4px; }
.stock-flow-actions { flex:none; }
.stock-flow-filters { justify-content:flex-end; flex-wrap:wrap; min-width:0; }
.stock-flow-filters input,.stock-flow-filters select,.stock-flow-filters .sales-date-trigger,.stock-flow-toolbar .btn { height:28px; min-height:28px; padding:3px 7px; font:inherit; border:1px solid #cbd4dd; border-radius:3px; background:#fff; }
.stock-flow-filters select { width:100px; }
.stock-flow-filters select[aria-label="供货商筛选"],.stock-flow-filters select[aria-label="制单员筛选"] { width:116px; }
.stock-flow-filters input { width:140px; min-width:0; }
.stock-flow-filters input.stock-flow-short { width:85px; }
.stock-flow-store-picker { width:145px; flex:none; }
.stock-flow-store-picker summary { height:28px; min-height:28px; font:inherit; }
.stock-flow-store-picker .inventory-store-panel { left:0; right:auto; }
.stock-flow-store-options input[type=checkbox] { width:14px; height:14px; min-height:0; padding:0; margin:0; accent-color:var(--brand); }
.outbound-config { grid-template-columns:1fr 1fr; }
.outbound-config [hidden],.outbound-filters [hidden],#outboundConfirm[hidden] { display:none!important; }
.outbound-filters { flex-wrap:wrap; gap:8px; }
.outbound-filters > input { flex:1; min-width:120px; max-width:300px; }
.outbound-product-scroll { flex-shrink:0; height:320px; }
.outbound-products th,.outbound-products td { white-space:normal; overflow-wrap:anywhere; font-size:12px; padding:6px 3px; }
.outbound-products input:not([type=checkbox]) { min-width:0; width:100%; border:1px solid #bdc9d5; padding:4px 2px; border-radius:3px; font:inherit; }
.outbound-products input[type=number] { appearance:textfield; -moz-appearance:textfield; }
.outbound-products input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.outbound-order-remark { display:flex; align-items:center; flex:none; gap:10px; margin:10px 0; }
.outbound-order-remark input { flex:1; min-width:0; padding:6px; border:1px solid #bdc9d5; border-radius:3px; font:inherit; }
.outbound-confirm { flex:none; padding:12px; border:1px solid #93bad3; background:#f1f7fb; margin:8px 0; }
.outbound-confirm .btn { margin-right:8px; }
.outbound-card-details { margin-top:6px; width:100%; min-width:0; }
.outbound-card-details summary { cursor:pointer; color:var(--brand); font-size:12px; }
.outbound-card-details > div { display:grid; gap:6px; padding-top:8px; }
#outboundProducts .outbound-card-details label { display:flex; align-items:center; justify-content:space-between; min-width:0; }
.outbound-card-details input { width:140px; max-width:65%; min-width:0; padding:4px 6px; border:1px solid #bdc9d5; border-radius:3px; font:inherit; }
.stock-flow-toolbar .btn-primary { border-color:var(--brand); background:var(--brand); color:#fff; }
.stock-flow-filters .sales-date-picker { flex:none; }
.stock-flow-list-scroll { flex:1; min-height:0; overflow:auto; }
.stock-flow-list { min-width:0!important; table-layout:fixed; width:100%; }
.stock-flow-list.stock-flow-combined { min-width:1200px!important; }
.stock-flow-combined .dp-recognition-warning,.stock-flow-combined .dp-status-unfinished small { display:block; color:#9a4f07; font-size:11px; }
.stock-flow-combined .dp-unfinished-row td { background:#fffaf2; }
.stock-flow-combined .dp-unfinished-row td:first-child { box-shadow:inset 4px 0 #e59a32; }
.stock-flow-list th { position:sticky; top:0; z-index:1; background:#f5f5f5; font-weight:400; color:#777; height:32px; }
.stock-flow-list th,.stock-flow-list td { padding:0 2px; text-align:center; font-size:12px; line-height:18px; white-space:normal; overflow-wrap:anywhere; }
.stock-flow-list td { height:56px; color:#000000; vertical-align:middle; }
.stock-flow-list .stock-flow-status { line-height:18px; text-align:center; white-space:normal; overflow:visible; }
.stock-flow-progress-line { display:block; line-height:18px; white-space:normal; overflow-wrap:anywhere; }
.stock-flow-list .stock-flow-status { padding:5px 3px; }
.stock-flow-list .stock-flow-progress-line { line-height:22px; white-space:normal; overflow-wrap:anywhere; }
.stock-flow-list .stock-flow-created { line-height:16px; }
.stock-flow-list .stock-flow-number { font-variant-numeric:tabular-nums; }
.stock-flow-list .stock-flow-allocation { color:#7a8895; }
.stock-flow-list .stock-flow-step-label { color:#63717c; margin-right:5px; }
.stock-flow-list .stock-flow-step-meta { color:#818b94; font-size:11px; font-variant-numeric:tabular-nums; }
.stock-flow-list .stock-flow-progress-line:not(:last-child) .stock-flow-step-label { color:#859099; }

.stock-flow-progress-detail { margin:12px 0; padding:12px; background:#f8f9fa; border:1px solid var(--border); }
.stock-flow-progress-detail h4 { margin:0 0 8px; font-size:13px; }
.stock-flow-list .stock-flow-row-actions { white-space:normal; line-height:17px; }
.stock-flow-list .stock-flow-row-actions button { line-height:22px; }
.stock-flow-row-actions button { display:block; width:100%; border:0; padding:0; background:none; color:var(--brand); cursor:pointer; font:inherit; line-height:17px; }
.stock-flow-row-actions button:hover { text-decoration:underline; }
.stock-flow-party-count { border:0; padding:0; background:transparent; color:var(--brand); font:inherit; cursor:pointer; }
.stock-flow-party-count:hover { text-decoration:underline; }
.stock-flow-parties-dialog { width:480px; padding:24px; }
.stock-flow-parties-dialog .modal-title { margin:0 0 18px; font-size:18px; }
.stock-flow-parties-dialog .prepaid-dialog-message { min-height:0; white-space:normal; }
.stock-flow-party-list { display:flex; flex-direction:column; gap:8px; max-height:min(440px,50dvh); margin:0; padding:0; overflow-y:auto; list-style:none; }
.stock-flow-party-list li { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid #e8edf2; border-radius:8px; background:#f7fafc; }
.stock-flow-party-number { display:flex; align-items:center; justify-content:center; flex:none; min-width:28px; height:28px; padding:0 5px; box-sizing:border-box; border-radius:8px; background:#e7f4fc; color:var(--brand); font-size:13px; font-weight:600; }
.stock-flow-party-name { min-width:0; color:var(--heading); font-size:14px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.stock-flow-party-missing { margin:12px 0 0; font-size:12px; color:var(--body); }
.stock-flow-parties-dialog .modal-footer { margin-top:20px; padding-top:16px; }
.stock-flow-list .stock-flow-empty { height:46px; text-align:left; padding-left:14px; color:#666; }
.stock-flow-list-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; border-top:1px solid var(--border); padding:8px 12px; background:#f8f8f8; }
.stock-flow-list-footer .pagination { margin:0; }
@media(max-width:1250px) {
    .stock-flow-list-footer { padding:5px 8px; gap:4px; }
}
.stock-flow-overlay { position:fixed; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(23,38,54,.42); }
.stock-flow-modal { display:flex; flex-direction:column; width:1180px; max-width:100%; max-height:calc(100dvh - 40px); border:1px solid #dce3ea; border-radius:8px; background:#fff; box-shadow:0 12px 48px #17263633; color:var(--heading); font:13px/1.5 Helvetica,Tahoma,Arial,"Microsoft YaHei",sans-serif; }
.stock-flow-modal > header { display:flex; align-items:center; justify-content:space-between; flex:none; padding:14px 20px; border-bottom:1px solid var(--border); }
.stock-flow-modal h3 { font-size:18px; font-weight:600; margin:0; }
.stock-flow-close { border:0; border-radius:4px; width:30px; height:30px; background:#f4f6f8; font:24px/28px Arial; color:#748292; cursor:pointer; }
.stock-flow-modal-body { display:flex; flex-direction:column; min-height:0; overflow:auto; padding:16px 20px 0; }
.stock-flow-modal > footer { display:flex; align-items:center; justify-content:flex-end; flex:none; gap:10px; padding:14px 20px; border-top:1px solid var(--border); background:#fff; border-radius:0 0 8px 8px; }
.stock-flow-summary { flex:1; min-width:0; color:#526476; }
.stock-flow-editor-meta { display:grid; flex:none; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 16px; }
.stock-flow-editor-meta label { display:flex; flex-direction:column; gap:5px; color:#5f6d7b; }
.stock-flow-editor-meta input,.stock-flow-editor-meta select,.stock-flow-product-filters select,.stock-flow-product-filters > input { width:100%; min-width:0; height:34px; padding:5px 9px; font:inherit; color:#26394a; border:1px solid #bdc9d5; border-radius:4px; background:#fff; }
.stock-flow-editor-meta .stock-flow-remarks { grid-column:span 2; }
.stock-flow-hint { flex:none; margin:12px 0; padding:8px 12px; color:#5a7185; background:#f1f7fb; border-radius:4px; }
#stockFlowAllocationResult:not(:empty) { margin-bottom:12px; padding:10px 12px; color:#176647; background:#eaf7ef; border-radius:4px; }
.stock-flow-product-filters { display:flex; align-items:center; flex:none; gap:12px; padding-bottom:12px; }
.stock-flow-product-filters select { width:170px; }
.stock-flow-product-filters > input { width:300px; }
.stock-flow-product-filters > label { display:flex; gap:5px; align-items:center; white-space:nowrap; }
.stock-flow-product-scroll { height:380px; min-height:120px; flex:0 1 380px; overflow:auto; border:1px solid #dce3ea; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-grid { gap:8px; }
#dpProductResults.pos-product-grid { gap:8px; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-choice { padding:10px 12px!important; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-name { margin:0 0 5px!important; font-size:14px!important; line-height:1.35; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:2px 8px; line-height:1.35; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-fields > span:last-child { grid-column:1/-1; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-card-footer { padding:7px 12px; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .pos-product-card-footer label { gap:8px; white-space:nowrap; }
:is(#stockFlowProductScroll,#outboundProducts,#dpProductResults) .stock-flow-quantity { width:154px; max-width:100%; height:28px; }
.stock-flow-products { table-layout:fixed; width:100%; min-width:0!important; font-size:13px; }
.stock-flow-products th,.stock-flow-products td { padding:7px 6px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; font-weight:400; }
.stock-flow-products th { position:sticky; top:0; z-index:1; background:#f4f6f8; height:36px; color:#697d8d; }
.stock-flow-products td { height:44px; }
.stock-flow-products tbody td { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.stock-flow-products td:nth-child(2) { text-align:left; }
.stock-flow-products tr.selected td { background:#f0f8ff; }
.stock-flow-products input[type=checkbox],.stock-flow-product-filters input[type=checkbox] { width:16px; height:16px; accent-color:var(--brand); vertical-align:middle; }
.stock-flow-quantity { display:flex; align-items:stretch; width:100%; height:30px; }
.stock-flow-quantity button { flex:none; width:27px; padding:0; border:1px solid #b9c8d6; background:#f5f8fa; font-size:18px; color:#456176; cursor:pointer; }
.stock-flow-quantity input { min-width:0; width:100%; border:1px solid #8aa4ba; border-left:0; border-right:0; text-align:center; font:14px Arial; color:#1c496a; background:#fff; }
.stock-flow-quantity input::-webkit-inner-spin-button,.stock-flow-cost::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.stock-flow-products .stock-flow-cost { min-width:0; width:100%; height:30px; padding:3px 4px; border:1px solid #bdc9d5; border-radius:3px; text-align:right; font:inherit; background:#fff; }
.stock-flow-unavailable { color:#9b7f65; font-size:12px; }
.stock-flow-product-pager { flex:none; display:flex; align-items:center; justify-content:flex-end; gap:10px; min-height:42px; color:#697d8d; }
.stock-flow-product-pager > span:first-child { margin-right:auto; }
.stock-flow-empty { padding:18px; color:#7f8b95; }
.stock-flow-detail-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 24px; padding-bottom:18px; }
.stock-flow-detail-meta div { display:flex; gap:10px; min-width:0; }
.stock-flow-detail-meta span { color:#7a8895; flex:none; }
.stock-flow-detail-meta strong { overflow-wrap:anywhere; font-weight:400; }
.stock-flow-detail-table { flex:0 0 auto; overflow:auto; min-height:80px; }
.stock-flow-detail-table .stock-flow-products:not(.stock-flow-pending-table) td:first-child { text-align:left; }
.stock-flow-pending-table { min-width:1200px!important; }
.stock-flow-pending-table th:nth-child(1) { width:65px; }
.stock-flow-pending-table th:nth-child(2) { width:220px; }
.stock-flow-pending-table th:nth-child(3) { width:150px; }
.stock-flow-pending-table th:nth-child(6) { width:120px; }
.stock-flow-pending-table th:nth-child(7) { width:120px; }
.pending-flow-quantity { width:100%; height:32px; border:1px solid #8aa4ba; border-radius:3px; text-align:center; font:14px Arial; background:#fff; }
.content-scroll.stock-flow-history-active { min-width:0; min-height:0; padding:0; overflow:hidden; display:flex; flex-direction:column; }
.stock-flow-history-page { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; font:12px/20px Helvetica,Tahoma,Arial,"Microsoft YaHei",sans-serif; }
.stock-flow-history-page .filter-bar { flex:none; margin:0; padding:8px 10px; gap:8px; }
.stock-flow-history-page .filter-bar input,.stock-flow-history-page .filter-bar select,.stock-flow-history-page .filter-bar .btn,.stock-flow-history-page .sales-date-trigger { height:28px; min-height:28px; padding:3px 7px; font:inherit; }
.stock-flow-history-page .filter-bar .search-w { width:150px; }
.stock-flow-history-page .filter-bar label { display:flex; align-items:center; gap:5px; }
.stock-flow-history-note { flex:none; padding:4px 12px; color:#7b858e; background:#f8f9fa; }
.stock-flow-history-toolbar { display:flex; flex:none; justify-content:space-between; align-items:center; padding:6px 12px; border-bottom:1px solid var(--border); }
.stock-flow-history-scroll { min-height:0; min-width:0; flex:1; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; }
.stock-flow-history-scroll::-webkit-scrollbar,.stock-flow-detail-table::-webkit-scrollbar { width:12px; height:12px; }
.stock-flow-history-scroll::-webkit-scrollbar-track,.stock-flow-detail-table::-webkit-scrollbar-track { background:#edf0f3; }
.stock-flow-history-scroll::-webkit-scrollbar-thumb,.stock-flow-detail-table::-webkit-scrollbar-thumb { background:#a6b2bf; border:2px solid #edf0f3; border-radius:6px; }
.stock-flow-history-table { table-layout:fixed; width:100%; max-width:100%; font:inherit; }
.stock-flow-history-table th,.stock-flow-history-table td { text-align:center; white-space:pre-line; overflow-wrap:anywhere; overflow:hidden; box-sizing:border-box; padding:4px; font-size:12px; font-weight:400; line-height:18px; }
.stock-history-document-link { display:block; width:100%; max-width:100%; min-width:0; padding:0; border:0; background:none; color:var(--brand); font:inherit; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
.stock-history-store-group { grid-column:1/-1; color:#637b8d; padding:4px 0; font-weight:600; }
.stock-history-footer > div:first-child { white-space:normal; }
.stock-history-purchase-total { display:block; color:var(--brand); }
.stock-history-stage-totals { display:flex; flex-wrap:wrap; gap:6px 18px; flex:none; padding:6px 12px; border-top:1px solid var(--border); background:#fff; font-size:12px; }
.stock-flow-history-table th { position:sticky; top:0; z-index:1; height:32px; background:#f5f5f5; color:#777; }
.stock-flow-history-table td { height:40px; vertical-align:middle; }
.stock-flow-history-page .stock-flow-list-footer { flex:none; }
.stock-history-filter { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; padding:10px 12px; border-bottom:1px solid var(--border); background:#fff; }
.stock-history-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; min-width:0; gap:6px; margin-left:auto; }
.stock-history-filter > button { flex:none; }
.stock-history-controls > input,.stock-history-controls > select,.stock-history-filter .btn,.stock-history-controls .sales-date-trigger { height:30px; min-height:30px; padding:4px 7px; border:1px solid #cbd4dd; border-radius:3px; font:inherit; }
.stock-history-controls > input { width:160px; min-width:0; }
.stock-history-controls > select { width:100px; min-width:0; }
.stock-history-controls .sales-date-trigger { min-width:205px; }
.stock-history-store-picker { width:165px; }
.stock-history-store-picker summary { height:30px; }
.stock-history-store-picker .inventory-store-panel { left:0; right:auto; }
.stock-history-store-options input { width:14px; height:14px; min-height:0; margin:0; accent-color:var(--brand); }
.stock-history-column-tool { border:0; padding:0; color:#637b8d; font-size:19px; line-height:24px; background:none; cursor:pointer; }
.stock-history-footer { font-size:12px; }
.stock-history-actions { display:flex; flex:none; gap:6px; }
.stock-flow-history-table td.stock-history-progress { text-align:left; line-height:20px; }
.stock-history-process { white-space:normal; }
.stock-history-process > summary { cursor:pointer; border-radius:3px; color:var(--brand); }
.stock-history-process > summary:focus-visible { outline:2px solid var(--brand); outline-offset:1px; }
.stock-history-current { font-weight:500; white-space:normal; overflow-wrap:anywhere; }
.stock-history-current.pending { color:#946000; }
.stock-history-current.complete { color:#287354; }
.stock-history-current.attention { color:#b54336; }
.stock-history-process-open,.stock-history-process-close { display:block; padding-left:13px; font-size:11px; }
.stock-history-process-close,.stock-history-process[open] .stock-history-process-open { display:none; }
.stock-history-process[open] .stock-history-process-close { display:block; }
.stock-history-process > ol { margin:6px 0 0; padding:0 0 0 13px; list-style:none; border-top:1px solid var(--border); }
.stock-history-process > ol > li { position:relative; padding:5px 0 5px 9px; border-left:2px solid #d9e5ed; white-space:pre-line; overflow-wrap:anywhere; }
.stock-history-process > ol > li::before { content:''; position:absolute; left:-4px; top:12px; width:6px; height:6px; border-radius:50%; background:#8ca9bd; }
.stock-history-financial { flex:none; border-top:1px solid var(--border); background:#fff; padding:6px 12px; font-size:12px; }
.stock-history-financial > summary { cursor:pointer; color:var(--brand); }
.stock-history-financial > div { max-height:190px; overflow:auto; }
.stock-history-financial table { width:100%; table-layout:fixed; }
.stock-history-financial th,.stock-history-financial td { white-space:normal; overflow-wrap:anywhere; padding:5px; }
.stock-history-footer .sales-page-input { width:42px; min-width:0; text-align:center; }
.stock-history-columns-modal { width:780px; max-width:92vw; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.stock-history-columns-modal header,.stock-history-columns-modal footer { display:flex; flex:none; align-items:center; padding:14px 20px; gap:8px; }
.stock-history-columns-modal header { justify-content:space-between; border-bottom:1px solid var(--border); }
.stock-history-columns-modal h3 { margin:0; font-size:16px; }
.stock-history-columns-modal footer { justify-content:flex-end; border-top:1px solid var(--border); }
.stock-history-columns-actions { flex:none; display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 20px; }
.stock-history-columns-actions span { margin-left:auto; font-size:12px; color:var(--body); }
.stock-history-columns-scroll { min-height:0; overflow:auto; }
.stock-history-columns-scroll table { table-layout:fixed; width:100%; }
.stock-history-columns-scroll th:first-child { width:38%; }
.stock-history-columns-scroll th:nth-child(2),.stock-history-columns-scroll th:nth-child(3) { width:17%; }
.stock-history-columns-scroll th { position:sticky; top:0; background:#f5f5f5; z-index:1; }
.stock-history-columns-scroll th,.stock-history-columns-scroll td { padding:8px 12px; text-align:center; }
.stock-history-columns-scroll td:first-child { text-align:left; }
.stock-history-drag { padding:4px 8px; cursor:grab; color:#778997; }
@media(max-width:1200px) { .stock-history-filter { gap:8px; padding:8px; } .stock-history-controls { gap:4px; } .stock-history-controls > input { width:135px; } .stock-history-controls > select { width:90px; } .stock-history-store-picker { width:140px; } }
.stock-flow-detail-remark { overflow-wrap:anywhere; }
.stock-flow-confirm-text { padding:12px 0 24px; }
.stock-flow-rejected { color:#d74747; }
.stock-flow-detail-remark { white-space:pre-wrap; }
.stock-flow-transfer-modes,.stock-flow-allocation-search,.stock-flow-allocation-actions { display:flex; flex:none; gap:10px; padding:8px 0; }
.stock-flow-allocation-search input { min-width:0; width:280px; padding:6px 10px; border:1px solid #bdc9d5; border-radius:3px; font:inherit; }
.stock-flow-allocation-table { min-width:920px!important; }
.stock-flow-allocation-scroll { flex:none; height:auto; max-height:380px; }
.stock-flow-allocation-table .pending-flow-quantity { width:100%; min-width:0; }
.stock-flow-allocation-records { flex:none; margin:12px 0; }
.stock-flow-allocation-records h4 { margin:0 0 6px; font-size:14px; }
.stock-flow-allocation-records p { margin:0 0 6px; }
#stockFlowAllocationRows .stock-flow-allocation-records { padding:10px; border:1px solid #cbd4dd; background:#f6fafc; }
#stockFlowAllocationRows .stock-flow-products { min-width:650px; }
#stockFlowAllocationRows .stock-flow-products td:nth-child(2) { white-space:normal; text-align:left; }
.stock-flow-modal footer[hidden] { display:none; }
.stock-flow-reject-panel { flex:none; margin:12px 0 16px; padding:14px; border:1px solid #f1cccc; border-radius:4px; background:#fff7f7; }
.stock-flow-reject-panel h4 { margin:0 0 8px; font-size:16px; }
.stock-flow-reject-panel textarea { display:block; width:100%; margin:5px 0 12px; padding:8px; border:1px solid #cbd4dd; border-radius:3px; font:inherit; resize:vertical; }
.stock-flow-reject-panel > div { display:flex; justify-content:flex-end; gap:10px; }
.stock-flow-modal:has(#stockFlowReceive) { width:520px; }
.stock-flow-modal:has(#stockFlowReject) { width:520px; }
.stock-flow-modal input:focus,.stock-flow-modal select:focus { outline:2px solid #b5d9ee; outline-offset:0; }
.stock-flow-modal button:disabled { opacity:.5; cursor:default; }
@media(max-width:1100px) { .stock-flow-toolbar { flex-wrap:wrap; } .stock-flow-filters { flex:1; } .stock-flow-modal-body { padding:12px 14px 0; } .stock-flow-product-filters { gap:8px; } .stock-flow-product-filters > input { flex:1; } .stock-flow-products th,.stock-flow-products td { padding:6px 4px; font-size:12px; } .stock-flow-quantity button { width:23px; } }
@media(max-width:700px) { .stock-flow-overlay { padding:8px; } .stock-flow-modal { max-height:calc(100dvh - 16px); } .stock-flow-editor-meta { grid-template-columns:repeat(2,minmax(0,1fr)); } .stock-flow-product-filters { flex-wrap:wrap; } .stock-flow-product-scroll { min-height:130px; } .stock-flow-modal > footer { flex-wrap:wrap; padding:10px 14px; } .stock-flow-summary { flex-basis:100%; } }
.content-scroll.stock-change-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.stock-change-page { flex:1; min-height:0; min-width:0; display:flex; flex-direction:column; font-family:Helvetica,Tahoma,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei",STXihei,STHeiti,Heiti,SimSun,sans-serif; font-size:12px; line-height:20px; font-weight:400; }
.stock-change-filter { position:relative; z-index:9; flex:0 0 auto; margin:0; padding:8px 10px; justify-content:space-between; gap:8px; }
.stock-change-controls { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; min-width:0; }
.stock-change-controls > select { min-width:120px; max-width:170px; }
.stock-change-filter .btn, .stock-change-controls > select, .stock-change-controls input.search-w[type="text"], .stock-change-controls .sales-date-trigger { min-height:24px; height:24px; padding:2px 8px; font-family:inherit; font-size:12px; line-height:18px; }
.stock-change-controls .search-w { width:170px; min-width:130px; }
.stock-change-search { position:relative; }
.stock-change-suggestions:not(:empty) { position:absolute; top:calc(100% + 2px); right:0; width:380px; max-width:calc(100vw - 32px); max-height:300px; overflow:auto; border:1px solid var(--border); background:#fff; box-shadow:var(--shadow); }
.stock-change-suggestions button { display:block; width:100%; padding:8px 12px; border:0; border-bottom:1px solid var(--border); background:#fff; color:var(--heading); text-align:left; cursor:pointer; }
.stock-change-suggestions button:hover { background:var(--bg-subtle); }
.stock-change-suggestions small { display:block; margin-top:3px; color:var(--body); }
.stock-change-no-match { padding:12px; color:var(--body); }
.stock-change-controls .sales-date-picker { flex:none; }
.stock-change-card { flex:1 1 0; min-height:0; padding:0; margin:0; overflow:hidden; }
.stock-change-card .table-scroll { height:100%; overflow:auto; }
.stock-change-table { min-width:0 !important; table-layout:fixed; }
.stock-change-table th { position:sticky; top:0; z-index:1; height:32px; padding:0 5px; text-align:center; vertical-align:middle; font-size:12px; font-weight:400; line-height:20px; color:#777; background:#f5f5f5; }
.stock-change-table td { height:40px; padding:0 5px; text-align:center; vertical-align:middle; font-size:12px; font-weight:400; line-height:20px; color:#000000; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stock-change-table td.td-secondary { font-size:12px; color:#000000; }
.stock-change-table tbody tr:nth-child(even) td { background:#fff; }
.stock-change-table tbody tr:hover td { background:#eff8fd; }
.stock-change-table td:nth-child(6), .stock-change-table td:nth-child(7) { text-align:right; padding-right:12px; }
.stock-change-table th:nth-child(1) { width:4%; }
.stock-change-table th:nth-child(2) { width:13%; }
.stock-change-table th:nth-child(3) { width:8%; }
.stock-change-table th:nth-child(4) { width:8%; }
.stock-change-table th:nth-child(5) { width:9%; }
.stock-change-table th:nth-child(6) { width:9%; }
.stock-change-table th:nth-child(7) { width:12%; }
.stock-change-table th:nth-child(8) { width:37%; }
.stock-change-table td.stock-change-notes { height:auto; text-align:left; padding:8px 12px; white-space:normal; overflow:visible; text-overflow:clip; }
.stock-change-note-text { display:block; line-height:20px; white-space:normal; overflow-wrap:anywhere; }
.stock-change-flow { display:inline-block; max-width:100%; padding:0; border:0; background:none; color:var(--brand); cursor:pointer; text-align:left; font:inherit; line-height:20px; vertical-align:top; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stock-change-flow:hover { text-decoration:underline; }
.stock-change-note-source { display:flex; flex-wrap:wrap; align-items:center; gap:0 8px; min-width:0; }
.stock-change-note-remarks { display:block; white-space:pre-wrap; overflow-wrap:anywhere; }
.stock-change-document-no { min-width:0; overflow-wrap:anywhere; }
.stock-change-flow { flex:none; }
.stock-change-document p { line-height:1.7; overflow-wrap:anywhere; }
.stock-change-document .data-table { width:100%; min-width:0; table-layout:fixed; }
.stock-change-document .data-table th:first-child { width:52%; }
.stock-change-document .data-table td { white-space:normal; overflow-wrap:anywhere; }
.stock-change-footer { flex:0 0 auto; display:flex; align-items:flex-start; gap:24px; max-height:30vh; overflow:auto; padding:12px 30px; border-top:1px solid #d9e8ef; background:#f8f8f8; font-size:14px; line-height:26px; font-weight:400; }
.stock-change-summary-title { display:flex; flex:0 1 28%; min-width:0; flex-direction:column; gap:0; color:#777; font-weight:400; margin:0; overflow-wrap:anywhere; }
.stock-change-summary-title strong { color:var(--brand); font-weight:400; }
.stock-change-stats { flex:1; min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(2,auto); grid-auto-flow:column; gap:0 18px; }
.stock-change-stat { display:flex; align-items:baseline; gap:8px; min-width:0; }
.stock-change-stat span { min-width:0; white-space:nowrap; color:#777; }
.stock-change-stat span::after { content:'：'; }
.stock-change-stat strong { flex:none; color:var(--brand); font-weight:400; }
.stock-change-product-hint { color:var(--body); }
@media (max-width:1100px) { .stock-change-footer { padding:10px 14px; gap:16px; font-size:14px; } .stock-change-stats { column-gap:10px; } .stock-change-stat { gap:4px; } }
.product-operation-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:14px 16px; border:1px solid var(--border); border-radius:8px; background:#fff; margin-bottom:14px; }
.product-operation-toolbar .toolbar-label { font-weight:700; color:var(--heading); margin-right:4px; }
.product-setting-modal { width:460px; max-width:calc(100vw - 32px); }
.member-level-color-label { display:inline-flex; align-items:center; gap:8px; padding:5px 10px; border:1px solid var(--level-color); border-radius:6px; color:var(--level-color); font-size:13px; font-weight:600; background:#fff; }
.member-level-color-dot { width:10px; height:10px; flex:none; border-radius:50%; background:var(--level-color); }
.form-group .member-level-color-picker { width:100%; height:40px; padding:4px; border:1px solid #b8c4d1; border-radius:6px; background:#fff; cursor:pointer; }
.recharge-rules-note { display:flex; gap:12px; padding:16px 20px; margin:0 0 18px; border:1px solid #cfe5f4; border-radius:8px; background:#f2f9fd; color:#35536b; }
.recharge-rules-note strong { font-size:14px; color:#23455f; }
.recharge-rules-note p { margin:5px 0 0; font-size:13px; line-height:1.6; }
.recharge-rules-note-icon { display:flex; justify-content:center; align-items:center; width:22px; height:22px; flex:none; border-radius:50%; background:#d5ecfa; color:#087fb9; font-weight:700; }
.recharge-rules-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 22px; }
.recharge-rules-header .td-secondary { margin-top:5px; font-size:12px; }
.recharge-rule-description { font-size:12px; color:var(--body); margin-top:5px; max-width:260px; overflow-wrap:anywhere; }
.recharge-rule-bonus { color:#148058; }
.recharge-rule-total { color:var(--brand); font-weight:700; }
.recharge-rule-actions { white-space:nowrap; }
.recharge-rules-empty { padding:54px 20px; }
.recharge-rules-empty .btn { margin-top:20px; }
.recharge-empty-icon { width:52px; height:52px; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; border-radius:14px; background:#eaf5fc; color:var(--brand); font-size:28px; font-weight:600; }
.recharge-rule-overlay { padding:20px; box-sizing:border-box; }
.recharge-rule-modal { width:660px; max-width:100%; max-height:calc(100vh - 40px); padding:0; display:flex; flex-direction:column; overflow:hidden; }
.recharge-rule-modal-header { display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--border); flex:none; }
.recharge-rule-modal-header .modal-title { margin:0; }
.recharge-rule-close { border:0; background:var(--bg-subtle); color:var(--body); font-size:22px; border-radius:6px; width:30px; height:30px; cursor:pointer; }
.recharge-rule-modal-body { padding:22px 24px; overflow-y:auto; min-height:0; }
.recharge-rule-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 20px; }
.recharge-rule-form-grid .form-group { margin:0; }
.recharge-rule-modal input, .recharge-rule-modal select, .recharge-rule-modal textarea { display:block; width:100%; box-sizing:border-box; border:1px solid #b8c4d1; border-radius:6px; padding:10px 12px; min-height:40px; background:#fff; color:var(--heading); font:inherit; }
.recharge-rule-modal input:focus, .recharge-rule-modal select:focus, .recharge-rule-modal textarea:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,148,214,.1); }
.recharge-rule-modal textarea { resize:vertical; }
.recharge-rule-date-hint { font-size:12px; color:var(--body); margin:12px 0 20px; }
.recharge-rule-preview { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 18px; border-radius:8px; background:#f0f8fd; margin-top:18px; color:var(--heading); }
.recharge-rule-preview small { display:block; margin-top:4px; font-size:12px; color:var(--body); }
.recharge-rule-preview strong { color:var(--brand); font-size:24px; }
.recharge-rule-modal .modal-footer { margin:0; padding:16px 24px; background:var(--bg-subtle); flex:none; }
@media(max-width:600px) { .recharge-rule-form-grid { grid-template-columns:1fr; } .recharge-rule-modal-body { padding:18px; } .recharge-rules-header { padding:16px; } }
@keyframes fade-in{from{opacity:0}to{opacity:1}} @keyframes fade-out{from{opacity:1}to{opacity:0}}
@keyframes scale-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
@keyframes scale-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}

/* ===== 统一居中表单弹窗（兼容原抽屉入口） ===== */
.drawer-overlay { position:fixed; inset:0; background:rgba(6,27,49,0.45); z-index:1100; animation:fade-in .18s ease-out; }
.drawer-overlay.closing { animation:fade-out .15s ease-in forwards; }
.guide-commission-detail-layer { position:absolute; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center; padding:24px; min-width:0; min-height:0; }
.guide-commission-detail-layer .guide-commission-detail-overlay { position:absolute; inset:0; }
.drawer-panel { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:480px; max-width:92vw; max-height:calc(100dvh - 40px); background:var(--bg); border-radius:8px; box-shadow:var(--shadow-lg); z-index:1101; display:flex; flex-direction:column; overflow:hidden; animation:drawer-center-in .18s ease-out; }
.drawer-panel.closing { animation:drawer-center-out .15s ease-in forwards; }
.drawer-header { padding:20px 24px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.drawer-header .drawer-title { font-size:18px; font-weight:600; color:var(--heading); }
.drawer-header .drawer-close { width:32px; height:32px; border-radius:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--body); background:var(--bg-subtle); border:none; font-size:20px; }
.drawer-header .drawer-close:hover { background:var(--border); color:var(--heading); }
.drawer-body { flex:1; min-height:0; overflow-y:auto; padding:24px; }
.drawer-panel.stocktake-dialog { width:1060px; max-width:calc(100vw - 48px); }
.stocktake-dialog .drawer-header { padding:16px 20px; }
.stocktake-dialog .drawer-body { padding:16px 20px; }
.stocktake-detail-dialog .drawer-body { display:flex; flex-direction:column; overflow:hidden; }
.stocktake-detail-info { display:grid; grid-template-columns:1fr 1fr; gap:8px 24px; flex:none; font-size:13px; line-height:22px; }
.stocktake-detail-info > div { min-width:0; overflow-wrap:anywhere; }
.stocktake-detail-wide { grid-column:1 / -1; }
.stocktake-detail-scroll { margin-top:16px; min-height:0; overflow:auto; }
.stocktake-detail-table { width:100%; min-width:1180px; table-layout:auto; }
.stocktake-detail-table th { white-space:nowrap; }
.stocktake-detail-table td:first-child { min-width:200px; max-width:320px; }
.stocktake-detail-summary { flex:none; padding:12px 0 0; line-height:24px; font-size:13px; font-variant-numeric:tabular-nums; }
.stocktake-detail-table th { position:sticky; top:0; z-index:1; }
.stocktake-detail-table th,.stocktake-detail-table td { padding:10px 8px; font-size:13px; text-align:center; vertical-align:middle; }
.stocktake-detail-table td { white-space:normal; overflow-wrap:anywhere; }
.stocktake-detail-table td:nth-child(n+3) { font-variant-numeric:tabular-nums; }
.stocktake-detail-pagination { flex:none; padding-top:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; }
.stocktake-detail-pagination[hidden] { display:none; }
.stocktake-detail-pagination > div { display:flex; align-items:center; gap:10px; }
.stocktake-detail-pagination select { height:30px; border:1px solid var(--border); background:#fff; font:inherit; }
.stocktake-detail-actions { flex:none; padding-top:14px; display:flex; gap:8px; justify-content:flex-end; }
@media(max-width:1100px) { .stocktake-detail-table th,.stocktake-detail-table td { padding:9px 5px; font-size:12px; } }
.guide-commission-detail-layer .guide-commission-detail-modal { position:relative; top:auto; left:auto; transform:none; flex:0 1 1400px; width:100%; max-width:100%; min-width:0; max-height:100%; animation:fade-in .18s ease-out; }
.guide-commission-detail-layer .guide-commission-detail-modal.closing { animation:fade-out .15s ease-in forwards; }
.guide-commission-detail-modal .drawer-title { overflow-wrap:anywhere; padding-right:16px; }
.guide-commission-detail-modal .drawer-close { flex-shrink:0; }
.guide-commission-detail-modal .drawer-body { padding:0 24px 24px; overflow:auto; }
.guide-commission-detail-table { width:100%; min-width:0; table-layout:fixed; }
.guide-commission-detail-table th,.guide-commission-detail-table td { white-space:normal; overflow-wrap:anywhere; padding:12px; vertical-align:middle; }
.guide-commission-detail-table th { position:sticky; top:0; background:var(--bg-subtle); z-index:1; }
@media(max-width:760px) { .guide-commission-detail-modal { max-width:calc(100vw - 24px); } .guide-commission-detail-modal .drawer-body { padding:0 12px 12px; } .guide-commission-detail-table th,.guide-commission-detail-table td { padding:8px 4px; font-size:12px; } }
.discount-analysis-note { padding:16px; color:var(--text-secondary); line-height:1.7; }
.discount-analysis .discount-analysis-table { min-width:1040px; }
.discount-analysis-table th:first-child { width:180px; }
.discount-analysis-table th:nth-child(2) { width:22%; }
.discount-analysis-table td { white-space:normal; overflow-wrap:anywhere; }
.discount-actions { white-space:nowrap !important; }
.discount-action { color:#0879c7; border:1px solid #b8dcf4; background:#f2f9ff; padding:6px 9px; border-radius:5px; cursor:pointer; font:inherit; font-size:13px; margin:2px 4px 2px 0; }
.discount-action:hover { color:#005b9e; background:#e0f1ff; border-color:#1687d1; }
.discount-action:focus-visible { outline:2px solid #1687d1; outline-offset:2px; }
.discount-dialog-overlay { padding:24px; box-sizing:border-box; z-index:1200; }
.discount-dialog.modal-box { width:min(1200px,96vw); max-width:1200px; max-height:calc(100vh - 48px); padding:0; display:flex; flex-direction:column; overflow:hidden; }
.discount-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; border-bottom:1px solid var(--border); flex-shrink:0; }
.discount-dialog-header h2 { margin:0; font-size:19px; overflow-wrap:anywhere; }
.discount-dialog-close { width:34px; height:34px; flex-shrink:0; border:1px solid var(--border); border-radius:6px; background:var(--bg-subtle); color:var(--body); cursor:pointer; font-size:24px; }
.discount-dialog-body { overflow:auto; min-height:0; padding:20px 24px; }
.discount-dialog .hint-text { line-height:1.7; margin-bottom:16px; }
.discount-dialog .data-table { min-width:900px; }
.discount-dialog .data-table td { white-space:normal; overflow-wrap:anywhere; }
@media(max-width:640px) { .discount-dialog-overlay { padding:12px; } .discount-dialog.modal-box { max-height:calc(100vh - 24px); } .discount-dialog-header,.discount-dialog-body { padding:14px; } }
.member-editor-section { border:1px solid var(--border); padding:16px; margin-bottom:16px; background:#fff; }
.member-editor-section-title { color:var(--heading); font-size:15px; font-weight:600; border-left:3px solid var(--brand); padding-left:9px; margin-bottom:14px; }
.member-create-regions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:8px; }
.member-create-tags { display:flex; flex-wrap:wrap; gap:8px 16px; max-height:180px; overflow:auto; }
.member-create-tag { display:flex; align-items:center; gap:5px; font-weight:normal; }
.member-create-tag input { width:auto; min-height:0; margin:0; }
@media(max-width:600px) { .member-create-regions { grid-template-columns:1fr; } }
.member-editor-section .form-input { width:100%; box-sizing:border-box; border:1px solid #b8c4d1; border-radius:6px; padding:9px 11px; min-height:38px; background:#fff; color:#253247; }
.member-editor-section .form-input:focus { border-color:#248b6d; outline:2px solid #e1f3ec; }
.receipt-template-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; padding:16px 0; }
.receipt-template-card { display:flex; flex-direction:column; gap:6px; text-align:left; border:1px solid var(--border); border-radius:8px; background:#fff; padding:16px; cursor:pointer; }
.receipt-template-card.is-active { border-color:var(--brand); box-shadow:0 0 0 2px rgba(35,118,90,.12); }
.receipt-template-card strong { color:var(--heading); font-size:15px; }
.receipt-template-card span { color:var(--text-secondary); font-size:12px; line-height:1.5; }
.member-editor-section .form-input[readonly] { background:#f4f6f8; color:#586779; }
.member-profile.modal-box { width:min(1140px,94vw); max-width:1140px; max-height:92vh; overflow-y:auto; padding:24px; }
.member-profile .modal-title { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.member-profile section { border:1px solid #e1e6ed; border-radius:8px; padding:18px; margin-top:16px; }
.member-profile h3 { margin:0 0 16px; font-size:16px; }
.member-profile-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.member-profile-grid span,.member-profile-values span { display:block; color:#738093; font-size:12px; margin-bottom:6px; }
.member-profile-grid strong { font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.member-profile-values { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.member-profile-values > div { flex:1; min-width:110px; border-radius:7px; background:#f1f7f5; padding:16px; }
.member-profile-values strong { font-size:19px; color:#23765a; }
.member-profile-filter { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:18px 0; }
.member-profile-filter input { border:1px solid #b8c4d1; border-radius:5px; padding:7px; }
.member-portrait-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.member-profile .table-scroll { overflow:auto; }
@media(max-width:700px) { .member-profile-grid { grid-template-columns:1fr 1fr; } .member-portrait-grid { grid-template-columns:1fr; } }
.drawer-footer { padding:16px 24px; border-top:1px solid var(--border); display:flex; gap:10px; justify-content:flex-end; flex-shrink:0; }
@keyframes drawer-center-in{from{opacity:0;transform:translate(-50%,-50%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes drawer-center-out{from{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(.96)}}

/* 下拉选择中的“编辑”入口 */
.select-edit-item { border-top:1px solid var(--border); padding:10px; text-align:center; color:var(--brand); cursor:pointer; font-size:13px; }
.select-edit-item:hover { background:var(--brand-50); }

/* 基础数据表格 */
.simple-table { width:100%; border-collapse:collapse; }
.simple-table th { background:var(--bg-subtle); padding:9px 12px; font-size:13px; font-weight:400; color:#000000; border:1px solid var(--border); text-align:left; }
.simple-table td { padding:10px 12px; border:1px solid var(--border); font-size:13px; color:#000000; }
.simple-table tbody tr:nth-child(even) td { background:#fafafa; }
.simple-table tbody tr:hover td { background:#eff8fd; }

/* 标签页 */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:16px; }
.tab { padding:10px 18px; cursor:pointer; color:var(--body); font-size:14px; border-bottom:2px solid transparent; margin-bottom:-1px; }
.tab:hover { color:var(--heading); }
.tab.active { color:var(--brand); border-bottom-color:var(--brand); font-weight:500; }

/* ===== 层级树 ===== */
.hierarchy-tree { padding:8px 0; }
.tree-node { display:flex; align-items:center; padding:8px 10px; border-radius:var(--radius-btn); margin-bottom:2px; cursor:pointer; transition:background .12s; font-size:14px; }
.tree-node:hover { background:var(--bg-subtle); }
.tree-node .node-icon { width:32px; height:32px; border-radius:var(--radius-card); display:flex; align-items:center; justify-content:center; font-size:16px; margin-right:10px; flex-shrink:0; }
.tree-node .node-icon.type-hq { background:var(--brand); color:#fff; }
.tree-node .node-icon.type-store { background:var(--success); color:#fff; }
.tree-node .node-icon.type-warehouse { background:var(--warning); color:#fff; }
.tree-node .node-icon.type-region { background:#8b5cf6; color:#fff; }
.tree-children { padding-left:24px; border-left:1px dashed var(--border); margin-left:15px; }
.tree-node .node-arrow { margin-right:6px; font-size:10px; color:var(--body); transition:transform .15s; }
.tree-node .node-arrow.expanded { transform:rotate(90deg); }

/* 拖拽排序 */
.tree-node[draggable="true"] { cursor:move; }
.tree-node.dragging { opacity:.5; }
.tree-node.drag-over { background:var(--brand-50); border:1px dashed var(--brand); }

/* ===== 空状态 / 加载 ===== */
.empty-state { text-align:center; padding:60px 20px; color:var(--body); }
.empty-icon { font-size:48px; margin-bottom:12px; opacity:.5; }
.empty-title { font-size:16px; font-weight:500; color:var(--heading); margin-bottom:6px; }
.empty-desc { font-size:14px; }
.loading-wrap { text-align:center; padding:60px 20px; color:var(--body); font-size:14px; }
.spinner { display:inline-block; width:28px; height:28px; border:3px solid var(--border); border-top-color:var(--brand); border-radius:50%; animation:spin .6s linear infinite; margin-bottom:12px; }
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== 确认面板 ===== */
.confirm-panel { background:var(--warning-bg); border:1px solid #edcf9b; border-radius:var(--radius-card); padding:14px 18px; color:#8a5a16; font-size:14px; margin-bottom:16px; display:flex; align-items:center; gap:12px; }
.confirm-actions { margin-left:auto; display:flex; gap:8px; }

/* ===== Switch 开关 ===== */
.switch { position:relative; display:inline-block; width:44px; height:24px; }
.switch input { opacity:0; width:0; height:0; }
.switch-slider { position:absolute; cursor:pointer; top:0;left:0;right:0;bottom:0; background:#ccc; border-radius:24px; transition:.3s; }
.switch-slider::before { content:""; position:absolute; height:18px;width:18px; left:3px;bottom:3px; background:#fff; border-radius:50%; transition:.3s; }
.switch input:checked + .switch-slider { background:var(--brand); }
.switch input:checked + .switch-slider::before { transform:translateX(20px); }
.switch input:disabled + .switch-slider { opacity:.5; cursor:not-allowed; }
.system-setting-row { display:flex; align-items:center; gap:20px; padding:20px; border:1px solid var(--border); border-radius:var(--radius-card); background:var(--bg); transition:border-color .15s; }
.system-setting-row + .system-setting-row { margin-top:12px; }
.system-setting-row.is-enabled { border-color:#bcdcec; background:var(--brand-50); }
.system-setting-label { width:240px; flex-shrink:0; color:var(--heading); font-size:15px; font-weight:700; }
.system-setting-label .tag { margin-top:7px; }
.system-setting-description { flex:1; color:var(--body); font-size:13px; line-height:1.75; }
.system-setting-switch { width:52px; height:28px; flex-shrink:0; }
.system-setting-switch .switch-slider { border:1px solid rgba(29,52,43,.08); background:#cad3cd; }
.system-setting-switch .switch-slider::before { width:22px; height:22px; left:2px; bottom:2px; box-shadow:0 1px 3px rgba(29,52,43,.24); }
.system-setting-switch input:checked + .switch-slider { background:var(--brand); border-color:var(--brand); }
.system-setting-switch input:checked + .switch-slider::before { transform:translateX(24px); }
.system-setting-switch input:indeterminate + .switch-slider { background:var(--brand); }
.system-setting-switch input:indeterminate + .switch-slider::before { width:18px; height:4px; left:16px; bottom:11px; border-radius:2px; box-shadow:none; }
.system-setting-action { display:flex; flex-direction:column; align-items:center; gap:6px; flex-shrink:0; font-size:12px; }
.void-setting-summary { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:8px; color:var(--heading); }
.void-store-modal { width:620px; }
.void-store-search { padding:0 24px 14px; flex-shrink:0; }
.void-store-search input { width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius-input); font:inherit; }
.void-store-list { min-height:0; overflow-y:auto; padding:0 24px 12px; }
.void-store-row { display:flex; align-items:center; gap:16px; padding:12px 0; border-top:1px solid var(--border); }
.void-store-row[hidden], .void-store-empty[hidden] { display:none; }
.void-store-row strong { flex:1; min-width:0; overflow-wrap:anywhere; font-size:14px; }
.void-store-row .td-secondary { flex-shrink:0; font-size:12px; }
.system-settings-notice { display:flex; align-items:flex-start; gap:12px; margin:0 0 16px; padding:14px 16px; border:1px solid #eed3a8; border-left:4px solid var(--warning); border-radius:12px; background:var(--warning-bg); color:#865510; }
.system-settings-notice-icon { font-size:18px; line-height:1.35; }
.system-settings-notice-title { font-weight:700; margin-bottom:3px; }
.system-settings-notice-text { font-size:13px; line-height:1.65; }
.system-settings-modal { width:550px; padding:0; overflow:hidden; }
.system-settings-modal-header { display:flex; align-items:center; gap:10px; padding:18px 22px; background:var(--brand); color:#fff; }
.system-settings-modal-header-icon { display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:rgba(255,255,255,.18); font-size:17px; font-weight:700; }
.system-settings-modal-title { font-size:18px; font-weight:700; }
.system-settings-modal-body { padding:22px; color:var(--body); line-height:1.7; }
.system-settings-modal-body p { margin:0 0 14px; }
.system-settings-modal-list { margin:0; padding:0; list-style:none; }
.system-settings-modal-list li { position:relative; padding:8px 0 8px 22px; border-top:1px solid var(--border); }
.system-settings-modal-list li::before { content:'•'; position:absolute; left:7px; color:var(--brand); font-size:18px; line-height:1.2; }
.system-settings-modal-code { display:block; margin-top:12px; padding:10px 12px; border-radius:8px; background:var(--bg-subtle); color:var(--heading); font-family:Consolas,"Microsoft YaHei",monospace; font-size:12px; overflow-wrap:anywhere; }
.system-settings-modal .modal-footer { margin:0; padding:16px 22px; background:var(--bg-subtle); }

.test-preview-card { scroll-margin-top:18px; }
.test-preview-card h3 { margin:22px 0 10px; color:var(--heading); font-size:16px; }
.test-preview-card p { color:var(--body); font-size:14px; line-height:1.75; }
.test-preview-status { padding:14px 16px; border-radius:8px; font-weight:600; line-height:1.6; }
.test-preview-status.is-safe { background:var(--success-bg); color:var(--success); }
.test-preview-status.is-blocked { background:var(--danger-bg); color:var(--danger); }
.test-preview-table { max-width:680px; }
.test-preview-detail-table { width:100%; max-width:none; table-layout:fixed; }
.test-preview-detail-table > thead > tr > th:nth-child(1) { width:15%; }
.test-preview-detail-table > thead > tr > th:nth-child(2) { width:9%; }
.test-preview-detail-table > thead > tr > th:nth-child(3) { width:42%; }
.test-preview-detail-table > thead > tr > th:nth-child(4) { width:10%; }
.test-preview-detail-table > thead > tr > th:nth-child(5) { width:24%; }
.test-preview-detail-table td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.test-preview-detail-table details { margin-top:8px; }
.test-preview-detail-table summary { cursor:pointer; color:var(--primary); }
.test-preview-detail-table details .data-table { width:100%; table-layout:fixed; margin-top:8px; }
.test-preview-table-name { display:block; margin-top:3px; color:var(--body); font-size:12px; }
.test-preview-conflicts { margin:0; padding-left:22px; color:var(--body); font-size:14px; line-height:2; }
.test-preview-scope { padding:14px 16px; background:var(--bg-subtle); border-radius:8px; }
.test-preview-confirm { margin-top:20px; padding:18px; border:1px solid var(--danger); border-radius:8px; }
.test-preview-confirm > strong { color:var(--danger); }
.test-preview-confirm label { display:block; margin:14px 0 8px; font-size:14px; }
.test-preview-confirm code { overflow-wrap:anywhere; }
.test-preview-confirm-actions { display:flex; gap:12px; align-items:center; }
.test-preview-confirm-actions input { min-width:0; flex:1; max-width:420px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-input); font:inherit; }
.test-preview-confirm-actions .btn:disabled { opacity:.5; cursor:not-allowed; }

/* ===== 表内输入框 ===== */
.table-input { padding:6px 8px; border:1px solid var(--border); border-radius:var(--radius-input); font-size:13px; font-family:var(--font); width:140px; }
.table-input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 2px var(--brand-10); }

/* ===== 无数据表格提示 ===== */
.table-empty { text-align:center; padding:32px; color:var(--body); font-size:14px; }

/* ===== 响应式 ===== */
@media (max-width:1200px) { .stats-row, .stats-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:768px) {
    .stats-row, .stats-grid { grid-template-columns:1fr; }
    .filter-bar { flex-direction:column; align-items:stretch; } .form-row { flex-direction:column; }
    .system-setting-row { align-items:flex-start; flex-wrap:wrap; } .system-setting-label { width:100%; } .system-setting-description { flex-basis:calc(100% - 72px); } .system-setting-switch { margin-left:auto; } .system-setting-action { margin-left:auto; }
    .test-preview-confirm-actions { align-items:stretch; flex-direction:column; } .test-preview-confirm-actions input { max-width:none; width:100%; }
    .login-card { width:90%; padding:32px 24px; } .top-bar { padding:0 12px; } .content-scroll { padding:12px; }
}
@media print { .icon-sidebar,.menu-sidebar,.top-bar { display:none; } }
.receipt-editor { display: grid; grid-template-columns: 280px minmax(340px, 1fr) 260px; align-items: start; }
.receipt-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.receipt-toolbar .btn-primary { margin-left: auto; }
.receipt-global-editor { margin:0 0 20px; padding:0; background:var(--bg); }
.receipt-global-heading { display:flex; flex-direction:column; gap:8px; }
.receipt-global-heading h3 { margin:0 0 5px; color:var(--heading); font-size:15px; }
.receipt-global-heading .btn { margin-right:6px; }
.receipt-template-text { width:100%; min-height:360px; box-sizing:border-box; resize:vertical; margin-top:12px; padding:10px; border:1px solid var(--border); border-radius:var(--radius-input); background:white; color:var(--heading); font:12px/1.6 Consolas, 'Microsoft YaHei', monospace; }
.receipt-template-text:focus { outline:2px solid var(--brand-10); border-color:var(--brand); }
.receipt-token-bar { display:flex; flex-wrap:wrap; gap:5px; align-items:center; margin-top:10px; color:var(--body); font-size:12px; }
.receipt-token { border:1px solid #c6e2f1; border-radius:2px; padding:4px 7px; background:var(--info-bg); color:var(--brand); cursor:pointer; font-size:12px; }
.receipt-token:hover { background:#dceffa; }
.receipt-token-block { border-color: #efc992; background: #fff5df; color: #95601d; }
.receipt-presets { padding:16px; }
.receipt-editor h3 { font-size:15px; margin:10px 0; color:var(--heading); }
.receipt-preset { width:100%; display:flex; flex-direction:column; align-items:center; gap:5px; padding:10px; margin:10px 0; border:1px solid var(--border); border-radius:var(--radius-btn); background:var(--bg); cursor:pointer; color:var(--heading); }
.receipt-preset:hover { border-color:var(--brand); background:var(--brand-50); }
.receipt-preset > span:last-child { font-size:11px; color:var(--body); }
.receipt-mini-paper { display: flex; flex-direction: column; gap: 5px; width: 102px; padding: 12px; background: white; color: #000000; box-shadow: 0 2px 8px #153b2912; font-size: 9px; }
.receipt-mini-paper i { border-top: 1px dashed #aaa; margin: 2px 0; }
.receipt-stage { background:#ebebeb; padding:20px 14px; min-height:700px; text-align:center; }
.receipt-stage-heading { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:var(--body); margin-bottom:24px; }
.receipt-paper-wrap { display: flex; justify-content: center; }
.receipt-width-option { border:1px solid var(--brand); border-radius:var(--radius-input); background:var(--info-bg); padding:12px; width:100%; color:var(--brand); font-weight:500; }
.receipt-width-option span { display: block; font-size: 12px; font-weight: normal; margin-top: 4px; }
.receipt-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.receipt-fields { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 20px; }
.receipt-fields .form-group { width: 100%; }
.receipt-fields .form-group > label { display:block; margin-bottom:7px; font-size:12px; color:var(--body); }
.receipt-fields .form-group input, .receipt-fields .form-group select { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid var(--border); border-radius:var(--radius-input); background:white; font-size:13px; color:var(--heading); }
.receipt-fields .form-group input:focus, .receipt-fields .form-group select:focus { outline:2px solid var(--brand-10); border-color:var(--brand); }
.receipt-option { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.receipt-preview { flex: 0 0 auto; box-sizing: border-box; width: 80mm; min-height: 390px; padding: 3mm 4mm 6mm; background: #fff; color: #111; box-shadow: 0 10px 25px #152c2912; font: 9pt/normal 'Microsoft YaHei', sans-serif; text-align: left; overflow-wrap: anywhere; }
.receipt-preview > div, .receipt-preview > button { margin-bottom: var(--receipt-spacing, 3px); }
.receipt-goods-table { width:100%; table-layout:fixed; border-collapse:collapse; font:inherit; }
.receipt-goods-table th,.receipt-goods-table td { border:0; padding:3px 2px; white-space:normal; overflow-wrap:anywhere; vertical-align:top; text-align:right; background:white; color:#111; }
.receipt-goods-table th:first-child,.receipt-goods-table td:first-child { text-align:left; }
.receipt-preview hr { border: 0; border-top: 1px dashed #111; margin: 6px 0; }
.receipt-preview hr.receipt-rule-solid { border-top-style: solid; }
.receipt-title { display: block; width: 100%; text-align: center; font-family: inherit; font-weight: bold; font-size: 12pt; line-height: normal; border: 0; padding: 0; background: transparent; color: inherit; overflow-wrap: anywhere; cursor: pointer; }
.receipt-title:hover { outline:1px dashed var(--brand); }
.receipt-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.receipt-image-upload { display:flex; flex-direction:column; align-items:center; gap:5px; padding:10px; border:1px dashed #ccc; border-radius:var(--radius-input); cursor:pointer; font-size:12px; }
.receipt-image-upload input { width: 100%; font-size: 10px; }
.receipt-image-upload span { height: 65px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #9db4a7; }
.receipt-image-upload img { max-width: 90px; max-height: 65px; object-fit: contain; }
.receipt-image-grid .btn { margin-top: 6px; font-size: 12px; }
.receipt-preview > .receipt-print-image { display: block; width: auto; max-width: 38mm; max-height: 38mm; margin: 4px auto; image-rendering: pixelated; }
.member-tag-group-row td { background:var(--info-bg); color:var(--brand); font-weight:600; }
.receipt-mini-paper { display:none; }
@media (max-width:1199px) { .receipt-editor { grid-template-columns:minmax(340px, 1fr) 260px; } .receipt-presets { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:12px; align-items:center; } .receipt-global-editor { width:100%; } .receipt-template-text { min-height:220px; } .receipt-presets h3, .receipt-presets > p { margin:0; } .receipt-preset { width:150px; margin:0; } }
@media (max-width: 1000px) { .receipt-editor { grid-template-columns: 1fr; } .receipt-stage { min-height: 0; padding: 16px 8px; } .receipt-fields { width: 100%; box-sizing: border-box; } }
.store-sync-list { max-height: 360px; overflow: auto; margin: 16px 0; border-top: 1px solid var(--border); }
.store-profile-card { max-width:980px; margin:0 auto; padding:22px 28px; }
.store-profile-toolbar { max-width:980px; margin:0 auto 14px; }
.store-profile-row { display:flex; gap:28px; align-items:flex-start; min-height:80px; padding:20px 8px; border-bottom:1px solid #eee; }
.store-profile-label { width:180px; flex-shrink:0; color:var(--brand); font-weight:600; padding-top:8px; }
.store-profile-value { flex:1; min-width:0; color:var(--heading); padding-top:6px; }
.store-profile-value input { display:block; width:100%; max-width:540px; min-height:36px; padding:8px 10px; font:inherit; color:var(--heading); border:1px solid #d7d7d7; border-radius:var(--radius-input); background:#fff; }
.store-profile-value input:focus { outline:2px solid var(--brand-10); border-color:var(--brand); }
.store-profile-value .form-hint { display:block; margin-top:7px; }
.store-profile-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:24px; }
@media (max-width:768px) { .store-profile-card { padding:18px; } .store-profile-row { flex-direction:column; gap:6px; } .store-profile-label, .store-profile-value { width:100%; } }
.store-sync-row { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }

/* ===== 概览仪表盘与营业概况报表 ===== */
.test-batch-progress { margin-top: 16px; max-width: 560px; color: var(--text-secondary); font-size: 13px; }
.test-batch-progress-track { height: 10px; margin-bottom: 8px; overflow: hidden; border-radius: 6px; background: #e5edf2; }
.test-batch-progress-track span { display: block; height: 100%; border-radius: inherit; background: #0b93d5; transition: width .4s ease; }
.dashboard-retail-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; align-items:start; }
.dashboard-retail-content { display:grid; gap:16px; min-width:0; }
.dashboard-retail-grid .card { min-width:0; margin:0; }
.dashboard-retail-grid .card-header { gap:12px; flex-wrap:wrap; }
.dashboard-retail-grid .card-header .td-secondary { font-size:12px; font-weight:400; }
.dashboard-retail-main { padding:20px 24px; }
.dashboard-section-title { margin:18px 0 10px; color:var(--heading); font-size:16px; font-weight:600; }
.dashboard-sales-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:100%; max-width:1280px; margin-inline:auto; border:1px solid #edf0f2; background:#fff; }
.dashboard-sales-panel > * { background:#fafafa; }
.dashboard-filter-bar { justify-content:flex-end; }
.dashboard-filter-bar .sales-date-menu { left:auto; right:0; z-index:30; }
.dashboard-sales-panel .dashboard-primary-metric { align-items:center; text-align:center; }
.dashboard-sales-panel .dashboard-progress-metric { padding-left:24px; padding-right:24px; }
.dashboard-primary-metric, .dashboard-progress-metric { min-width:0; min-height:154px; padding:22px 18px; border-right:1px solid #edf0f2; display:flex; flex-direction:column; justify-content:center; }
.dashboard-primary-metric:last-child, .dashboard-progress-metric:last-child { border-right:0; }
.dashboard-primary-metric strong { color:var(--brand); font-size:30px; line-height:1.2; font-weight:600; }
.dashboard-primary-metric span, .dashboard-progress-metric span, .dashboard-mini-grid span { color:var(--body); font-size:13px; margin-top:8px; }
.dashboard-progress-metric > div { display:flex; justify-content:space-between; gap:10px; color:var(--heading); font-size:13px; }
.dashboard-progress-metric b { font-weight:500; }
.dashboard-progress { height:4px; margin:8px 0 6px; background:#e7e9eb; border-radius:4px; overflow:hidden; }
.dashboard-progress i { display:block; height:100%; background:var(--brand); }
.dashboard-progress.orange i { background:#f0a000; }
.dashboard-progress.muted i { background:#d7dadd; }
.dashboard-progress-metric small { color:var(--body); font-size:11px; margin-bottom:13px; }
.dashboard-mini-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:14px; border:1px solid #edf0f2; }
.dashboard-mini-grid > div { min-width:0; min-height:92px; padding:18px 12px; text-align:center; border-right:1px solid #edf0f2; display:flex; flex-direction:column; justify-content:center; }
.dashboard-mini-grid > div:last-child { border-right:0; }
.dashboard-mini-grid > div { background:#fafafa; }
.dashboard-mini-grid strong { color:#3d4246; font-size:22px; font-weight:500; }
.dashboard-product-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dashboard-product-metrics > div { border-bottom:0 !important; }
.dashboard-target-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0 4px; }
.dashboard-target-grid > div { display:flex; flex-direction:column; gap:8px; padding:16px; border:1px solid var(--border); border-radius:var(--radius-card); }
.dashboard-target-grid strong { color:var(--brand); font-size:22px; }
.dashboard-target-grid small { color:var(--body); }
.dashboard-target-settings .dashboard-module-note { padding:0 16px; }
.dashboard-target-settings .form-input { width:150px; min-height:34px; padding:6px 9px; border:1px solid var(--border); border-radius:var(--radius-input); }
@media (max-width:700px) { .dashboard-target-grid { grid-template-columns:1fr; } }
.dashboard-ranking-row { display:grid; grid-template-columns:42px minmax(0,1fr) 80px 130px; gap:12px; align-items:center; min-height:44px; padding:0 12px; border-bottom:1px solid #edf0f2; color:var(--body); font-size:13px; }
.dashboard-ranking-row:last-child { border-bottom:0; }
.dashboard-ranking-row > :nth-child(3), .dashboard-ranking-row > :last-child { text-align:right; white-space:nowrap; }
.dashboard-ranking-header { background:var(--bg-subtle); font-size:12px; }
.dashboard-ranking-header > :first-child { text-align:center; }
.dashboard-ranking-empty { display:flex; align-items:center; justify-content:center; min-height:120px; padding:24px; color:var(--body); font-size:14px; text-align:center; }
.dashboard-module-note { font-size:12px; line-height:1.8; margin:0 0 12px; }
.dashboard-metric-switch { display:flex; gap:4px; flex-shrink:0; }
.dashboard-goods-row { padding:16px 0; }
.dashboard-goods-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.dashboard-goods-name { display:flex; align-items:center; gap:12px; min-width:0; flex:1; color:var(--heading); font-size:13px; }
.dashboard-goods-name > :last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-goods-values { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px 16px; color:var(--body); font-size:12px; }
.dashboard-goods-values span { white-space:nowrap; }
.dashboard-goods-values b { color:var(--brand); font-weight:500; }
.dashboard-goods-bar { height:5px; margin-top:12px; background:#f0f2f4; overflow:hidden; }
.dashboard-goods-bar span { display:block; height:100%; background:var(--brand); }
.dashboard-member-layout { display:grid; grid-template-columns:240px minmax(0,1fr); align-items:center; gap:32px; padding:24px 12px; }
.dashboard-member-donut { width:220px; height:220px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.dashboard-member-donut-center { width:160px; height:160px; border-radius:50%; background:var(--bg); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.dashboard-member-donut-center strong { color:var(--heading); font-size:20px; }
.dashboard-member-donut-center > span { color:var(--body); font-size:12px; }
.dashboard-member-legend { display:grid; gap:18px; color:var(--heading); font-size:13px; line-height:1.8; }
.dashboard-member-legend > div { display:flex; align-items:baseline; gap:12px; }
.dashboard-member-legend i { width:9px; height:9px; border-radius:50%; background:var(--cohort-color); flex-shrink:0; }
.dashboard-member-legend b { color:var(--cohort-color); font-weight:500; }
.dashboard-store-table { min-width:1100px; }
.dashboard-store-table th, .dashboard-store-table td { white-space:nowrap; }
.dashboard-store-table th:nth-child(n+3) { text-align:right; }
.dashboard-ranking-list b { color:var(--heading); font-weight:500; }
.dashboard-ranking-list strong { color:var(--brand); text-align:right; font-weight:600; }
.rank-index { color:var(--brand); font-weight:600; text-align:center; }
.business-summary-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; }
.business-summary-tabs { display:flex; gap:4px; flex-shrink:0; }
.business-summary-filters { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:1; min-width:0; padding:7px 10px; border:1px solid var(--border); background:var(--bg); }
.business-summary-filters .filter-label { display:inline-flex; align-items:center; gap:5px; color:var(--body); font-size:12px; white-space:nowrap; }
.business-summary-filters .filter-label select { min-width:112px; min-height:32px; height:32px; padding:5px 22px 5px 8px; font-size:12px; border:1px solid var(--border); border-radius:var(--radius-input); background:#fff; color:var(--heading); }
.business-summary-filters .sales-date-picker { margin-left:2px; }
.btn-danger { background:#f45151; color:#fff; border-color:#f45151; }
.btn-danger:hover { background:#df3c3c; border-color:#df3c3c; color:#fff; }
.business-summary-card { padding:0; overflow:visible; margin:0; }
.business-summary-card .card-header { padding:8px 12px; margin:0; }
.business-summary-card .data-table { min-width:0; table-layout:fixed; }
.business-summary-card .data-table th, .business-summary-card .data-table td { text-align:center; vertical-align:middle; }
.business-summary-card .data-table th:first-child, .business-summary-card .data-table td:first-child { text-align:left; color:var(--brand); font-weight:500; width:110px; }
.business-summary-card .data-table th:nth-child(2), .business-summary-card .data-table td:nth-child(2) { text-align:left; width:42%; white-space:normal; }
.content-scroll.business-summary-active { padding:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.business-summary-active .business-summary-toolbar { margin:0; padding:10px; flex-shrink:0; }
.business-summary-active .business-summary-metrics { margin:0 10px 10px; flex-shrink:0; }
.business-summary-active .business-summary-card { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; overflow:auto; }
.business-summary-active .business-summary-card .hint-text, .business-summary-active .business-summary-card .card-header { flex-shrink:0; }
.business-summary-active .business-summary-card .table-scroll { flex:1 1 auto; min-height:0; overflow:auto; }
.business-summary-active .business-summary-card .table-scroll .data-table { height:auto; }
.business-summary-active .business-summary-table tbody tr { height:44px; }
.business-summary-active .business-summary-card .table-scroll th { position:sticky; top:0; z-index:1; }
.business-summary-active .business-summary-card th, .business-summary-active .business-summary-card td { padding:6px 8px; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.business-summary-active .business-summary-card .hint-text { padding:7px 12px; margin:0 !important; font-size:11px; }
.business-summary-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:10px; }
.business-summary-metrics > div { padding:10px 14px; background:var(--bg); border:1px solid var(--border); border-radius:6px; display:flex; flex-direction:column; gap:4px; }
.business-summary-metrics span { color:var(--body); font-size:12px; }
.business-summary-metrics strong { color:var(--heading); font-size:20px; font-variant-numeric:tabular-nums; }
.business-summary-number { display:inline; padding:0; margin:0; border:0; border-radius:0; background:none; color:var(--brand); font:inherit; line-height:inherit; font-variant-numeric:tabular-nums; vertical-align:baseline; white-space:nowrap; cursor:pointer; }
.business-summary-number:hover { text-decoration:underline; }
.business-summary-zero { color:var(--body); cursor:default; }
.business-summary-metrics .business-summary-zero { font-size:inherit; }
.business-summary-metrics .business-summary-zero { font-size:inherit; }
.business-summary-number:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.business-summary-card .business-summary-table th:nth-child(2), .business-summary-card .business-summary-table td:nth-child(2) { width:440px; }
.business-summary-table td.td-amount { white-space:nowrap; }
.business-compare-layer { position:absolute; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:24px; background:#0007; box-sizing:border-box; }
.business-compare-dialog { width:min(1320px,100%); max-height:100%; min-height:0; background:#fff; border:1px solid var(--border); box-shadow:0 6px 24px #0003; display:flex; flex-direction:column; }
.business-compare-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.business-compare-dialog h3 { margin:0; font-size:14px; font-weight:500; color:var(--heading); overflow-wrap:anywhere; }
.business-compare-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.business-compare-close { border:0; background:none; color:var(--muted); font-size:24px; width:28px; height:28px; cursor:pointer; }
.business-compare-context { padding:7px 16px; color:var(--muted); font-size:12px; border-bottom:1px solid var(--border); }
.business-compare-scroll { min-height:0; overflow:auto; }
.business-compare-table { width:100%; min-width:560px; table-layout:auto; margin:0; font-variant-numeric:tabular-nums; }
.business-compare-table th, .business-compare-table td { padding:12px 16px; white-space:nowrap; }
.business-compare-table thead th { position:sticky; top:0; z-index:1; text-align:center; background:#f5f5f5; }
.business-compare-table td { text-align:right; }
.business-compare-table tbody td:first-child, .business-compare-table tfoot th { text-align:left; min-width:150px; }
.business-compare-table tbody tr:hover { background:#e7f7fc; }
.business-compare-table tfoot th, .business-compare-table tfoot td { position:sticky; bottom:0; background:#f5f5f5; font-weight:600; border-top:1px solid var(--border); }
.business-compare-chart { padding:12px 16px; overflow:auto; }
.business-compare-chart[hidden], .business-compare-scroll[hidden] { display:none; }
.business-compare-bar-row { display:grid; grid-template-columns:140px minmax(80px,1fr) 100px; gap:12px; align-items:center; padding:8px 0; font-size:12px; }
.business-compare-bar-row > span { overflow-wrap:anywhere; }
.business-compare-bar-row > strong { text-align:right; font-weight:500; font-variant-numeric:tabular-nums; }
.business-compare-bar-track { height:18px; background:#f4f6f8; }
.business-compare-bar-track i { display:block; height:100%; background:var(--brand); }
.business-compare-bar-track i.negative { background:#df6262; }
@media (max-width:1100px) { .business-compare-layer { padding:14px; } .business-compare-dialog > header { flex-wrap:wrap; padding:10px 12px; } .business-compare-actions { margin-left:auto; } }
@media (max-width:900px) { .business-summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .business-summary-active .business-summary-card .table-scroll { overflow:auto; } .business-summary-card .data-table { min-width:960px; } .business-summary-filters { flex-wrap:wrap; } }
@media (max-height:700px) { .business-summary-active .business-summary-card th, .business-summary-active .business-summary-card td { padding:4px 6px; font-size:11px; } .business-summary-metrics > div { padding:6px 12px; } .business-summary-metrics strong { font-size:18px; } }
@media (max-width:1100px) { .dashboard-sales-panel { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-primary-metric, .dashboard-progress-metric { border-bottom:1px solid #edf0f2; } .dashboard-sales-panel > :nth-child(2n) { border-right:0; } .dashboard-sales-panel > :nth-last-child(-n+2) { border-bottom:0; } }
@media (max-width:1100px) { .dashboard-goods-heading { flex-direction:column; align-items:stretch; gap:10px; } .dashboard-goods-values { justify-content:flex-start; } .dashboard-member-layout { grid-template-columns:1fr; justify-items:center; gap:24px; } .dashboard-member-legend { width:100%; } }
@media (max-width:900px) { .dashboard-mini-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-mini-grid > :nth-child(2n) { border-right:0; } .dashboard-mini-grid > :nth-child(-n+2) { border-bottom:1px solid #edf0f2; } .business-summary-toolbar { flex-direction:column; align-items:stretch; } .business-summary-filters { width:100%; justify-content:flex-start; } }
.coupon-scope-box { border: 1px solid #e1e7ef; border-radius: 12px; padding: 14px; margin: 16px 0; background: #f8fafc; }
.coupon-scope-heading { font-size: 16px; font-weight: 600; color: #25364d; }
.coupon-scope-switch { display: flex; gap: 8px; margin-bottom: 12px; }
#couponScopeTabs { display: flex; gap: 6px; margin: 10px 0; }
.coupon-scope-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 280px; overflow: auto; margin: 12px 0; }
.coupon-scope-options .rule-store-option { min-width: 0; align-items: flex-start; background: white; }
.coupon-scope-options small { display: block; color: #8793a3; font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.coupon-selected { border-top: 1px solid #e1e7ef; padding-top: 10px; margin-top: 10px; }
.coupon-selected strong { font-size: 12px; color: #61718a; }
.coupon-chip { border: 1px solid #cfe1f4; background: #eef6ff; color: #315d88; border-radius: 16px; padding: 5px 9px; margin: 4px 4px 0 0; font-size: 12px; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
@media (max-width: 480px) { .coupon-scope-options { grid-template-columns: 1fr; } }
.content-scroll.member-list-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.content-scroll.member-reconciliation-active { min-height:0; padding:0; display:flex; flex-direction:column; overflow:hidden; }
.member-reconciliation-page { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; background:#fff; }
.member-reconciliation-toolbar { flex:0 0 auto; margin:0; padding:8px 10px; gap:8px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.member-reconciliation-controls { margin-left:auto; display:flex; justify-content:flex-end; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.member-reconciliation-controls > select, .member-reconciliation-controls > input { height:32px; min-height:32px; padding:4px 8px; font-size:12px; }
.member-reconciliation-controls > input { width:220px; }
.member-reconciliation-toolbar .sales-date-trigger { min-width:245px; }
.member-reconciliation-list { flex:1 1 0; min-height:0; display:flex; overflow:hidden; }
.member-reconciliation-list .table-scroll { flex:1; min-height:0; overflow:auto; }
.member-reconciliation-list .data-table th, .member-reconciliation-list .data-table td { text-align:center; vertical-align:middle; }
.member-reconciliation-table { width:100%; table-layout:fixed; min-width:900px !important; }
.member-reconciliation-table th { background:#f5f5f5; position:sticky; top:0; z-index:1; text-align:center; padding:8px 4px; }
.member-reconciliation-table td { height:42px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:7px 5px; }
.member-reconciliation-order.expanded > td { background:#e5f7ff; }
.member-reconciliation-table .member-reconciliation-child .sale-item-name { text-align:center; color:var(--heading); }
.member-reconciliation-table .member-reconciliation-child .sale-pay-label { text-align:right; white-space:normal; overflow-wrap:anywhere; }
.member-reconciliation-table th:nth-child(2) { width:19%; }
.member-reconciliation-table th:nth-child(4) { width:11%; }
.member-reconciliation-goods th:first-child { width:19%; }
.member-reconciliation-goods th:nth-child(2) { width:13%; }
.member-reconciliation-goods th:nth-child(4) { width:8%; }
.member-reconciliation-pagination { flex:0 0 auto; background:#fafafa; border-top:1px solid var(--border); padding:3px 8px; }
.member-reconciliation-pagination .pagination { margin:0; }
.member-reconciliation-footer { flex:0 0 auto; display:flex; border-top:1px solid var(--border); background:#f8f9fa; min-height:94px; }
.member-reconciliation-profile { flex:1; min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 12px; padding:16px 20px; font-size:13px; color:var(--body); }
.member-reconciliation-profile span { min-width:0; overflow-wrap:anywhere; }
.member-reconciliation-profile b { color:var(--brand); font-weight:500; }
.member-reconciliation-totals { width:230px; flex:0 0 auto; background:#e9f4f9; padding:14px 24px; display:flex; flex-direction:column; justify-content:center; gap:8px; font-size:13px; }
.member-reconciliation-totals span { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.member-reconciliation-totals strong { color:#ff8a00; font-size:22px; }
.member-reconciliation-select-note { padding:16px; color:var(--brand); }
@media (max-width:1100px) { .member-reconciliation-profile { grid-template-columns:repeat(2,minmax(0,1fr)); } .member-reconciliation-totals { width:190px; padding:14px; } }
.member-list-page { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }
.member-list-page > .filter-bar { flex:0 0 auto; margin:0; padding:7px 10px; gap:8px; background:#fff; }
.member-list-page > .filter-bar select, .member-list-page > .filter-bar input[type="text"] { height:32px; min-height:32px; padding:4px 8px; font-size:12px; }
.member-list-page .filter-bar-controls .search-w { width:180px; min-width:130px; }
.member-list-card { display:flex; flex:1 1 0; flex-direction:column; min-height:0; overflow:hidden; padding:0; margin:0; background:#fff; }
.member-list-card .table-scroll { flex:1 1 auto; min-height:0; overflow:auto; }
.member-list-table { min-width:1300px !important; width:100%; table-layout:fixed; }
.member-list-table th { position:sticky; top:0; z-index:1; height:39px; padding:6px 4px; text-align:center; background:#f5f5f5; }
.member-list-table td { height:40px; padding:6px 5px; text-align:left; vertical-align:middle; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.member-list-table .member-col-seq { width:4%; }
.member-list-table .member-col-action { width:8%; }
.member-list-table .member-col-id { width:9%; }
.member-list-table .member-col-name { width:7%; }
.member-list-table .member-col-phone { width:10%; }
.member-list-table .member-col-level { width:9%; }
.member-list-table .member-col-number { width:6%; }
.member-list-table .member-col-guide { width:9%; }
.member-list-table .member-col-store { width:10%; }
.member-list-table .member-col-date { width:10%; }
.member-shopping-layer { position:absolute; inset:0; z-index:110; display:flex; align-items:center; justify-content:center; padding:20px; background:#0007; box-sizing:border-box; }
.member-shopping-dialog { display:flex; flex-direction:column; width:min(1120px,100%); max-height:calc(100% - 16px); min-height:min(440px,85%); background:#fff; border-radius:6px; box-shadow:0 10px 36px #0003; overflow:hidden; }
.member-shopping-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); }
.member-shopping-dialog h3 { margin:0; color:var(--brand); font-size:16px; }
.member-shopping-dialog header small { font-size:12px; font-weight:400; color:var(--text-secondary); margin-left:12px; }
.member-shopping-scroll { flex:1; min-height:0; overflow:auto; }
.member-shopping-table { min-width:1040px; width:100%; table-layout:fixed; }
.member-shopping-table th { position:sticky; top:0; background:#f5f5f5; z-index:1; }
.member-shopping-table th, .member-shopping-table td { text-align:center; vertical-align:middle; padding:10px 8px; }
.member-shopping-table th:first-child { width:116px; }
.member-shopping-table th:nth-child(2) { width:20%; }
.member-shopping-table th:last-child { width:150px; }
.member-shopping-table td:first-child button { display:block; margin:2px auto; }
.member-shopping-last-recharge { white-space:normal; }
.member-shopping-history-heading, .member-shopping-history-pager { display:flex; align-items:center; gap:12px; padding:12px 16px; }
.member-shopping-recharges { min-width:1000px; width:100%; }
.member-shopping-recharges th, .member-shopping-recharges td { text-align:center; padding:10px 8px; }
.member-shopping-recharges td:nth-child(2) { max-width:260px; overflow-wrap:anywhere; }
.member-shopping-recharges td:nth-child(3), .member-shopping-recharges td:nth-child(4), .member-shopping-recharges td:nth-child(5) { text-align:right; font-variant-numeric:tabular-nums; }
.member-shopping-table td:nth-child(2) { text-align:left; overflow-wrap:anywhere; }
.member-shopping-table td:nth-child(5) { text-align:right; font-variant-numeric:tabular-nums; }
.member-shopping-void, .member-shopping-voided { color:#b42318; }
.member-shopping-dialog > footer { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:10px 16px; border-top:1px solid var(--border); font-size:12px; color:var(--text-secondary); }
.member-shopping-confirm { padding:14px 16px; border-top:1px solid var(--border); background:#fffaf7; }
.member-shopping-confirm[hidden] { display:none; }
.member-shopping-confirm p { margin:0 0 10px; line-height:1.6; }
.member-shopping-confirm-fields { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.member-shopping-confirm-fields input { flex:1; min-width:180px; }
.member-shopping-confirm-fields input, .member-shopping-confirm-fields select { height:34px; border:1px solid var(--border); border-radius:4px; padding:5px 8px; }
.member-shopping-error { color:#b42318; margin-top:8px; }
.member-list-table th.member-col-seq, .member-list-table td:first-child,
.member-list-table th.member-col-action, .member-list-table td:nth-child(2) { text-align:center; }
.member-list-table td:nth-child(2) .sale-print-link + .sale-print-link { margin-left:8px; }
.member-list-footer { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:5px 8px; border:1px solid var(--border); background:#f5f5f5; }
.member-list-totals { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:12px; }
.member-list-totals b { color:var(--heading); }
.member-list-footer .pagination { margin:0; gap:3px; }
.member-search-modal { width:min(900px, calc(100vw - 32px)); max-height:90vh; overflow:auto; }
.member-search-field { display:grid; grid-template-columns:110px minmax(0,1fr); gap:12px; align-items:center; padding:11px 4px; border-bottom:1px solid var(--border); font-size:13px; }
.member-search-field > div { display:flex; flex-wrap:wrap; align-items:center; gap:10px 20px; }
.member-search-field label { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.member-search-field select, .member-search-field input[type=date], .member-search-field input[type=number] { min-height:34px; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius-input); }
.member-search-field input[type=number] { width:112px; }
.member-level-share { display:flex; align-items:center; gap:8px; justify-content:center; }
.member-level-share-bar { display:block; width:90px; height:9px; background:#e8edf2; border-radius:8px; overflow:hidden; }
.member-level-share-bar i { display:block; height:100%; background:var(--brand); }
@media (max-width:700px) { .member-search-field { grid-template-columns:1fr; } .member-list-footer { align-items:flex-start; } }

/* Shared member segmentation and delivery */
.marketing-layout { display:grid; grid-template-columns:minmax(0,1fr) 235px; gap:18px; align-items:start; }
.marketing-builder { border:1px solid #c6d3dd; border-radius:6px; background:#fff; overflow:hidden; }
.marketing-period { display:flex; align-items:center; gap:16px; padding:16px 20px; background:#f4f8fb; border-bottom:1px solid #c6d3dd; }
.marketing-period .audience-dates { flex:0 1 440px; }
.marketing-period p { flex:1; margin:0; color:#607486; font-size:12px; line-height:1.8; }
.marketing-step { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex-shrink:0; border-radius:50%; background:#e0f1fd; color:#007ebd; font-size:14px; font-weight:600; }
.marketing-dimension-head { display:flex; align-items:center; gap:16px; padding:16px 20px 12px; }
.marketing-dimension-head h3 { font-size:15px; margin:0; }
.marketing-dimension-head > span { font-size:12px; color:#607486; }
.marketing-dimensions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:0 18px 18px; gap:10px; }
.marketing-dimension { min-width:0; padding:0 8px 12px; border:1px solid #cbd7e1; border-radius:5px; background:#fff; }
.marketing-dimension h3 { display:flex; gap:7px; align-items:center; font-size:14px; margin:0 -8px 8px; padding:12px 10px; background:#edf4f9; border-bottom:1px solid #cbd7e1; color:#304e63; }
.marketing-dimension h3 span { color:#83a4bc; font-size:11px; }
.marketing-condition-choice { display:flex; align-items:center; gap:8px; padding:10px 5px; min-height:40px; font-size:13px; line-height:1.5; cursor:pointer; border:1px solid transparent; border-radius:4px; }
.marketing-condition-choice:has(input:checked) { background:#eaf6ff; color:#007cb9; border-color:#b5def4; }
.marketing-condition-choice:hover { background:#f1f7fc; }
.marketing-condition-choice input { width:16px; height:16px; flex-shrink:0; accent-color:#008fd7; }
.marketing-dimension p { margin:12px 6px 0; font-size:12px; color:#788b99; line-height:1.8; }
.marketing-selected-head { display:flex; align-items:center; justify-content:space-between; padding:10px 20px; border-top:1px solid #ccd8e2; border-bottom:1px solid #ccd8e2; background:#f9fbfd; font-size:13px; }
.marketing-selected-head strong span { display:inline-block; min-width:24px; margin-left:6px; color:#0085c8; }
.marketing-editors { display:flex; flex-direction:column; gap:12px; padding:16px 18px; background:#f4f7fa; }
.marketing-no-conditions { padding:20px; border:1px dashed #bfceda; background:#fff; color:#6b7f8e; font-size:13px; line-height:1.8; }
.marketing-condition-editor { padding:14px 18px; border:1px solid #c7d5e0; border-radius:5px; background:#fff; }
.marketing-editor-title { display:flex; gap:12px; align-items:center; margin-bottom:10px; font-size:13px; }
.marketing-editor-title > span { color:#7890a3; font-size:12px; }
.marketing-editor-title button { margin-left:auto; }
.marketing-editor-fields { display:flex; align-items:flex-start; flex-wrap:wrap; gap:12px 18px; }
.marketing-editor-fields > .audience-field { flex:1 1 230px; max-width:560px; }
.marketing-editor-fields > small { flex-basis:100%; color:#788b99; line-height:1.8; }
.marketing-result-card { position:sticky; top:16px; padding:22px 18px; text-align:center; border:1px solid #bdd0df; background:#fff; border-radius:6px; box-shadow:0 3px 14px #143f5f09; }
.marketing-result-card h3 { margin:14px 0 8px; font-size:17px; }
.marketing-result-card > p { color:#748798; font-size:12px; line-height:1.8; }
.marketing-member-count { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; width:100%; min-height:145px; padding:16px 8px; margin:18px 0; border:1px solid #a9d8f0; border-radius:8px; background:#f0f9ff; color:#0089cc; cursor:pointer; }
.marketing-member-count strong { font-size:40px; font-variant-numeric:tabular-nums; line-height:1.2; }
.marketing-member-count span { font-size:12px; line-height:1.7; }
.marketing-member-count:disabled { color:#8599a8; background:#f6f8fa; border-color:#d4dfe7; cursor:default; }
.marketing-member-count:not(:disabled):hover { background:#e2f3fd; border-color:#008fd7; }
.marketing-result-card > .btn { width:100%; margin:10px 0; min-height:42px; }
.marketing-form-error { color:#ae3843 !important; border:1px solid #efbfc5; border-radius:4px; padding:10px; background:#fff1f2; }
.marketing-applied-summary { font-size:12px; line-height:1.9; padding:14px 18px; background:#edf6fc; color:#416579; border:1px solid #c5deef; border-radius:5px; }
.marketing-delivery { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; padding:20px 24px; border:1px solid #b9cfdf; border-radius:6px; background:#fff; }
.marketing-delivery h3 { display:flex; align-items:center; gap:12px; margin:0 0 12px; font-size:16px; }
.marketing-delivery p { margin:5px 0; font-size:12px; color:#718597; }
.marketing-delivery #audienceSelected { font-size:14px; color:#375a74; }
.marketing-delivery-actions { display:flex; flex-wrap:wrap; gap:12px; }
.marketing-delivery-actions .btn { min-width:130px; min-height:42px; }
.audience-members-modal .audience-modal-box { width:min(1540px,calc(100vw - 48px)); }
.audience-members-modal .audience-modal-body { padding:0; }
.audience-members-modal .audience-toolbar { background:#f4f8fc; }
.audience-members-modal .audience-table-wrap { max-height:57vh; }
.audience-members-modal .audience-table-wrap table { min-width:1250px; }
.audience-members-modal .audience-table-wrap th,.audience-members-modal .audience-table-wrap td { text-align:center; vertical-align:middle; }
.audience-members-modal .audience-modal-footer { background:#f6f9fc; }
@media(max-width:1500px) { .marketing-layout { grid-template-columns:minmax(0,1fr) 215px; gap:14px; } .marketing-dimensions { padding:0 12px 14px; gap:7px; } .marketing-dimension { padding-left:6px; padding-right:6px; } .marketing-dimension h3 { margin-left:-6px; margin-right:-6px; padding:10px 8px; font-size:13px; } .marketing-condition-choice { font-size:12px; padding-left:2px; padding-right:2px; gap:5px; } .marketing-period { flex-wrap:wrap; } .marketing-period p { flex-basis:100%; padding-left:42px; } }
@media(max-width:1100px) { .marketing-dimensions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .marketing-layout { grid-template-columns:minmax(0,1fr); } .marketing-result-card { position:static; } .marketing-period { padding:14px; } .marketing-period .audience-dates { flex-basis:100%; } .marketing-period p { padding:0; } .marketing-editor-fields > .audience-field { max-width:100%; } }
.audience-page { display:flex; flex-direction:column; gap:16px; min-width:0; }
.audience-page .form-input,.audience-modal .form-input { box-sizing:border-box; min-height:40px; padding:9px 12px; border:1px solid #aebdca; border-radius:5px; background:#fff; color:#263b4d; font:inherit; line-height:1.4; }
.audience-page .form-input:hover,.audience-modal .form-input:hover { border-color:#728c9f; }
.audience-page .form-input:focus,.audience-modal .form-input:focus { outline:2px solid #c6e7fa; outline-offset:1px; border-color:#008fd7; }
.audience-page input::placeholder,.audience-modal input::placeholder { color:#7b8996; }
.audience-modal [hidden] { display:none !important; }
.audience-page a[aria-disabled="true"] { pointer-events:none; opacity:.5; }
.audience-export-status { font-size:12px; color:#426b87; line-height:1.6; }
.rfm-query-actions #audienceExportStatus:empty { display:none; }
.rfm-query-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 20px; background:#f5f8fb; border:1px solid #d4dfe8; border-radius:6px; }
.rfm-query-summary { flex:1; min-width:0; font-size:14px; color:#334b60; line-height:1.9; }
.rfm-query-actions { display:flex; gap:10px; flex-wrap:wrap; flex-shrink:0; }
.audience-rfm-page .audience-table-wrap table { min-width:1100px; }
.audience-rfm-page .audience-table-wrap th,.audience-rfm-page .audience-table-wrap td { text-align:center; vertical-align:middle; }
.audience-rfm-page .audience-table-wrap th:first-child,.audience-rfm-page .audience-table-wrap td:first-child { width:64px; }
.audience-rfm-page .audience-toolbar { background:#fafbfd; }
.rfm-filter-modal .audience-modal-box { width:min(1020px,calc(100vw - 48px)); border:1px solid #bccbd7; border-radius:8px; }
.rfm-filter-modal .audience-modal-head { background:#f1f6fa; border-bottom:1px solid #cedce7; padding:16px 24px; }
.rfm-filter-modal .audience-modal-head h3 { color:#29485e; font-size:18px; font-weight:600; }
.rfm-filter-modal .audience-modal-body { padding:12px 28px 18px; }
.rfm-filter-modal .audience-modal-footer { justify-content:flex-end; background:#f7f9fc; border-top:1px solid #cedce7; padding:16px 24px; }
.rfm-filter-modal .audience-modal-footer .btn { min-width:100px; padding:11px 24px; font-size:15px; }
.rfm-filter-row { display:grid; grid-template-columns:100px minmax(0,1fr); gap:18px; align-items:start; padding:16px 0; border-bottom:1px dashed #d6e0e9; }
.rfm-filter-row:last-of-type { border-bottom:0; }
.rfm-filter-row > label,.rfm-row-label { padding-top:10px; font-size:15px; color:#344d60; font-weight:600; }
.rfm-filter-row #rfmStore { min-width:240px; max-width:100%; }
.rfm-presets { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rfm-preset { min-height:40px; padding:8px 14px; border:1px solid #c3cfda; border-radius:5px; background:#f8fafc; color:#43596b; font-size:14px; cursor:pointer; }
.rfm-preset:hover { border-color:#008fd7; background:#eaf6fd; color:#0077b5; }
.rfm-preset[aria-pressed="true"] { border-color:#008fd7; background:#dcf1fd; color:#0078b7; box-shadow:inset 0 0 0 1px #008fd7; font-weight:600; }
.rfm-preset:focus-visible { outline:2px solid #008fd7; outline-offset:3px; }
.rfm-custom-range { display:flex; align-items:center; gap:12px; margin-top:10px; padding:10px; border:1px solid #d2dfe9; border-radius:5px; background:#f3f7fb; color:#4b6174; }
.rfm-custom-range .form-input { min-width:0; width:160px; font-size:14px; }
.rfm-custom-range select.form-input { width:100px; }
.rfm-form-error { margin:8px 0; padding:10px 14px; color:#ad293e; background:#fff0f0; border:1px solid #efb5bd; border-radius:5px; }
@media(max-width:1450px) { .rfm-query-bar { align-items:flex-start; flex-direction:column; gap:12px; } }
@media(max-width:760px) { .rfm-filter-modal .audience-modal-body { padding:8px 16px; } .rfm-filter-row { grid-template-columns:1fr; gap:10px; padding:14px 0; } .rfm-filter-row > label,.rfm-row-label { padding:0; } .rfm-custom-range { flex-wrap:wrap; gap:8px; padding:10px; } .rfm-custom-range .form-input { flex:1; min-width:90px; } }
.audience-heading,.audience-toolbar,.audience-footer,.audience-modal-head,.audience-modal-footer { display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.audience-heading h2 { margin:0 0 6px; font-size:20px; }
.audience-heading p { margin:0; color:var(--text-secondary,#667085); font-size:13px; }
.audience-filters { padding:18px; margin:0; }
.audience-common { display:grid; grid-template-columns:1fr 1.7fr 1.2fr 1.2fr; gap:18px; }
.audience-field { display:flex; flex-direction:column; gap:8px; min-width:0; font-size:13px; font-weight:500; }
.audience-field .form-input { width:100%; min-width:0; margin:0; font-weight:400; }
.audience-pair,.audience-range-inputs { display:flex; gap:6px; align-items:center; }
.audience-pair > input { flex:1; }
.audience-range-inputs > select { flex:1; min-width:65px !important; }
.audience-range-inputs > input { flex:1; width:64px !important; }
.audience-range-inputs > span { font-weight:400; font-size:12px; white-space:nowrap; }
.audience-page [hidden] { display:none !important; }
.audience-shortcuts { display:flex; gap:4px; flex-wrap:wrap; }
.audience-shortcuts .btn { padding:2px 6px; font-size:12px; }
.audience-multi { text-align:left; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.audience-filters details { margin-top:16px; border-top:1px solid var(--border); padding-top:14px; }
.audience-filters summary { cursor:pointer; font-size:13px; font-weight:600; }
.audience-filters summary span { font-weight:400; color:var(--text-secondary,#667085); margin-left:12px; }
.audience-more-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; padding:12px 0; }
.audience-more-grid section { display:flex; flex-direction:column; gap:14px; }
.audience-more-grid h3 { font-size:13px; margin:0; padding:8px 0; border-bottom:1px solid var(--border); }
.audience-more-grid small { color:var(--text-secondary,#667085); line-height:1.7; font-size:12px; }
.audience-query-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding-top:16px; }
.audience-query-row > input { width:240px; }
#audienceDirty { color:#b46513; font-size:12px; }
.audience-summary { display:flex; gap:26px; align-items:center; flex-wrap:wrap; padding:0 4px; }
.audience-summary > div { display:flex; flex-direction:column; gap:3px; }
.audience-summary b { font-size:22px; font-variant-numeric:tabular-nums; }
.audience-summary span,.audience-summary p { font-size:12px; color:var(--text-secondary,#667085); line-height:1.7; }
.audience-summary p { flex:1; min-width:300px; margin:0; }
.audience-results { margin:0; overflow:hidden; }
.audience-toolbar { padding:14px 16px; justify-content:flex-start; border-bottom:1px solid var(--border); }
.audience-toolbar strong { margin-right:auto; font-size:14px; }
.audience-toolbar span { font-size:12px; }
.audience-table-wrap { overflow:auto; max-height:60vh; }
.audience-table-wrap table { min-width:1400px; }
.audience-table-wrap th { position:sticky; top:0; z-index:1; white-space:nowrap; }
.audience-table-wrap td { white-space:nowrap; font-size:12px; }
.audience-empty { text-align:center; height:120px; }
.audience-footer { padding:12px 16px; border-top:1px solid var(--border); font-size:12px; }
.audience-modal { z-index:1200; }
.audience-modal-box { width:min(980px,calc(100vw - 40px)); max-width:none; max-height:90vh; display:flex; flex-direction:column; padding:0; overflow:hidden; }
.audience-modal-head { padding:16px 22px; border-bottom:1px solid var(--border); flex-shrink:0; }
.audience-modal-head h3 { font-size:17px; margin:0; }
.audience-modal-body { padding:18px 22px; overflow:auto; min-height:0; font-size:13px; }
.audience-modal-footer { padding:14px 22px; border-top:1px solid var(--border); font-size:12px; flex-shrink:0; }
.audience-picker-search { width:100%; }
.audience-picker-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 18px; padding:14px 0; max-height:52vh; overflow:auto; }
.audience-picker-list label { display:flex; gap:10px; align-items:center; padding:10px; cursor:pointer; border:1px solid var(--border); border-radius:6px; }
.audience-compose { display:grid; grid-template-columns:1fr 2fr 1fr 2fr; gap:16px; margin:20px 0; }
.audience-compose label { display:flex; flex-direction:column; gap:8px; }
.audience-compose .form-input { width:100%; min-width:0; }
.audience-reward-detail { padding:14px; background:var(--bg,#f7f9fc); border:1px solid var(--border); border-radius:8px; line-height:1.8; }
.audience-reward-detail p { margin:8px 0 0; }
.audience-batch-caption { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.audience-batch-caption span { color:var(--text-secondary,#667085); font-size:12px; }
.audience-batch-totals { display:flex; flex-wrap:wrap; gap:10px 24px; margin:18px 0; line-height:1.7; }
.audience-batch-items { overflow:auto; max-height:32vh; }
.audience-batch-items td:last-child { min-width:140px; white-space:normal; }
.audience-batch-link { display:flex; justify-content:space-between; gap:20px; width:100%; padding:16px 10px; border:0; border-bottom:1px solid var(--border); background:transparent; cursor:pointer; text-align:left; font-size:13px; }
.audience-conditions { flex-basis:100% !important; font-size:12px; color:var(--text-secondary,#667085); line-height:1.8; overflow-wrap:anywhere; }
.audience-history-warning { color:#9a5a12; background:#fff7e8; padding:10px; border-radius:6px; }
@media(max-width:1450px) { .audience-common { grid-template-columns:1fr 1.7fr; } .audience-more-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .audience-common,.audience-more-grid,.audience-compose { grid-template-columns:1fr; } .audience-picker-list { grid-template-columns:1fr; } }

/* Excel distribution modal, bounded to the existing content overlay. */
.distribution-config{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.distribution-config label,.distribution-config .distribution-file{display:flex;flex-direction:column;gap:6px;min-width:0}.distribution-config input,.distribution-config select{width:100%;min-width:0;box-sizing:border-box;border:1px solid #bac5ce;background:white;padding:8px}.distribution-errors{border:1px solid #e7acac;background:#fff6f6;color:#9d2929;padding:10px;margin:12px 0;max-height:220px;overflow:auto}.distribution-errors[hidden]{display:none}.distribution-errors p{margin:0}.distribution-group{margin:14px 0}.distribution-group h4{margin:8px 0}.distribution-table{width:100%;table-layout:fixed;min-width:0!important}.distribution-table th,.distribution-table td{white-space:normal!important;overflow-wrap:anywhere;text-align:center;font-size:12px;padding:7px 4px}.distribution-result>div{display:flex;flex-wrap:wrap;gap:16px;align-items:center;padding:10px;border-bottom:1px solid #eee}.distribution-file-picker{display:flex;align-items:center;gap:10px;min-width:0;min-height:36px}.distribution-file-picker input[hidden]{display:none}.distribution-file-picker .btn{flex-shrink:0}.distribution-file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--body);font-size:12px}@media(max-width:850px){.distribution-config{grid-template-columns:1fr}}
.prepaid-page { min-width:0; }
.gift-filter #fKeyword { width:190px; }
.gift-filter .sales-ticket-controls > select { max-width:160px; }
.gift-page .gift-list-table .prepaid-row-actions { gap:5px 9px; }
.gift-page .gift-list-table .prepaid-link { overflow-wrap:anywhere; white-space:normal; }
.gift-page .sales-ticket-footer { flex-wrap:wrap; overflow:visible; }
.gift-page .sales-ticket-footer .table-totals { gap:6px 14px; flex:1 1 360px; }
.gift-page .sales-ticket-footer .pagination { margin-left:auto; }
.gift-rules-page .gift-list-table td:nth-child(7),.gift-rules-page .gift-list-table td:nth-child(8) { font-size:11px; white-space:nowrap; }
@media(max-width:1100px) {
    .gift-filter .sales-ticket-controls > select { width:100px; }
    .gift-filter #fKeyword { width:170px; }
    .gift-filter .sales-date-trigger { min-width:190px; padding-left:8px; padding-right:8px; }
}
.gift-events-table { width:100%; min-width:0!important; table-layout:fixed; }
.gift-events-table th,.gift-events-table td { text-align:center; white-space:normal; overflow-wrap:anywhere; padding:8px 5px; font-size:12px; }
.gift-events-footer { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; padding-top:12px; font-size:12px; }
.shopping-statistics-page .shopping-list-table thead tr:first-child { height:34px; }
.shopping-statistics-page .shopping-list-table thead tr:nth-child(2) th { top:34px; }
.shopping-statistics-page .shopping-list-table tfoot td { position:sticky; bottom:0; background:#f5f5f5; border-top:1px solid var(--border); font-weight:600; }
.shopping-list-table .shopping-subtotal td { background:var(--bg-subtle); }
.recharge-store-picker .inventory-store-panel { left:0; right:auto; }
.shopping-statistics-page .shopping-list-table tbody td:nth-child(n+3),
.shopping-statistics-page .shopping-list-table tfoot td:nth-child(n+2) { white-space:nowrap; padding-left:2px; padding-right:2px; }
@media (max-width:1200px) {
    .shopping-statistics-page .shopping-list-table tbody td:nth-child(n+3),
    .shopping-statistics-page .shopping-list-table tfoot td:nth-child(n+2) { font-size:10px; }
}
.shopping-page .prepaid-dialog-message { overflow-wrap:anywhere; }
.prepaid-filter { gap:8px; }
.times-card-page .sales-ticket-filter,.times-card-page .sales-ticket-controls { flex-wrap:wrap; }
.prepaid-filter .sales-ticket-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.prepaid-filter .sales-ticket-actions .btn { font-size:12px; padding:6px 9px; white-space:nowrap; }
.prepaid-filter .sales-ticket-controls { margin-left:auto; gap:6px; justify-content:flex-end; min-width:0; }
.prepaid-filter .sales-ticket-controls > select,.prepaid-filter .sales-ticket-controls > input { width:125px; min-width:0; height:32px; padding:5px 8px; font-size:12px; border:1px solid var(--border); border-radius:var(--radius-input); background:white; }
.prepaid-filter #pp_flow_no { width:190px; }
.prepaid-filter #pp_data_source { width:210px; }
.prepaid-filter .sales-ticket-controls > .btn { height:32px; font-size:12px; padding:5px 12px; }
.prepaid-list-table { width:100%; table-layout:fixed; }
.prepaid-page .prepaid-list-table th,.prepaid-page .prepaid-list-table td { white-space:normal; overflow-wrap:anywhere; text-align:center; vertical-align:middle; font-size:12px; font-weight:400; line-height:1.45; padding:8px 4px; }
.prepaid-list-table tbody tr { height:40px; }
.prepaid-page .prepaid-list-table th { background:#f5f5f5; }
.prepaid-list-table .sales-ticket-link { white-space:normal; overflow-wrap:anywhere; }
.prepaid-stores-page .prepaid-list-table thead tr:first-child { height:34px; }
.prepaid-stores-page .prepaid-list-table thead tr:nth-child(2) th { top:34px; }
.prepaid-stores-page .prepaid-list-table tfoot td { position:sticky; bottom:0; background:#f5f5f5; border-top:1px solid var(--border); font-weight:600; }
.prepaid-page .prepaid-rule-card th:first-child,.prepaid-page .prepaid-rule-card td:first-child { width:auto; }
.prepaid-report-note { flex:none; padding:5px 10px; font-size:12px; border:1px solid var(--border); border-bottom:0; background:var(--bg-subtle); color:var(--body); }
.prepaid-row-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:5px; }
.prepaid-link,.prepaid-column-tool { border:0; background:none; color:var(--brand); font:inherit; cursor:pointer; padding:0; }
.prepaid-column-tool { font-size:17px; line-height:1; }
.prepaid-page .prepaid-card-count { padding:2px 5px; font-size:12px; }
.prepaid-page .sales-ticket-footer .table-totals { min-width:0; flex-wrap:wrap; white-space:normal; }
.prepaid-columns-box { width:510px; max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); overflow:auto; }
.prepaid-columns-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.prepaid-columns-options label { display:flex; align-items:center; gap:8px; padding:11px 3px; border-bottom:1px solid var(--border); cursor:pointer; font-size:13px; }
.prepaid-columns-options input { accent-color:var(--brand); }
@media(max-width:1100px) { .prepaid-filter .sales-ticket-controls { flex:1 1 100%; } .prepaid-filter .sales-ticket-controls > select,.prepaid-filter .sales-ticket-controls > input { width:115px; } }
.coupon-page { min-width:0; }
.coupon-list-filter { gap:8px; }
.coupon-list-filter .sales-ticket-actions { gap:12px; flex-wrap:wrap; }
.coupon-list-filter .sales-ticket-actions > a { font-size:12px; white-space:nowrap; }
.coupon-list-filter .sales-ticket-controls { gap:6px; justify-content:flex-end; }
.coupon-list-filter .sales-ticket-controls > select,.coupon-list-filter .sales-ticket-controls > input[type=text] { height:32px; min-height:32px; padding:5px 8px; font-size:12px; }
.coupon-list-filter .sales-ticket-controls select { width:112px; max-width:150px; }
.coupon-list-filter #cpKeyword { width:160px; min-width:110px; }
.coupon-list-table { width:100%; min-width:0; table-layout:fixed; }
.coupon-list-table th,.coupon-list-table td { overflow-wrap:anywhere; white-space:normal; vertical-align:middle; }
.coupon-list-table .coupon-row-actions { gap:5px; }
.coupon-list-table .sales-ticket-link { white-space:normal; overflow-wrap:anywhere; }
.coupon-report-note { flex:none; padding:5px 10px; font-size:12px; background:var(--bg-subtle); border:1px solid var(--border); border-bottom:0; }
.coupon-store-tools { display:flex; align-items:center; gap:12px; margin:12px 0; }
.coupon-store-tools input { padding:8px; border:1px solid var(--border); min-width:0; }
.coupon-store-tools span { margin-left:auto; white-space:nowrap; font-size:12px; }
.coupon-store-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; max-height:50vh; overflow:auto; }
.coupon-store-options label { display:flex; align-items:center; gap:8px; border:1px solid var(--border); padding:10px; overflow-wrap:anywhere; cursor:pointer; }
.coupon-store-options label[hidden] { display:none; }
.coupon-store-options input { accent-color:var(--brand); flex:none; }
@media(max-width:1100px) { .coupon-list-filter .sales-ticket-controls { flex:1 1 auto; } .coupon-store-options { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.coupon-toolbar,.coupon-actions,.coupon-tabs,.coupon-filters,.coupon-selection,.coupon-pagination,.coupon-send-rule { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.coupon-toolbar { justify-content:space-between; margin-bottom:14px; gap:14px; }
.coupon-tabs { gap:0; border-bottom:1px solid #dce5e0; }
.coupon-tabs button { border:0; background:none; padding:10px 12px; font:inherit; color:#65756e; border-bottom:2px solid transparent; cursor:pointer; }
.coupon-tabs button.active { color:var(--brand); border-bottom-color:var(--brand); font-weight:600; }
.coupon-filters { justify-content:flex-end; margin-bottom:12px; }
.coupon-filters input,.coupon-filters select,.coupon-send-rule select,.coupon-send-rule input,.coupon-modal textarea { border:1px solid #bcc8c2; border-radius:5px; padding:7px 9px; background:white; color:var(--text); font:inherit; min-height:34px; max-width:100%; box-sizing:border-box; }
.coupon-filters>input { width:210px; }
.coupon-filters>select { max-width:190px; }
.coupon-note { color:#6a7a72; font-size:12px; line-height:1.7; margin:8px 0 12px; }
.coupon-card { padding:0; overflow:hidden; }
.coupon-table-wrap { width:100%; min-width:0; }
.coupon-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.coupon-table th,.coupon-table td { text-align:center; padding:10px 7px; border-bottom:1px solid #e7ede9; overflow-wrap:anywhere; white-space:normal; line-height:1.65; vertical-align:middle; }
.coupon-table th { color:#5c6e63; background:#f5f8f6; font-weight:600; }
.coupon-table tr:hover td { background:#fafcfb; }
.coupon-table strong { font-weight:500; color:#253b2e; }
.coupon-row-actions { display:flex; flex-wrap:wrap; gap:6px 10px; justify-content:center; }
.coupon-page .btn-link,.coupon-modal .btn-link { border:0; background:none; padding:0; color:var(--brand); cursor:pointer; font:inherit; }
.coupon-page .btn-link.danger { color:#c04b40; }
.coupon-page .btn-link:disabled { color:#a1aaa5; cursor:default; }
.coupon-muted { color:#87958c; font-size:11px; font-weight:400; }
.coupon-badge { display:inline-block; padding:2px 7px; border-radius:4px; background:#eef2f0; color:#6a7c71; font-size:11px; }
.coupon-active,.coupon-success,.coupon-completed { background:#eaf5ee; color:#308450; }
.coupon-upcoming,.coupon-running,.coupon-preview,.coupon-pending { background:#fff6e7; color:#a97727; }
.coupon-void,.coupon-failed { background:#fff0ec; color:#b56049; }
.coupon-pagination { justify-content:flex-end; padding:12px 16px; color:#7a887f; font-size:12px; }
.coupon-table .coupon-empty { text-align:center; padding:60px 12px; color:#98a49c; }
.coupon-overlay { padding:22px; box-sizing:border-box; }
.coupon-modal.modal-box { width:min(1280px,96vw); max-width:none; max-height:calc(100vh - 44px); padding:0; overflow:hidden; display:flex; flex-direction:column; border:1px solid #ccdcd0; }
.coupon-modal-header { display:flex; align-items:center; justify-content:space-between; padding:13px 20px; background:#eff7f1; border-bottom:1px solid #dce8df; }
.coupon-modal-header h2 { font-size:16px; font-weight:600; margin:0; color:#33543f; }
.coupon-modal-header .btn { font-size:22px; line-height:1; padding:4px 8px; }
.coupon-modal-body { padding:18px 20px; overflow-y:auto; min-height:0; }
.coupon-modal-footer { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 20px; border-top:1px solid #e1e9e3; }
.coupon-modal textarea { display:block; margin:10px 0; width:100%; resize:vertical; }
.coupon-send-rule { margin-bottom:14px; }
.coupon-send-rule label { display:flex; align-items:center; gap:8px; }
.coupon-send-rule select { max-width:430px; }
.coupon-send-rule input { width:70px; }
.coupon-selection { padding:10px 0; border-bottom:1px solid #e3ebe5; font-size:12px; }
.coupon-selection label { display:flex; align-items:center; gap:6px; }
.coupon-selection input,.coupon-table input[type=checkbox] { accent-color:var(--brand); width:15px; height:15px; }
.coupon-selection span { margin-left:auto; color:#54715d; }
.coupon-warning { color:#9b6c28; background:#fff8e9; border:1px solid #f0dfb6; padding:10px 12px; font-size:12px; }
@media(max-width:1100px) { .coupon-table th,.coupon-table td { padding:8px 4px; } .coupon-tabs button { padding:8px 9px; } .coupon-toolbar { gap:8px; } }
.dp-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.dp-page .stock-flow-hint{margin:6px 0 12px}.dp-scroll{overflow:auto;max-width:100%;margin:12px 0}.dp-table{min-width:1100px}.dp-table td,.dp-table th{text-align:center}.dp-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:15px}.dp-form-grid label,.dp-action-form label{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.dp-actions,.dp-product-search{display:flex;align-items:center;gap:12px;margin:12px 0}.dp-product-search input{max-width:450px}.dp-actions span{color:var(--text-secondary);font-size:12px}#dpProductResults{display:flex;flex-wrap:wrap;gap:6px}.dp-edit-table{min-width:1500px}.dp-edit-table input,.dp-edit-table select{min-width:95px;width:100%}.dp-edit-table td:nth-child(2){min-width:230px}.dp-row-actions{min-width:180px}.dp-row-actions button{margin:3px}.dp-original{white-space:pre-wrap;word-break:break-word;background:#f6f8f9;padding:12px}.dp-action-form{max-width:620px;margin:16px auto}.dp-action-form input[type=checkbox]{width:auto}.stock-flow-modal h4{margin:18px 0 8px}.dp-page{min-height:0}.dp-page .stock-flow-list-scroll{min-height:140px}@media(max-width:1100px){.dp-form-grid{grid-template-columns:1fr 1fr}.dp-actions{flex-wrap:wrap}}

.dp-scroll{flex-shrink:0}.stock-flow-modal-body>h4,.stock-flow-modal-body>.dp-form-grid,.stock-flow-modal-body>.dp-actions,.stock-flow-modal-body>.dp-product-search{flex-shrink:0}.dp-ship-quantity{width:100px;min-width:84px;box-sizing:border-box}.dp-ship-quantity+small{display:block;font-size:11px;color:var(--text-secondary);margin-top:5px}
.dp-detail-progress{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0 4px;padding:10px 12px;background:#f4f8fb;border-radius:6px}.dp-detail-progress .btn{min-width:120px}.dp-detail-progress>span{color:#9aa8b5}
.dp-entry-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 16px;flex-shrink:0}.stock-flow-modal-body>section[id^=dpEntry]{flex-shrink:0;min-width:0}.stock-flow-modal-body>section[hidden]{display:none}.dp-picker-table{min-width:850px}.dp-picker-table td,.dp-picker-table th{text-align:center}.dp-picker-table input[type=number]{width:100px}.dp-source-name{color:var(--text-secondary);margin-top:5px}.dp-product-search{flex-wrap:wrap}.dp-product-search select{max-width:210px}#dpProductResults.dp-scroll{display:block;max-height:310px;width:100%}#dpImportFilename{max-width:400px;overflow-wrap:anywhere}#dpRows{min-height:100px}.dp-entry-tabs .btn{min-width:130px}.dp-product-match{margin:8px 0;border:1px solid #dbe5ed;border-radius:5px;padding:9px 12px}.dp-product-match summary{cursor:pointer;color:var(--brand);font-size:13px}.dp-product-match .dp-flow-product{margin-bottom:0}.dp-product-match[open] summary{margin-bottom:8px}
.dp-entry-page{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff;font-size:13px}
.dp-entry-overlay [hidden]{display:none}.dp-flow-conversion{border-top:1px solid #dbe5ed;margin-top:12px;padding-top:8px}.dp-flow-conversion label{display:flex;align-items:center;gap:12px}.dp-flow-conversion label input{width:120px}.dp-entry-table .dp-source-name{color:var(--text-secondary);line-height:1.6}
.dp-entry-header{display:flex;align-items:center;gap:18px;padding:14px 20px;border-bottom:1px solid var(--border);flex:none}
.dp-entry-header h2{font-size:19px;margin:0}.dp-entry-page>.dp-form-grid{padding:14px 20px 0;margin:0;flex:none}
.dp-entry-page .dp-form-grid label{margin-bottom:10px}.dp-entry-page .dp-form-grid .form-input{width:100%;min-width:0}
.dp-entry-toolbar,.dp-entry-methods{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.dp-entry-toolbar{justify-content:space-between;padding:4px 20px 12px;flex:none}
.dp-entry-caption{display:flex;align-items:center;gap:16px;padding:10px 20px;background:#f5f8fa;border-top:1px solid var(--border);flex:none}.dp-entry-caption span{font-size:12px;color:#a65c00}
.dp-entry-rows{flex:1;min-height:0!important;overflow:auto;overscroll-behavior:contain;margin:0}.dp-entry-table{width:100%;table-layout:fixed}
.dp-entry-table th{position:sticky;top:0;z-index:1;background:#f5f5f5}.dp-entry-table th,.dp-entry-table td{padding:9px 8px;vertical-align:middle;overflow-wrap:anywhere;text-align:center}
.dp-entry-table .form-input{width:100%;min-width:0;height:34px;padding:5px 7px;box-sizing:border-box}.dp-entry-table small{display:block;font-size:11px}.dp-entry-table td label{display:block;font-size:12px}
.dp-row-product{border:0;background:transparent;color:var(--brand);font:inherit;text-align:left;cursor:pointer;white-space:normal;overflow-wrap:anywhere;width:100%;padding:0}.dp-entry-footer{display:flex;align-items:center;gap:10px;flex:none;padding:14px 20px;border-top:1px solid var(--border);background:#fff}
.dp-entry-overlay .stock-flow-modal{width:1080px}.dp-picker-overlay .stock-flow-modal{height:min(760px,calc(100dvh - 40px))}.dp-picker-overlay .stock-flow-modal-body{flex:1;overflow:hidden}.dp-picker-overlay .dp-product-search,.dp-picker-overlay .dp-actions{flex:none}
#dpProductResults.dp-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;align-content:start;flex:1;min-height:0;overflow:auto;padding:3px 3px 14px}
.dp-product-card{position:relative;min-width:0;display:flex;flex-direction:column;border:1px solid #dce3ea;border-radius:7px;background:#fff;overflow:hidden}.dp-product-card.selected{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand)}
.dp-product-card-choice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 10px 10px;cursor:pointer;text-align:center;flex:1}.dp-product-card-choice>input{position:absolute;right:10px;top:10px}.dp-product-symbol{display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:12px;background:#edf6fa;color:#3187a8;font-size:26px;font-weight:600;margin-bottom:4px}
.dp-product-card-choice strong{font-size:14px;overflow-wrap:anywhere}.dp-product-card-choice small{color:var(--text-secondary);overflow-wrap:anywhere}.dp-product-price{color:var(--brand);font-size:12px}.dp-product-quantity{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#f7f9fb;border-top:1px solid #edf0f2;font-size:12px}.dp-product-quantity input{width:90px;min-width:0;height:30px;padding:4px 6px}
.dp-columns-overlay .stock-flow-modal{width:650px}.dp-columns-overlay .stock-flow-modal-body{padding:0}.dp-columns-overlay td,.dp-columns-overlay th{text-align:center}.dp-columns-overlay th:first-child,.dp-columns-overlay td:first-child{text-align:left;padding-left:20px}.dp-page .dp-table [hidden]{display:none!important}.dp-page .dp-table td,.dp-page .dp-table th{white-space:normal;overflow-wrap:anywhere;padding:10px 6px}
@media(max-width:1100px){.dp-entry-page>.dp-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dp-entry-toolbar{gap:8px}.dp-entry-methods{gap:6px}.dp-entry-toolbar .btn{padding:7px 9px}.dp-entry-header,.dp-entry-footer{padding:12px 14px}}

.dp-flow-input{display:flex;flex-direction:column;gap:8px;width:100%;flex-shrink:0}.dp-flow-input #dpOriginal{display:block;width:100%;min-height:150px;max-height:360px;box-sizing:border-box;resize:vertical;line-height:1.6;padding:12px;font-size:14px}.dp-flow-product{background:#f7fafc;border:1px solid #dbe5ed;border-radius:6px;padding:12px;margin:10px 0}.dp-flow-product .dp-actions{margin-top:0;flex-wrap:wrap}.dp-flow-product input{width:240px;max-width:100%}.dp-flow-product p{font-size:13px;color:var(--text-secondary);margin:8px 0}.dp-flow-candidates{display:flex;flex-wrap:wrap;gap:8px;max-height:210px;overflow:auto}.dp-flow-candidates button{white-space:normal;text-align:left;max-width:100%;height:auto;min-height:36px}.dp-recognition-warning{display:block;color:#a65c00}.dp-edit-table small{display:block;font-size:12px}.stock-flow-modal-body>.dp-flow-input,.stock-flow-modal-body>#dpFlowProducts{flex-shrink:0}
.dp-attention-banner{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:9px 14px;background:#fff4e5;border-bottom:1px solid #f0cf9c;color:#754412;font-size:13px}
.dp-attention-banner strong{font-size:14px}.dp-attention-banner .btn{margin-left:auto;border:1px solid #b96a13;background:#fff;color:#8a4a05;font-weight:600}
.dp-page .dp-unfinished-row td{background:#fffaf2}.dp-page .dp-unfinished-row td:first-child{box-shadow:inset 4px 0 #e59a32}
.dp-page .dp-unfinished-row .dp-recognition-warning{margin-top:3px;font-size:12px;font-weight:600}
.dp-page .dp-status-unfinished{color:#9a4f07;font-weight:700}.dp-page .dp-status-unfinished small{display:block;margin-top:3px;font-size:11px;font-weight:500}
/* Reversible personnel states: keep actions visible without crowding the form. */
.archive-state-actions { display:flex; flex-wrap:wrap; gap:12px; padding:12px 0; }
.employee-access-dialog .modal-footer { flex-wrap:wrap; gap:10px; }

/* Sales document expansion: keep the master columns blank and facts ordered on the right. */
.sales-document-table .sale-child-row { background:var(--bg); }
.sales-document-table .sale-child-row > .sale-detail-spacer,
.sales-document-table .sale-child-row > [data-pos-structure="sequence"] {
    background:var(--bg); border-bottom:0; border-top:0;
}
.sales-document-table .sale-child-row > .sale-detail-note {
    text-align:right; padding:14px 10px; font-weight:400; color:var(--body);
    background:var(--bg); border-bottom:1px solid var(--border);
}
.sales-document-table .sale-item-row > td { background:var(--bg); }
.sales-document-table .sale-item-description { color:var(--brand); }
.sales-document-table .sale-original-reference { display:inline; }

/* Override shared summary-cell minimums only for expanded sales documents. */
table.sales-document-table.pos-appearance-table > tbody > tr.sale-child-row > td.sale-detail-spacer {
    min-width:0 !important; width:auto !important; background:var(--bg) !important;
    border-top:0 !important; border-bottom:0 !important;
}
table.sales-document-table.pos-appearance-table :is(th, td)[data-pos-structure="sequence"] {
    width:64px !important; min-width:64px !important; max-width:64px !important;
    box-sizing:border-box;
}
table.sales-document-table.pos-appearance-table > tbody > tr.sale-child-row > td[data-pos-structure="sequence"] {
    background:var(--bg) !important; border-top:0 !important; border-bottom:0 !important;
}
table.sales-document-table.pos-appearance-table > tbody > tr.sale-child-row > td.sale-detail-note {
    text-align:right !important; min-width:0 !important;
    white-space:normal !important; overflow-wrap:anywhere !important;
    background:var(--bg) !important;
}
table.sales-document-table.pos-appearance-table .sale-detail-note > .sale-original-reference {
    text-align:right !important;
}
