[v-cloak] { display: none; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, "Microsoft YaHei", sans-serif; background: #071126; color: #dcecff; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, rgba(17, 117, 221, .28), transparent 32%), #061126; }
.login-panel { width: min(420px, calc(100vw - 32px)); padding: 32px; border: 1px solid rgba(58, 160, 255, .55); border-radius: 8px; background: rgba(8, 28, 58, .94); box-shadow: 0 20px 70px rgba(0,0,0,.38); }
.brand-mark { color: #3bd5ff; font-weight: 700; margin-bottom: 16px; }
h1, h2 { margin: 0; letter-spacing: 0; }
.login-panel h1 { font-size: 26px; }
.login-panel p, .topbar p, .import-panel p { color: #8eabc9; }
label { color: #a9c6e9; }
input, select, textarea { width: 100%; min-height: 38px; padding: 0 11px; border: 1px solid #244e7d; border-radius: 6px; background: #081c38; color: #eaf5ff; outline: none; }
textarea { padding-top: 9px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #2bc8ff; box-shadow: 0 0 0 3px rgba(43, 200, 255, .12); }
.login-panel label { display: block; margin: 16px 0 6px; }
.login-captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 178px; gap: 8px; align-items: stretch; }
.login-captcha-input { min-width: 0; text-transform: uppercase; }
.login-captcha-image { display: flex; width: 178px; height: 46px; overflow: hidden; border: 1px solid #39719f; border-radius: 6px; padding: 0; background: #eef5fa; cursor: pointer; }
.login-captcha-image img { display: block; flex: 1 1 auto; min-width: 0; width: 150px; height: 100%; object-fit: contain; object-position: center; background: #eef5fa; }
.login-captcha-image .layui-icon { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 100%; background: #123e68; color: #dff8ff; font-size: 14px; }
.login-captcha-image:hover, .login-captcha-image:focus-visible { border-color: #2bc8ff; box-shadow: 0 0 0 3px rgba(43, 200, 255, .12); outline: none; }
.primary { border: 0; border-radius: 6px; min-height: 38px; padding: 0 16px; background: #31d0ff; color: #041a32; font-weight: 700; }
.wide { width: 100%; margin-top: 20px; }
.muted { color: #8eabc9 !important; }
.platform-login-link { display: block; margin-top: 14px; color: #fff; font-weight: 700; text-decoration: none; }
.install-link { display: inline-block; margin-top: 10px; color: #8edfff; text-decoration: none; }
.form-error { margin-top: 12px; color: #ffb4b4; }
.import-alert-content { line-height: 1.7; }
.import-alert-failure-reason { color: #d93025; }
.app-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.app-shell.screening { display: block; }
.app-shell.screening .main { padding: 0; }
.sidebar { padding: 18px 14px; border-right: 1px solid rgba(55, 142, 235, .24); background: #071a36; }
.logo { height: 46px; display: flex; align-items: center; color: #46d7ff; font-size: 20px; font-weight: 800; }
.nav-group { display: grid; gap: 4px; margin: 12px 0 14px; }
.nav-group-title { padding: 0 12px; color: #7190b2; font-size: 12px; font-weight: 700; line-height: 22px; }
.sidebar button { width: 100%; height: 38px; margin: 5px 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #c8dfff; text-align: left; padding: 0 12px; }
.sidebar .nav-icon { flex: 0 0 22px; width: 22px; margin-right: 10px; font-size: 18px; line-height: 1; text-align: center; }
.sidebar .nav-label { min-width: 0; white-space: nowrap; }
.sidebar button:hover, .sidebar button.active { border-color: rgba(63, 184, 255, .35); background: rgba(38, 139, 229, .18); color: #fff; }
.main { min-width: 0; padding: 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.topbar h1 { font-size: 24px; }
.topbar p { margin: 6px 0 0; }
.user-pill { border: 1px solid rgba(72, 174, 255, .35); border-radius: 999px; padding: 8px 12px; color: #b9d9ff; background: rgba(12, 41, 82, .72); white-space: nowrap; }
.module-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.module-tabs .layui-btn { margin: 0; min-height: 40px; padding: 0 18px; border-color: #d2d2d2; background: #fff; color: #333; font-size: 16px; font-weight: 600; }
.module-tabs .layui-btn.align-end { margin-left: auto; }
.module-tabs .layui-btn.active { border-color: #16baaa; background: #16baaa; color: #fff; font-weight: 800; }
.module-guide, .notice-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e8eeee; border-left: 4px solid #16baaa; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); color: #333; }
.module-guide h2 { margin: 0; color: #1f2329; font-size: 15px; font-weight: 600; }
.module-guide p, .notice-panel span { margin: 5px 0 0; color: #666; line-height: 1.55; }
.notice-panel { justify-content: flex-start; align-items: flex-start; }
.notice-panel strong { flex: 0 0 auto; color: #1f2329; }
.notice-panel span { margin: 0; }
.merchant-home-content { position: relative; z-index: 1; display: grid; gap: 12px; margin-bottom: 16px; }
.merchant-notice-list { display: grid; gap: 8px; }
.merchant-notice-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid rgba(255, 211, 105, .58); border-left: 4px solid #ffd166; border-radius: 6px; background: linear-gradient(110deg, rgba(56, 43, 20, .94), rgba(12, 38, 70, .94)); color: #fff6d6; box-shadow: 0 0 18px rgba(255, 193, 64, .12); }
.merchant-notice-card strong { color: #ffe19a; font-size: 15px; }
.merchant-notice-card p { margin: 5px 0 0; color: #eef6ff; line-height: 1.6; white-space: pre-wrap; }
.merchant-notice-card a { flex: 0 0 auto; color: #52e7ff; font-weight: 700; white-space: nowrap; }
.merchant-ad-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.merchant-ad-card { min-width: 0; overflow: hidden; border: 1px solid rgba(80, 205, 255, .52); border-radius: 8px; background: linear-gradient(145deg, rgba(5, 19, 42, .96), rgba(8, 51, 88, .9)); box-shadow: 0 0 22px rgba(24, 194, 255, .12); }
.merchant-ad-card > a { display: block; color: inherit; text-decoration: none; }
.merchant-ad-card img { display: block; width: 100%; max-height: 220px; object-fit: cover; background: rgba(255,255,255,.04); }
.merchant-ad-card div { padding: 13px 15px; }
.merchant-ad-card strong { color: #5cecff; font-size: 16px; }
.merchant-ad-card p { margin: 7px 0 0; color: #e4efff; line-height: 1.6; white-space: pre-wrap; }
.module-steps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.module-steps span { padding: 5px 9px; border: 1px solid #d8eeee; border-radius: 2px; background: #f5fffd; color: #118678; font-size: 12px; white-space: nowrap; }
.page-grid { display: grid; grid-template-columns: minmax(520px, 1.45fr) minmax(190px, .38fr) minmax(260px, .52fr); gap: 14px; }
.dashboard-screen { grid-template-columns: minmax(620px, 1fr) minmax(300px, .4fr); }
.dashboard-screen { position: relative; overflow: hidden; padding: 2px; }
.dashboard-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(64, 179, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 179, 255, .05) 1px, transparent 1px), radial-gradient(circle at 18% 82%, rgba(33, 205, 255, .18), transparent 26%), radial-gradient(circle at 72% 24%, rgba(42, 167, 255, .16), transparent 28%); background-size: 72px 72px, 72px 72px, auto, auto; opacity: .9; }
.kpi-row { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-primary-column { position: relative; z-index: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(500px, 1fr); gap: 14px; align-self: stretch; }
.dashboard-primary-column > .kpi-row { grid-column: auto; width: 100%; }
.dashboard-primary-column > .dashboard-transport-panel { width: 100%; min-width: 0; }
.kpi, .panel, .edit-card { border: 1px solid rgba(52, 135, 224, .36); border-radius: 8px; background: rgba(8, 28, 58, .78); box-shadow: inset 0 1px 0 rgba(111, 195, 255, .08); }
.kpi { position: relative; min-height: 72px; padding: 12px 14px 12px 72px; display: grid; align-content: center; gap: 6px; overflow: hidden; background: linear-gradient(110deg, rgba(12, 39, 76, .92), rgba(9, 27, 56, .86) 48%, rgba(14, 72, 115, .82)); border-color: rgba(72, 203, 255, .68); box-shadow: 0 0 0 1px rgba(54, 199, 255, .13) inset, 0 0 22px rgba(21, 186, 255, .22), inset 0 -18px 36px rgba(36, 212, 255, .08); }
.kpi::before { content: ""; position: absolute; inset: -40% -8% auto 38%; height: 120%; background: radial-gradient(circle, rgba(78, 234, 255, .44), transparent 54%); filter: blur(18px); opacity: .55; }
.kpi i { position: absolute; left: 18px; top: 50%; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; transform: translateY(-50%); color: #dffaff; font-style: normal; font-weight: 800; font-size: 15px; background: radial-gradient(circle at 34% 28%, #74f7ff, #1589bd 54%, #16355f); border: 1px solid rgba(120, 231, 255, .62); box-shadow: 0 0 18px rgba(32, 205, 255, .36), inset 0 0 14px rgba(255,255,255,.24); }
.kpi.profit i { color: #fff4c9; background: radial-gradient(circle at 34% 28%, #ffe49a, #9a7a35 56%, #2f3550); border-color: rgba(255, 218, 120, .64); }
.kpi span, .screen-card span { color: #f0f7ff; font-weight: 700; white-space: nowrap; }
.kpi strong { position: relative; z-index: 1; min-width: 0; color: #ffe5a3; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel { padding: 16px; min-width: 0; }
.panel h2, .edit-card h2 { font-size: 17px; margin-bottom: 14px; }
.dashboard-panel { position: relative; z-index: 1; border-radius: 5px; border-color: rgba(80, 205, 255, .72); background: linear-gradient(145deg, rgba(5, 19, 42, .9), rgba(7, 35, 66, .8)); box-shadow: 0 0 0 1px rgba(48, 196, 255, .15) inset, 0 0 26px rgba(24, 194, 255, .16); }
.dashboard-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(75, 223, 255, .2), transparent) 0 0 / 100% 1px no-repeat, linear-gradient(90deg, transparent, rgba(75, 223, 255, .14), transparent) 0 100% / 100% 1px no-repeat; }
.dashboard-flow-panel { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-radius: 5px; border-color: rgba(80, 205, 255, .56); background: linear-gradient(120deg, rgba(8, 35, 68, .9), rgba(5, 19, 42, .88)); }
.workflow-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.workflow-card { min-height: 76px; padding: 12px 14px; border: 1px solid rgba(74, 175, 255, .32); border-radius: 5px; background: rgba(9, 39, 75, .72); text-align: left; color: #dcecff; }
.workflow-card span, .workflow-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-card span { color: #9fc6f0; font-size: 12px; font-weight: 700; }
.workflow-card strong { display: block; margin-top: 6px; color: #ffe5a3; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workflow-card small { margin-top: 5px; color: #77a4cc; font-size: 12px; }
.workflow-card:hover { border-color: rgba(81, 227, 255, .62); background: rgba(13, 57, 103, .78); }
.workflow-card .risk-text { color: #ff7779; }
.workflow-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 420px; }
.workflow-actions .layui-btn { margin: 0; white-space: nowrap; }
.map-panel { min-height: 500px; padding: 0; overflow: hidden; }
.wide-panel { grid-column: 1 / -1; }
.chart { width: 100%; height: 500px; }
.map-tools { position: absolute; z-index: 3; top: 12px; right: 14px; display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(54, 186, 255, .42); border-radius: 5px; background: rgba(7, 24, 50, .78); }
.map-tools button, .rank-head button { min-height: 26px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: #8ebee1; font-size: 12px; }
.map-tools button.active, .rank-head button.active { color: #4df2ff; background: rgba(47, 199, 255, .16); }
.rank-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; height: 500px; min-height: 500px; overflow: hidden; }
.dashboard-transport-panel,
.dashboard-warning-panel { align-self: stretch; display: flex; flex-direction: column; height: auto; min-height: 500px; overflow: hidden; }
.dashboard-warning-panel { width: 100%; min-width: 0; }
.dashboard-warning-panel .screen-warning-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.dashboard-warning-panel .screen-warning-empty { min-height: 420px; }
.dashboard-stock-list { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; display: grid; align-content: start; gap: 7px; overflow: visible; padding-right: 0; }
.dashboard-stock-row { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) 100px; align-items: center; gap: 6px; min-height: 38px; padding: 6px 8px; border: 1px solid rgba(53, 130, 214, .32); border-radius: 5px; background: linear-gradient(90deg, rgba(13, 57, 103, .72), rgba(7, 24, 50, .66)); }
.dashboard-stock-row.show-safety-stock { grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) 100px 100px; }
.dashboard-stock-row span { color: #fff3f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stock-row strong, .dashboard-stock-row .stock-link { min-height: 24px; display: grid; place-items: center; border-radius: 4px; color: #51e3ff; background: rgba(27, 83, 124, .45); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-stock-header { position: sticky; top: 0; z-index: 1; min-height: 38px; border-color: rgba(81, 227, 255, .34); background: rgba(8, 35, 68, .96); }
.dashboard-stock-header span, .dashboard-stock-header strong { color: #c6edff; background: transparent; font-size: 15px; font-weight: 900; }
.dashboard-stock-row .stock-link { width: 100%; border: 0; padding: 0 8px; text-decoration: underline; text-underline-offset: 2px; }
.dashboard-stock-row.low-stock-row { border-color: rgba(248, 84, 84, .72); background: linear-gradient(90deg, rgba(112, 29, 39, .72), rgba(49, 18, 32, .7)); }
.dashboard-stock-row strong.low-stock-cell, .dashboard-stock-row .stock-link.low-stock-cell { color: #fff; background: rgba(220, 38, 38, .88); box-shadow: 0 0 14px rgba(255, 64, 64, .28); }
.dashboard-stock-row .stock-link.low-stock-cell:hover { background: rgba(248, 54, 54, .96); box-shadow: 0 0 18px rgba(255, 75, 75, .42); }
.dashboard-stock-panel-head { align-items: flex-start; gap: 14px; }
.dashboard-stock-heading { min-width: 0; display: grid; gap: 2px; }
.dashboard-stock-heading b { margin-left: 0 !important; line-height: 1.35; }
.dashboard-stock-switches { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; margin-left: auto; }
.dashboard-stock-switch { position: relative; display: inline-flex; align-items: center; gap: 7px; color: #c6edff; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; touch-action: manipulation; }
.dashboard-stock-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dashboard-stock-switch-track { position: relative; flex: 0 0 34px; width: 34px; height: 19px; border: 1px solid rgba(142, 190, 225, .48); border-radius: 999px; background: rgba(95, 130, 158, .42); transition: .2s ease; }
.dashboard-stock-switch-track i { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #d9efff; box-shadow: 0 1px 4px rgba(0, 0, 0, .32); transition: .2s ease; }
.dashboard-stock-switch input:checked + .dashboard-stock-switch-track { border-color: rgba(81, 227, 255, .82); background: rgba(43, 200, 255, .5); }
.dashboard-stock-switch input:checked + .dashboard-stock-switch-track i { transform: translateX(15px); background: #fff; }
.dashboard-stock-switch input:focus-visible + .dashboard-stock-switch-track { box-shadow: 0 0 0 3px rgba(81, 227, 255, .2); }
.dashboard-stock-switch em { color: inherit; font-style: normal; }
.dashboard-transport-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; padding-right: 4px; scrollbar-color: rgba(81, 227, 255, .62) rgba(14, 46, 85, .42); scrollbar-width: thin; }
.dashboard-transport-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.dashboard-transport-wrap::-webkit-scrollbar-thumb { background: rgba(81, 227, 255, .62); border-radius: 999px; }
.dashboard-transport-wrap::-webkit-scrollbar-track { background: rgba(14, 46, 85, .42); border-radius: 999px; }
.dashboard-transport-table { min-width: 940px; border-collapse: separate; border-spacing: 0 8px; }
.dashboard-transport-pagination { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 10px; color: #a5d5ea; font-size: 12px; }
.dashboard-transport-pagination > div { display: flex; gap: 8px; }
.dashboard-transport-pagination button { padding: 6px 12px; min-height: 34px; border: 1px solid #378292; border-radius: 6px; background: #12394b; color: #d8f6ff; cursor: pointer; touch-action: manipulation; }
.dashboard-transport-pagination button:disabled { opacity: .45; cursor: default; }
.dashboard-transport-table th, .dashboard-transport-table td { padding: 8px 10px; border: 0; text-align: left; white-space: nowrap; }
.dashboard-transport-table th { position: sticky; top: 0; z-index: 1; color: #83bddf; background: rgba(8, 35, 68, .96); font-size: 12px; }
.dashboard-transport-table td { color: #eef8ff; background: rgba(10, 45, 82, .72); font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.dashboard-transport-table tbody tr td:first-child { border-radius: 5px 0 0 5px; color: #51e3ff; font-weight: 700; }
.dashboard-transport-table tbody tr td:last-child { border-radius: 0 5px 5px 0; }
.dashboard-transport-table .dashboard-sticky-action { position: sticky; right: 0; z-index: 2; box-shadow: -8px 0 12px -11px rgba(0, 0, 0, .9); }
.dashboard-transport-table th.dashboard-sticky-action { z-index: 3; background: rgba(8, 35, 68, .98); }
.dashboard-transport-table td.dashboard-sticky-action { background: rgba(10, 45, 82, .96); }
.dashboard-transport-status { font-weight: 900; }
.dashboard-transport-status--warning { color: #ffd166; }
.dashboard-transport-status--deposit { color: #55b8ff; }
.dashboard-transport-status--danger { color: #ff6b6b; }
.dashboard-transport-status--success { color: #4ade80; }
.dashboard-transport-actions { display: flex; align-items: center; gap: 14px; }
.dashboard-transport-actions a { color: #ffffff; font-size: 14px; font-weight: 900; line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none; text-shadow: 0 0 8px rgba(81, 227, 255, .55); }
.dashboard-transport-actions a:nth-child(2) { color: #ff4d4f; text-shadow: 0 0 9px rgba(255, 77, 79, .55); }
.dashboard-transport-actions a + a { position: relative; }
.dashboard-transport-actions a + a::before { content: ""; position: absolute; left: -7px; top: 1px; bottom: 1px; width: 1px; background: rgba(255, 255, 255, .45); }
.dashboard-transport-actions a:hover { color: #ffe28a; text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 0 10px rgba(255, 213, 109, .65); }
.dashboard-transport-actions a:nth-child(2):hover { color: #ff7779; text-shadow: 0 0 10px rgba(255, 77, 79, .75); }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(57, 196, 255, .22); padding-bottom: 8px; }
.rank-head h2 { margin: 0; color: #eef8ff; font-size: 16px; white-space: nowrap; }
.rank-head div { display: flex; gap: 4px; border: 1px solid rgba(64, 188, 255, .28); border-radius: 5px; padding: 2px; }
.rank-tabs { display: grid; grid-template-columns: 38px minmax(88px, 1fr) minmax(92px, .9fr); gap: 6px; padding: 8px 10px; border: 1px solid rgba(55, 179, 255, .32); border-radius: 4px; background: rgba(8, 35, 68, .72); color: #83bddf; font-size: 12px; white-space: nowrap; }
.rank-board { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; overflow-y: auto; padding-right: 6px; scrollbar-color: rgba(81, 227, 255, .62) rgba(14, 46, 85, .42); scrollbar-width: thin; }
.rank-board::-webkit-scrollbar { width: 6px; }
.rank-board::-webkit-scrollbar-thumb { background: rgba(81, 227, 255, .62); border-radius: 999px; }
.rank-board::-webkit-scrollbar-track { background: rgba(14, 46, 85, .42); border-radius: 999px; }
.rank-card { display: grid; grid-template-columns: 38px minmax(88px, 1fr) minmax(92px, .9fr); gap: 6px; align-items: center; min-height: 46px; padding: 7px 10px; border: 1px solid rgba(58, 145, 224, .36); border-radius: 5px; background: linear-gradient(90deg, rgba(10, 45, 82, .88), rgba(8, 25, 52, .84)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.rank-card b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: #eaf5ff; background: rgba(121, 158, 187, .3); font-size: 14px; }
.rank-card strong { color: #f6fbff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-card span { color: #51e3ff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-card.rank-1 { border-color: rgba(255, 204, 93, .55); background: linear-gradient(90deg, rgba(111, 82, 27, .82), rgba(9, 41, 71, .86)); }
.rank-card.rank-2 { border-color: rgba(196, 220, 246, .45); }
.rank-card.rank-3 { border-color: rgba(222, 154, 99, .48); }
.rank-card.rank-1 b { background: linear-gradient(135deg, #ffe695, #ad771c); color: #14223a; }
.rank-card.rank-2 b { background: linear-gradient(135deg, #f0f7ff, #7e9bb3); color: #14223a; }
.rank-card.rank-3 b { background: linear-gradient(135deg, #ffc596, #93552d); color: #14223a; }
.rank-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(111, 178, 241, .12); }
.rank-index { color: #ffd253; font-weight: 800; }
.rank-name { color: #e7f4ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-value { color: #34e2ff; font-weight: 700; }
.data-wrap { position: relative; width: 100%; overflow: auto; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar-title h2 { margin: 0; color: #eef8ff; font-size: 17px; }
.toolbar-title span { display: block; margin-top: 4px; color: #8eabc9; font-size: 13px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; min-width: min(100%, 560px); }
.toolbar-actions input { min-width: 260px; }
.toolbar-actions .primary, .toolbar-actions .secondary { white-space: nowrap; }
.purchase-search-toolbar { align-items: flex-start; }
.purchase-filter-grid { flex: 1; min-width: min(100%, 900px); display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)) auto; gap: 8px; align-items: center; }
.order-detail-filter-grid { grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(110px, 1fr)) auto; }
.order-detail-date-range { cursor: pointer; }
.layui-laydate table { width: 100%; min-width: 0; }
.layui-laydate th,
.layui-laydate td { border-bottom: 0; text-align: center; white-space: normal; }
.layui-laydate th { color: #666; background: transparent; }
.layui-laydate td { color: #666; }
.purchase-arrived-filter-grid { grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr)) auto; }
.inventory-current-toolbar { flex-wrap: wrap; }
.purchase-filter-grid.inventory-current-filter-grid { flex: 1 1 760px; min-width: min(100%, 760px); grid-template-columns: repeat(3, minmax(140px, 1fr)) auto; }
.list-query-filter-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; }
.freight-query-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)) auto; }
.warehouse-stats-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)) auto; }
.product-mapping-toolbar { align-items: flex-start; }
.product-mapping-filter-grid { flex: 1 1 800px; display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 8px; align-items: center; }
.product-mapping-filter-grid select { min-width: 0; }
.toolbar-actions.product-mapping-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; justify-content: flex-end; }
.toolbar-actions.in-transit-export-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; justify-content: flex-end; }
.toolbar-actions.batch-profit-detail-toggle-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; justify-content: flex-end; }
.purchase-filter-grid input, .purchase-filter-grid select { min-width: 0; }
.batch-filter-grid { flex: 1; min-width: min(100%, 1080px); display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 8px; align-items: center; }
.batch-filter-grid input, .batch-filter-grid select { min-width: 0; }
.batch-filter-grid .purchase-filter-actions { grid-column: span 2; }
.profit-filter-grid { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
.batch-profit-detail-filters { grid-template-columns: minmax(230px, 1.5fr) minmax(160px, 1fr) repeat(4, minmax(120px, 1fr)) auto; }
.profit-overview-filters { margin-bottom: 12px; padding: 14px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.profit-warehouse-filters { margin-top: 2px; }
.profit-filter-field { min-width: 0; display: grid; gap: 6px; }
.profit-filter-field span { color: #666; font-size: 13px; line-height: 1.2; }
.profit-filter-field input, .profit-filter-field select { min-width: 0; }
.profit-filter-actions { min-height: 38px; }
.inventory-report-workbench { min-width: 0; }
.inventory-report-filter-band { padding: 14px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.inventory-report-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.inventory-report-filter-head h2 { margin: 0; color: #1f2329; font-size: 16px; font-weight: 600; }
.inventory-report-filter-head span { display: block; margin-top: 5px; color: #667085; font-size: 13px; font-variant-numeric: tabular-nums; }
.inventory-report-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
.inventory-report-filter-grid input, .inventory-report-filter-grid select { min-width: 0; }
.inventory-report-filter-actions { min-height: 38px; }
.inventory-report-dashboard { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.inventory-chart-panel { min-width: 0; padding: 14px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.inventory-chart-wide { grid-column: 1 / -1; }
.inventory-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #f2f4f7; }
.inventory-chart-head h2 { margin: 0; color: #1f2329; font-size: 15px; line-height: 1.4; font-weight: 600; }
.inventory-chart-head span { color: #8c8c8c; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.inventory-chart { width: 100%; height: 330px; }
.inventory-chart-trend { height: 360px; }
.inventory-chart-heatmap { height: 390px; }
.inventory-report-loading { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: #344054; background: rgba(255,255,255,.84); backdrop-filter: blur(1px); }
.inventory-report-loading strong { font-size: 14px; font-weight: 600; }
.inventory-report-spinner { width: 22px; height: 22px; border: 3px solid #cfe9e6; border-top-color: #16baaa; border-radius: 50%; animation: inventoryReportSpin .72s linear infinite; }
@keyframes inventoryReportSpin { to { transform: rotate(360deg); } }
.purchase-filter-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.purchase-filter-actions .layui-btn { white-space: nowrap; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fafafa; color: #666; }
.pagination-actions { display: flex; align-items: center; gap: 8px; }
.pagination-actions select { width: auto; min-width: 92px; }
.pagination-actions .secondary { min-height: 34px; padding: 0 12px; }
.pagination-actions .secondary[disabled] { opacity: .45; cursor: not-allowed; }
.page-count { min-width: 58px; text-align: center; color: #333; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 10px 11px; border-bottom: 1px solid rgba(111, 178, 241, .13); text-align: left; white-space: nowrap; }
th { color: #8bbbe7; font-weight: 700; background: rgba(19, 65, 116, .42); }
td { color: #d8eaff; }
.table-sort-button { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0; padding: 4px 0; border: 0; color: inherit; font: inherit; background: transparent; cursor: pointer; }
.table-sort-button:hover, .table-sort-button:focus-visible { color: #fff; }
.table-sort-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
.table-sort-indicator { min-width: 12px; color: #50d6ff; font-size: 13px; line-height: 1; }
.admin-table tbody tr:hover td { background: rgba(255, 231, 143, .16); }
.link-btn { border: 0; background: transparent; color: #3bd5ff; padding: 0; }
.link-btn.danger { color: #ff9f9f; }
.table-actions { display: flex; gap: 10px; align-items: center; }
.admin-table .sticky-action-column {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 94px;
  background: #fff;
  box-shadow: -7px 0 10px -10px rgba(0, 0, 0, .72);
}
.admin-table thead .sticky-action-column { z-index: 4; background: #fafafa; }
.admin-table tbody tr:hover .sticky-action-column { background: #fff7c7; }
.admin-table .summary-row .sticky-action-column { background: #fff8e6; }
.profit-positive { color: #15803d; font-weight: 700; }
.profit-negative { color: #dc2626; font-weight: 700; }
.profit-zero { color: inherit; }
.inventory-schedule-ending-soon { color: #dc2626 !important; font-weight: 700; }
.empty-cell { text-align: center; color: #8eabc9; }
.summary-row td { color: #ffe1a6; font-weight: 700; background: rgba(255, 184, 0, .08); }
.workbench { display: grid; gap: 16px; }
.promotion-split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.edit-card { padding: 16px; }
.edit-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.edit-actions { display: flex; gap: 8px; }
.secondary { min-height: 38px; padding: 0 14px; border: 1px solid #315d8b; border-radius: 6px; color: #cfe7ff; background: #0b2446; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.form-grid .full-row { grid-column: 1 / -1; }
.warehouse-form label { display: grid; gap: 6px; color: #55616f; font-weight: 600; }
.warehouse-form label span { font-size: 13px; }
.purchase-batch-form label { display: grid; gap: 6px; color: #55616f; font-weight: 600; }
.purchase-batch-form label span { font-size: 13px; }
.purchase-batch-form .required-field span::after { content: " *"; color: #ff5722; font-weight: 700; }
.purchase-batch-form .full-row { grid-column: 1 / -1; }
.purchase-batch-form textarea { min-height: 92px; }
.purchase-batch-form .arrival-radio-field { align-content: start; }
.purchase-batch-form .radio-group { min-height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border: 1px solid #d8dee8; border-radius: 4px; background: #fff; }
.purchase-batch-form .radio-group label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #2f3b48; font-weight: 500; }
.purchase-batch-form .radio-group input { width: auto; }
.form-grid .radio-field { align-content: start; }
.form-grid .radio-group { min-height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border: 1px solid #d8dee8; border-radius: 4px; background: #fff; }
.form-grid .radio-group label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #2f3b48; font-weight: 500; }
.form-grid .radio-group input { width: auto; }
.user-editor-panel { overflow: hidden; }
.user-editor .form-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px 18px;
  max-width: 1080px;
}
.user-editor .form-grid > input,
.user-editor .form-grid > label { min-width: 0; }
.user-editor .form-grid > label { display: grid; align-content: start; gap: 7px; color: #526273; font-weight: 650; }
.user-editor .form-grid > label > span:first-child { font-size: 13px; }
.user-password-setting {
  grid-column: 1 / -1;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #dce5ec;
  border-radius: 9px;
  background: #f7fafb;
}
.user-password-setting > span:first-child { color: #26384a; font-size: 14px; font-weight: 700; }
.user-password-setting .inline-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  color: #526273;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.workbench .user-password-setting .inline-toggle input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #159f91;
}
.product-warehouse-field { display: grid; gap: 7px; }
.product-warehouse-field > span { color: #55616f; font-size: 13px; font-weight: 600; }
.product-warehouse-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; padding: 10px; border: 1px solid #d8dee8; border-radius: 4px; background: #fff; }
.product-warehouse-option { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 36px; padding: 5px 8px; border: 1px solid #e2e7ee; border-radius: 4px; color: #2f3b48; cursor: pointer; }
.product-warehouse-option input { width: auto; margin: 0; }
.product-warehouse-option b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-warehouse-option small { color: #667789; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-warehouse-option.is-disabled { color: #9aa5b1; background: #f5f6f8; cursor: not-allowed; }
.form-bottom-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.alias-input { grid-column: 1 / -1; min-height: 78px; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.upload-grid.single-upload { grid-template-columns: minmax(220px, 520px); }
.upload-grid label { display: grid; gap: 8px; padding: 18px; border: 1px dashed rgba(69, 173, 255, .55); border-radius: 8px; background: rgba(7, 30, 64, .66); }
.import-export-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(94, 151, 205, .22); display: grid; gap: 10px; justify-items: start; }
.import-export-block h2 { margin: 0; font-size: 18px; }
.import-export-block p { margin: 0; }
.purchase-history-import-card { margin-top: 16px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid #dfe7ef; border-radius: 8px; background: #f8fafc; }
.purchase-history-import-card h3 { margin: 0 0 7px; color: #1f2937; font-size: 17px; }
.purchase-history-import-card p { max-width: 780px; margin: 0; color: #667789; line-height: 1.7; }
.data-operation-section { margin-top: 18px; padding: 20px; border: 1px solid #dfe7ef; border-radius: 10px; background: #fff; }
.data-operation-section-head, .data-migration-preview-head, .data-migration-history-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.data-operation-section-head h3, .data-migration-history-head h3 { margin: 0 0 6px; color: #17263a; font-size: 17px; }
.data-operation-section-head p, .data-migration-history-head p { margin: 0; color: #667789; line-height: 1.65; }
.data-operation-section .purchase-history-import-card { margin-top: 16px; }
.data-migration-section { border-color: #b9ddd8; background: linear-gradient(180deg, #fbfefd 0%, #f5faf9 100%); }
.data-migration-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.data-migration-file-button { position: relative; overflow: hidden; }
.data-migration-file-button input, .purchase-history-import-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.data-migration-file-button.disabled input, .purchase-history-import-button.disabled input { cursor: not-allowed; }
.data-migration-safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.data-migration-safety-grid span { position: relative; padding: 11px 12px 11px 34px; border: 1px solid #d2e9e5; border-radius: 7px; color: #26645d; background: #edf8f6; font-size: 13px; }
.data-migration-safety-grid span::before { content: '✓'; position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; border-radius: 50%; color: #fff; background: #20a99a; text-align: center; font-size: 11px; line-height: 16px; }
.data-migration-message { margin-top: 16px; }
.data-migration-preview { margin-top: 16px; padding: 18px; border: 1px solid #9ed6cd; border-radius: 9px; background: #fff; box-shadow: 0 8px 24px rgba(20, 74, 68, .07); }
.data-migration-preview-head strong, .data-migration-preview-head span { display: block; }
.data-migration-preview-head strong { color: #15776c; font-size: 16px; }
.data-migration-preview-head > div > span { margin-top: 4px; color: #718096; overflow-wrap: anywhere; }
.data-migration-safe-badge { padding: 5px 10px; border-radius: 999px; color: #0f766e; background: #dff5f1; font-size: 12px; white-space: nowrap; }
.data-migration-preview dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.data-migration-preview dl div { padding: 12px; border-radius: 7px; background: #f3f7f8; }
.data-migration-preview dt { color: #758699; font-size: 12px; }
.data-migration-preview dd { margin: 5px 0 0; color: #17263a; font-weight: 600; overflow-wrap: anywhere; }
.data-migration-counts { display: flex; flex-wrap: wrap; gap: 8px; max-height: 140px; margin-top: 14px; padding-right: 4px; overflow: auto; }
.data-migration-counts span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #e0e7ed; border-radius: 6px; background: #fafcfd; }
.data-migration-counts em { color: #607084; font-style: normal; font-size: 12px; }
.data-migration-counts strong { color: #17263a; font-size: 12px; }
.data-migration-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.data-migration-history { margin-top: 20px; padding-top: 18px; border-top: 1px solid #dce9e7; }
.data-migration-history .data-wrap { margin-top: 12px; }
.data-migration-status { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.data-migration-status.is-completed { color: #0f766e; background: #dff5f1; }
.data-migration-status.is-failed { color: #b42318; background: #fee4e2; }
.data-migration-status.is-rolled_back { color: #78500b; background: #fff2cc; }
.purchase-history-import-button { position: relative; flex: 0 0 auto; min-width: 156px; overflow: hidden; text-align: center; }
.purchase-history-import-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.purchase-history-import-button.disabled { cursor: wait; opacity: .65; }
.daily-schedule-toolbar { align-items: flex-start; }
.daily-schedule-toolbar .toolbar-title { min-width: 0; }
.daily-schedule-toolbar .toolbar-title span { max-width: 760px; line-height: 1.6; }
.daily-schedule-toolbar-actions { flex: 0 0 auto; min-width: 0; margin-left: auto; justify-content: flex-end; }
.daily-schedule-detail-toggle { min-width: 128px; }
.daily-schedule-detail-toggle.active { border-color: #16baaa; background: #ecfdf8; color: #0f766e; }
.daily-schedule-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)) auto; align-items: end; gap: 12px; margin: 18px 0 14px; padding: 14px; border: 1px solid #e5eaf0; border-radius: 6px; background: #f8fafc; }
.daily-schedule-filter-grid label { display: grid; gap: 6px; min-width: 0; color: #55616f; font-weight: 600; }
.daily-schedule-filter-grid label > span { font-size: 13px; }
.daily-schedule-filter-grid input, .daily-schedule-filter-grid select { width: 100%; min-height: 38px; }
.daily-schedule-filter-actions { display: flex; align-items: center; gap: 8px; }
.daily-schedule-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.daily-schedule-summary > div, .daily-schedule-summary > button { min-height: 70px; padding: 12px 14px; border: 1px solid #e5eaf0; border-left: 4px solid #657789; border-radius: 4px; background: #fff; text-align: left; }
.daily-schedule-summary span { display: block; color: #667789; font-size: 13px; }
.daily-schedule-summary strong { display: block; margin-top: 8px; color: #1f2937; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.daily-schedule-summary .is-joined { border-left-color: #16a36a; }
.daily-schedule-summary .is-reviewing { border-left-color: #d6a20b; background: #fffbeb; }
.daily-schedule-summary .is-reviewing strong { color: #b77900; }
.daily-schedule-summary .is-no-flash-sale { border-left-color: #e11d48; background: #fff7f8; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.daily-schedule-summary .is-no-flash-sale strong { color: #be123c; }
.daily-schedule-summary .is-no-flash-sale:hover, .daily-schedule-summary .is-no-flash-sale.active { border-color: #e11d48; box-shadow: 0 5px 14px rgba(190, 18, 60, .12); transform: translateY(-1px); }
.daily-schedule-summary .is-no-flash-sale:disabled { cursor: wait; opacity: .7; transform: none; }
.daily-schedule-summary .is-delisted { border-left-color: #dc2626; background: #fff7f7; }
.daily-schedule-summary .is-delisted strong { color: #b42318; }
.schedule-status-joined { color: #087a4f; font-weight: 700; }
.schedule-status-reviewing { color: #c48700; font-weight: 700; }
.schedule-status-delisted { color: #c81e1e; font-weight: 700; }
.schedule-flash-sale-price { color: #c81e1e; font-weight: 800; }
.admin-table tbody tr.daily-schedule-row-delisted > td,
.admin-table tbody tr.daily-schedule-row-delisted:hover > td { background: #fff0f1 !important; color: #a61b1b; }
.admin-table tbody tr.daily-schedule-row-delisted > td.sticky-action-column { background: #fff0f1 !important; }
.admin-table tbody tr.product-delist-row-partial > td,
.admin-table tbody tr.product-delist-row-partial:hover > td { background: #fff9eb !important; }
.admin-table tbody tr.product-delist-row-partial > td.sticky-action-column { background: #fff9eb !important; }
.daily-schedule-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 8px; margin-top: 16px; border-bottom: 1px solid #dfe5ec; }
.daily-schedule-tabs button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; margin-bottom: -1px; padding: 0 16px; border: 1px solid transparent; border-bottom-color: #dfe5ec; border-radius: 6px 6px 0 0; background: transparent; color: #5e6b78; font-weight: 600; cursor: pointer; }
.daily-schedule-tabs button:hover { background: #f6f8fb; color: #1f2937; }
.daily-schedule-tabs button.active { border-color: #dfe5ec; border-bottom-color: #fff; background: #fff; color: #0f766e; }
.daily-schedule-tabs button strong { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #e9eef4; color: #465568; font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.daily-schedule-tabs button.active strong { background: #dff7f1; color: #087a69; }
.daily-schedule-tabs button:last-child.active { color: #b42318; }
.daily-schedule-tabs button:last-child.active strong { background: #fee9e7; color: #b42318; }
.daily-schedule-table-section { margin-top: 12px; }
.daily-schedule-tab-note { margin-bottom: 10px; color: #6b7785; font-size: 13px; }
.notice { margin-top: 16px; color: #7ff0bd; }
.profit-period-tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.profit-period-tabs .layui-btn { border-color: #d2d2d2; background: #fff; color: #333; }
.profit-period-tabs .layui-btn.active { border-color: #16baaa; background: #16baaa; color: #fff; }
.batch-profit-tabs { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f0f0f0; border-bottom: 0; border-radius: 2px 2px 0 0; background: #fff; }
.batch-profit-tabs .layui-btn { min-height: 34px; border-color: #d2d2d2; background: #fff; color: #333; }
.batch-profit-tabs .layui-btn.active { border-color: #16baaa; background: #16baaa; color: #fff; }
.profit-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profit-overview-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profit-card { min-height: 92px; padding: 16px; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); border-left: 4px solid #16baaa; }
.profit-card span { display: block; color: #8c8c8c; font-size: 13px; }
.profit-card strong { display: block; margin-top: 12px; color: #1f2329; font-size: 24px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.profit-card small { display: block; margin-top: 9px; color: #8c8c8c; font-size: 12px; line-height: 1.35; }
.profit-card.emphasis { border-left-color: #ffb800; }
.profit-card.emphasis strong { color: #d48806; }
.collection-accounting-filter-grid { grid-template-columns: repeat(2, minmax(160px, 240px)) auto; justify-content: start; }
.collection-accounting-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-accounting-formula-panel .table-toolbar { margin-bottom: 0; }
.collection-accounting-actions { min-width: 0; }
.collection-accounting-entry-panel { padding: 16px !important; }
.collection-accounting-entry-panel .table-toolbar { margin-bottom: 14px; }
.collection-accounting-form-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.profit-card.cashflow-deficit { border-left-color: #dc2626; }
.profit-card.cashflow-deficit strong { color: #dc2626; }
.profit-breakdown-panel { display: grid; gap: 12px; }
.profit-breakdown-panel .table-toolbar { margin-bottom: 0; }
.profit-breakdown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.breakdown-card { min-height: 82px; padding: 14px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fafafa; }
.breakdown-card span { display: block; color: #8c8c8c; font-size: 13px; }
.breakdown-card strong { display: block; margin-top: 10px; color: #1f2329; font-size: 20px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breakdown-card.income { border-left: 4px solid #16a085; background: #f1fbf8; }
.breakdown-card.income strong { color: #0f8a6c; }
.breakdown-card.deduction strong { color: #d93026; }
.breakdown-card.return { border-left: 4px solid #e67e22; background: #fff8f0; }
.breakdown-card.return strong { color: #c65d00; }
.breakdown-card.final { border-left: 4px solid #ffb800; background: #fffaf0; }
.breakdown-card.final strong { color: #b56d00; }
.profit-breakdown-grid .breakdown-card.final { grid-column: span 2; }
.profit-detail-tabs { margin-top: 2px; }
.profit-detail-tabs strong { min-width: 24px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #edf1f5; color: #566273; font-size: 12px; }
.profit-detail-tabs .active strong { background: rgba(255,255,255,.24); color: #fff; }
.profit-return-note { margin: 0; padding: 10px 12px; border: 1px solid #f0f0f0; border-top: 0; background: #fffaf0; color: #7a5314; font-size: 13px; }

.operation-log-filters { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; padding: 14px 0; }
.operation-log-filters label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #5f6368; font-size: 13px; }
.operation-log-filters input, .operation-log-filters select { width: 100%; height: 38px; }
.operation-log-filters .operation-log-keyword { grid-column: span 2; }
.operation-log-filter-actions { display: flex; align-items: end; gap: 8px; }
.operation-log-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.operation-log-summary span { padding: 7px 12px; border-radius: 2px; background: #f5f7fa; color: #5f6368; }
.operation-log-summary .is-success { background: #edf8f4; color: #0f8a6c; }
.operation-log-summary .is-failed { background: #fff1f0; color: #c62828; }
.operation-log-table { min-width: 1320px; }
.operation-log-table th, .operation-log-table td { vertical-align: top; }
.operation-log-table small { display: block; margin-top: 4px; color: #8c8c8c; font-size: 12px; }
.operation-log-time { white-space: nowrap; }
.operation-result { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 10px; text-align: center; }
.operation-result.is-success { background: #edf8f4; color: #0f8a6c; }
.operation-result.is-failed { background: #fff1f0; color: #c62828; }
.operation-log-detail { min-width: 320px; max-width: 480px; }
.operation-log-detail summary { max-width: 450px; cursor: pointer; color: #1677ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.operation-log-detail pre { max-height: 320px; margin: 8px 0 0; padding: 10px; overflow: auto; border-radius: 2px; background: #f6f8fa; color: #333; font: 12px/1.55 Consolas, Monaco, monospace; white-space: pre-wrap; word-break: break-all; }
.operation-log-detail p { margin: 8px 0 0; color: #8c8c8c; font-size: 12px; word-break: break-all; }

@media (max-width: 1100px) {
  .operation-log-filters { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .operation-log-filters .operation-log-keyword { grid-column: span 1; }
}

.app-shell:not(.screening) { background: #f2f2f2; color: #333; }
.app-shell:not(.screening) .sidebar { background: #20222a; border-right: 0; box-shadow: 2px 0 8px rgba(0,0,0,.12); }
.app-shell:not(.screening) .logo { color: #fff; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.app-shell:not(.screening) .nav-group { margin: 10px 0 12px; }
.app-shell:not(.screening) .nav-group-title { color: rgba(255,255,255,.42); }
.app-shell:not(.screening) .sidebar .layui-btn { display: flex; align-items: center; justify-content: flex-start; width: 100%; height: 40px; box-sizing: border-box; margin: 6px 0; padding: 0 12px; border: 0; border-radius: 2px; background: transparent; color: rgba(255,255,255,.76); text-align: left; text-decoration: none; }
.app-shell:not(.screening) .sidebar .layui-btn:hover, .app-shell:not(.screening) .sidebar .layui-btn.active { background: #16baaa; color: #fff; }
.app-shell:not(.screening) .sidebar .layui-btn.muted { color: rgba(255,255,255,.58) !important; }
.app-shell:not(.screening) .main { background: #f2f2f2; }
.app-shell:not(.screening) .topbar { margin-bottom: 16px; padding: 16px 18px; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.app-shell:not(.screening) .topbar h1 { color: #1f2329; font-size: 22px; font-weight: 600; }
.app-shell:not(.screening) .topbar p { color: #8c8c8c; }
.app-shell:not(.screening) .user-pill { border-color: #e6e6e6; background: #fafafa; color: #666; }
.workbench .panel, .workbench .edit-card { border: 0; border-radius: 2px; background: #fff; color: #333; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.workbench .panel { padding: 16px; }
.workbench .panel h2, .workbench .edit-card h2 { color: #1f2329; font-size: 16px; font-weight: 600; }
.workbench .edit-card { padding: 0; }
.workbench .edit-card-head { min-height: 52px; margin: 0; border-bottom: 1px solid #f0f0f0; }
.workbench .edit-card-head h2 { margin: 0; }
.workbench .layui-card-body { padding: 16px; }
.workbench input:not([type=file]), .workbench select, .workbench textarea, .toolbar-actions input { min-height: 38px; border: 1px solid #e6e6e6; border-radius: 2px; background: #fff; color: #333; }
.workbench input:focus, .workbench select:focus, .workbench textarea:focus, .toolbar-actions input:focus { border-color: #16baaa; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.workbench input:disabled { color: #999; background: #f7f7f7; cursor: not-allowed; }
.workbench input[type="date"], .toolbar-actions input[type="date"] { cursor: pointer; caret-color: transparent; }
.workbench .table-toolbar { padding: 12px 14px; border: 1px solid #f0f0f0; border-radius: 2px; background: #fafafa; }
.workbench .toolbar-title h2 { color: #1f2329; }
.workbench .toolbar-title span { color: #8c8c8c; }
.workbench .layui-table { margin: 0; color: #333; }
.workbench .layui-table th { color: #333; background: #fafafa; font-weight: 600; }
.workbench .layui-table td { color: #333; }
.workbench .layui-table tbody tr:hover td { background: #fff7c7; }
.workbench .layui-table tbody tr.summary-row:hover td { background: #fff3b0; }
.workbench .layui-table .summary-row td { color: #8a5a00; background: #fff8e6; font-weight: 600; }
.workbench .layui-table td.profit-positive { color: #15803d; font-weight: 700; }
.workbench .layui-table td.profit-negative { color: #dc2626; font-weight: 700; }
.workbench .layui-table td.profit-zero { color: #333; }
.workbench .table-actions { gap: 6px; }
.workbench .empty-cell { color: #999; }
.manufacturer-notice-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.manufacturer-notice-form-grid label { display: grid; gap: 7px; color: #666; }
.manufacturer-notice-form-grid label > span { font-size: 13px; font-weight: 600; }
.manufacturer-notice-form-grid .manufacturer-notice-content { grid-column: 1 / -1; }
.manufacturer-notice-form-grid textarea { width: 100%; resize: vertical; }
.manufacturer-notice-form-grid .manufacturer-notice-active { display: flex; align-items: center; gap: 8px; }
.manufacturer-notice-form-grid .manufacturer-notice-active input { width: 16px; min-height: 16px; }
.primary.layui-btn, .workbench .primary.layui-btn { border-color: #16baaa; background: #16baaa; color: #fff; }
.fifo-rebuild-actions { min-width: 0; }
.fifo-rebuild-actions .layui-btn { margin: 0; white-space: nowrap; }
.fifo-rebuild-actions .layui-btn:disabled { opacity: .58; cursor: not-allowed; }
.fifo-rebuild-description, .fifo-rebuild-warning { margin-top: 14px; padding: 14px 16px; border: 1px solid #e5e7eb; border-left: 4px solid #16baaa; background: #f8fffe; color: #333; }
.fifo-rebuild-warning { border-left-color: #ffb800; background: #fffaf0; }
.fifo-rebuild-description strong, .fifo-rebuild-warning strong { display: block; color: #1f2329; font-size: 14px; }
.fifo-rebuild-description p, .fifo-rebuild-warning p { margin: 7px 0 0; color: #666; line-height: 1.7; }
.fifo-rebuild-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid #b9e7e2; background: #f0fffc; color: #344054; }
.fifo-rebuild-progress div { display: grid; gap: 4px; }
.fifo-rebuild-progress span { color: #667085; font-size: 13px; }
.fifo-rebuild-result { border-top: 4px solid #16baaa !important; }
.fifo-rebuild-result.is-failed { border-top-color: #dc2626 !important; }
.fifo-rebuild-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.fifo-rebuild-result-head h2 { margin: 0; }
.fifo-rebuild-result-head p { margin: 7px 0 0; color: #667085; line-height: 1.6; }
.fifo-rebuild-result-head > span { flex: 0 0 auto; padding: 5px 10px; border: 1px solid #b9e7e2; background: #f0fffc; color: #118678; font-size: 13px; font-weight: 700; }
.fifo-rebuild-result.is-failed .fifo-rebuild-result-head > span { border-color: #fecaca; background: #fff1f2; color: #dc2626; }
.fifo-rebuild-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 14px; border-top: 1px solid #f0f0f0; border-left: 1px solid #f0f0f0; }
.fifo-rebuild-meta > div { min-width: 0; padding: 12px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.fifo-rebuild-meta dt { color: #8c8c8c; font-size: 12px; }
.fifo-rebuild-meta dd { margin: 7px 0 0; overflow-wrap: anywhere; color: #1f2329; font-weight: 700; font-variant-numeric: tabular-nums; }
.fifo-rebuild-compare th, .fifo-rebuild-compare td { text-align: right; font-variant-numeric: tabular-nums; }
.fifo-rebuild-compare th:first-child, .fifo-rebuild-compare td:first-child { text-align: left; }
.fifo-rebuild-failures { margin-top: 14px; padding: 12px 14px; border-left: 4px solid #dc2626; background: #fff1f2; color: #7f1d1d; }
.fifo-rebuild-failures p { margin: 7px 0 0; line-height: 1.55; }
.fifo-unmatched-wrap { margin-top: 14px; }
@media (max-width: 900px) {
  .manufacturer-notice-form-grid { grid-template-columns: 1fr; }
  .manufacturer-notice-form-grid .manufacturer-notice-content { grid-column: auto; }
}
.secondary.layui-btn-primary, .workbench .secondary.layui-btn-primary { border-color: #d2d2d2; background: #fff; color: #333; }
.license-status-bar { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-left: 4px solid #b2b2b2; background: #fafafa; }
.license-status-bar strong { color: #333; font-weight: 600; }
.license-status-badge { flex: 0 0 auto; min-width: 76px; padding: 5px 10px; border-radius: 2px; text-align: center; color: #666; background: #e8e8e8; font-weight: 700; }
.license-status-badge.is-valid { color: #0f6f3d; background: #dff5e8; }
.license-status-badge.is-grace { color: #8a5a00; background: #fff2cc; }
.license-status-badge.is-invalid { color: #b42318; background: #fee4e2; }
.purchase-document-workbench { display: grid; gap: 14px; }
.purchase-document-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.purchase-document-direct-toolbar { align-items: flex-end; }
.purchase-document-direct-filters { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.purchase-document-direct-filters select { width: auto; min-width: 150px; max-width: 230px; }
.purchase-document-supplier-summary { margin: 0 0 14px; border: 1px solid #dfe8e7; background: #f8fbfb; }
.purchase-document-supplier-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; padding: 9px 14px; border-bottom: 1px solid #dfe8e7; }
.purchase-document-supplier-summary-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-width: 0; }
.purchase-document-supplier-summary-head strong { color: #1f2329; font-size: 16px; }
.purchase-document-supplier-summary-head span { color: #69757f; font-size: 13px; }
.purchase-document-summary-table-wrap { width: 100%; overflow-x: auto; border: 0; }
.purchase-document-supplier-summary-table { min-width: 680px; }
.purchase-document-supplier-summary-table th, .purchase-document-supplier-summary-table td { width: 20%; }
.purchase-document-supplier-summary-table th:first-child, .purchase-document-supplier-summary-table td:first-child { width: 40%; }
.purchase-document-supplier-summary-table tfoot th { color: #1f2329; background: #eef7f6; font-weight: 700; }
.purchase-document-uninvoiced-amount { color: #b42318 !important; font-weight: 700; }
.purchase-document-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e8e8e8; }
.purchase-document-table { width: 100%; min-width: 1000px; border-collapse: collapse; background: #fff; }
.purchase-document-detail-table { min-width: 1720px; }
.purchase-document-table th, .purchase-document-table td { padding: 11px 12px; border-right: 1px solid #eee; border-bottom: 1px solid #eee; color: #333; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.purchase-document-table th { color: #1f2329; background: #fafafa; font-size: 14px; font-weight: 700; }
.purchase-document-table tbody tr:hover td { background: #fff7c7; }
.purchase-document-table .sticky-action-cell { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -8px 0 12px -12px rgba(0, 0, 0, .55); }
.purchase-document-table th.sticky-action-cell { z-index: 3; background: #fafafa; }
.purchase-document-table tbody tr:hover .sticky-action-cell { background: #fff7c7; }
.purchase-document-age-normal { color: #59636e !important; font-weight: 700; }
.purchase-document-age-blue { color: #1565c0 !important; font-weight: 700; }
.purchase-document-age-amber { color: #b45309 !important; font-weight: 700; }
.purchase-document-age-red, .purchase-document-unassigned { color: #b42318 !important; font-weight: 700; }
.purchase-document-inline-cell.is-editable { cursor: pointer; }
.purchase-document-inline-cell.is-editable:hover { box-shadow: inset 0 0 0 1px #20b9aa; }
.purchase-document-inline-select { min-width: 180px; height: 32px; padding: 0 30px 0 8px; border: 1px solid #20b9aa; background: #fff; color: #1f2329; font-weight: 400; }
.purchase-document-inline-status-select { min-width: 112px; }
.purchase-document-status { display: inline-block; min-width: 68px; padding: 4px 8px; border-radius: 2px; text-align: center; font-weight: 700; }
.purchase-document-status.is-complete { color: #137333; background: #e6f4ea; }
.purchase-document-status.is-pending { color: #b42318; background: #fee4e2; }
.purchase-document-status.is-pending-green { color: #137333; background: #e6f4ea; }
.purchase-document-status.is-pending-normal { color: #59636e; background: #f1f3f5; }
.purchase-document-status.is-pending-blue { color: #1565c0; background: #e8f1ff; }
.purchase-document-status.is-pending-amber { color: #b45309; background: #fff1cc; }
.purchase-document-status.is-pending-red { color: #b42318; background: #fee4e2; }
.purchase-document-batch-status { display: inline-block; min-width: 54px; padding: 4px 8px; border-radius: 2px; text-align: center; font-weight: 700; }
.purchase-document-batch-status.is-in_transit { color: #1565c0; background: #e8f1ff; }
.purchase-document-batch-status.is-arrived { color: #137333; background: #e6f4ea; }
.purchase-document-details { scroll-margin-top: 16px; }
.empty-table-cell { padding: 36px 12px !important; color: #8c8c8c; text-align: center !important; }
.license-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; border-top: 1px solid #eeeeee; border-left: 1px solid #eeeeee; }
.license-info-grid > div { min-width: 0; min-height: 72px; padding: 12px 14px; border-right: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee; }
.license-info-grid dt { margin-bottom: 7px; color: #8c8c8c; font-size: 13px; }
.license-info-grid dd { margin: 0; color: #262626; font-weight: 600; overflow-wrap: anywhere; }
.license-instance { grid-column: span 2; }
.license-activate-panel .toolbar-title { margin-bottom: 14px; }
.license-workbench .license-activate-panel { order: -1; }
.license-activate-row { display: grid; grid-template-columns: minmax(280px, 620px) auto; justify-content: start; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid #eeeeee; }
.license-activate-row.plan-purchase-row { grid-template-columns: minmax(280px, 620px) auto; }
.license-activate-row input { width: 100%; font-family: Consolas, monospace; }
.license-activate-row .layui-btn { min-width: 110px; margin: 0; }
.license-activate-row .layui-btn:disabled { opacity: .55; cursor: not-allowed; }
.recharge-qr-card { display: flex; align-items: center; gap: 24px; margin-top: 18px; padding: 20px; border: 1px solid #d9eadf; background: #f7fcf9; }
.recharge-qr-card img { width: 220px; height: 220px; flex: 0 0 auto; border: 8px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); image-rendering: pixelated; }
.recharge-qr-card h3 { margin: 0 0 12px; color: #0f6f3d; font-size: 22px; }
.recharge-qr-card p { margin: 7px 0; color: #555; }
.recharge-qr-detail { flex: 1; min-width: 0; }
.recharge-confirm-box { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px; border: 1px solid #cde8dc; border-radius: 4px; background: #fff; }
.recharge-confirm-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.recharge-confirm-box .layui-btn { min-width: 116px; margin: 0; }
.recharge-confirm-box .layui-btn:disabled { opacity: .55; cursor: not-allowed; }
.recharge-confirm-box span { color: #68766f; font-size: 13px; line-height: 1.6; }
.recharge-close-button { color: #4f6257; border: 1px solid #b8c8be; background: #fff; }
.recharge-close-button:hover { color: #b42318; border-color: #e0a7a2; background: #fff7f6; }
.recharge-records-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e8eee9; }
.recharge-records-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.recharge-records-head h3 { margin: 0; color: #26382e; font-size: 17px; }
.recharge-records-head .layui-btn { margin: 0; }
.recharge-records-table-wrap { width: 100%; overflow-x: auto; }
.recharge-records-table { min-width: 620px; margin: 0; }
.recharge-records-table td small { display: block; margin-top: 3px; color: #8c8c8c; }
.recharge-record-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; color: #606c65; background: #eef2ef; font-size: 12px; font-weight: 600; }
.recharge-record-status.pending { color: #ad6800; background: #fff7e6; }
.recharge-record-status.completed { color: #167446; background: #e9f7ef; }
.recharge-record-status.failed { color: #b42318; background: #fff1f0; }
.recharge-order-close-button { margin: 0; color: #b42318; border: 1px solid #efb5b0; background: #fff; }
.recharge-order-close-button:disabled { opacity: .55; cursor: not-allowed; }
.recharge-record-no-action { color: #b5b5b5; }
.recharge-records-empty { padding: 34px 12px !important; color: #8c8c8c; text-align: center !important; }
.selected-plan-summary { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 13px; border: 1px solid #cde8dc; border-radius: 3px; background: #f3fbf7; color: #3c5b4a; }
.selected-plan-summary strong { color: #0f6f3d; }
.layui-layer { color: #333; }
.layui-layer input,
.layui-layer textarea,
.layui-layer .layui-layer-input {
  background: #fff !important;
  color: #333 !important;
  border-color: #d2d2d2 !important;
  box-shadow: none !important;
}
.layui-layer input:focus,
.layui-layer textarea:focus,
.layui-layer .layui-layer-input:focus {
  border-color: #16baaa !important;
  box-shadow: 0 0 0 3px rgba(22, 186, 170, .1) !important;
}

.big-screen { position: relative; height: 100vh; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: 84px minmax(0, 1fr); gap: 14px; padding: 16px; background: radial-gradient(circle at 78% 20%, rgba(18, 171, 255, .24), transparent 28%), radial-gradient(circle at 18% 84%, rgba(217, 119, 6, .15), transparent 24%), linear-gradient(135deg, #020817 0%, #061326 48%, #020617 100%); overflow: hidden; }
.big-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(79, 213, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 213, 255, .045) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 62% 48%, #000 0, transparent 72%); }
.big-screen::after { content: ""; position: absolute; left: -20%; right: -20%; top: 0; height: 140px; pointer-events: none; background: linear-gradient(180deg, rgba(76, 220, 255, .18), transparent); animation: screenScan 5.5s ease-in-out infinite; }
.screen-top { position: relative; z-index: 2; grid-column: 1 / -1; display: grid; grid-template-columns: 150px minmax(0, 1fr) 210px; align-items: center; gap: 16px; min-height: 68px; padding: 10px 16px; border: 1px solid rgba(67, 211, 255, .5); border-radius: 6px; background: linear-gradient(90deg, rgba(4, 16, 35, .88), rgba(7, 40, 70, .74), rgba(4, 16, 35, .88)); box-shadow: 0 0 34px rgba(24, 194, 255, .16), inset 0 0 24px rgba(47, 199, 255, .08); }
.screen-title { text-align: center; color: #eaf8ff; }
.screen-title span { display: block; color: #51e3ff; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.screen-title strong { display: block; margin-top: 2px; font-size: 30px; font-weight: 900; text-shadow: 0 0 18px rgba(73, 222, 255, .42); }
.screen-clock { justify-self: end; color: #ffe0a3; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.screen-brand { color: #8edfff; font-size: 14px; font-weight: 800; white-space: nowrap; }
.screen-back { min-height: 38px; border: 1px solid rgba(83, 206, 255, .58); background: rgba(10, 45, 92, .72); color: #dff4ff; border-radius: 5px; padding: 0 16px; box-shadow: inset 0 0 14px rgba(71, 214, 255, .12); transition: background .2s ease, border-color .2s ease; }
.screen-back:hover { border-color: rgba(255, 218, 120, .7); background: rgba(16, 64, 116, .9); }
.screen-left { position: relative; z-index: 1; grid-row: 2; display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 0; overflow: hidden; }
.screen-card { position: relative; overflow: hidden; padding: 16px; min-height: 98px; border: 1px solid rgba(64, 188, 255, .46); border-radius: 6px; background: linear-gradient(140deg, rgba(10, 43, 82, .86), rgba(4, 17, 38, .92)); box-shadow: 0 0 0 1px rgba(75, 223, 255, .08) inset, 0 16px 36px rgba(0,0,0,.22); }
.screen-card::before { content: ""; position: absolute; inset: -60% -20% auto 34%; height: 130%; background: radial-gradient(circle, rgba(76, 220, 255, .36), transparent 55%); filter: blur(18px); opacity: .75; }
.screen-card span { position: relative; z-index: 1; display: block; color: #bcecff; font-size: 14px; font-weight: 700; }
.screen-card strong { position: relative; z-index: 1; display: block; margin-top: 12px; color: #55efff; font-size: 32px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(78, 234, 255, .34); white-space: nowrap; }
.screen-card small { position: relative; z-index: 1; display: block; margin-top: 12px; color: #709bc0; font-size: 11px; font-weight: 700; }
.screen-card.primary-card { min-height: 142px; border-color: rgba(255, 202, 91, .55); background: linear-gradient(140deg, rgba(45, 39, 38, .9), rgba(8, 35, 68, .9)); }
.screen-card.primary-card strong { color: #ffd56d; font-size: 42px; text-shadow: 0 0 22px rgba(255, 183, 74, .36); }
.screen-card.profit strong { color: #ffd56d; }
.screen-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.screen-metric-grid .screen-card { min-height: 110px; }
.screen-metric-grid .screen-card strong { font-size: 24px; }
.screen-side-panel { min-height: 0; padding: 14px; border: 1px solid rgba(64, 188, 255, .46); border-radius: 6px; background: rgba(4, 17, 38, .82); box-shadow: inset 0 0 28px rgba(30, 144, 255, .1); }
.screen-rank-panel { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
.screen-warning-panel { flex: 1 1 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.screen-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(76, 220, 255, .24); color: #eaf8ff; font-weight: 800; }
.screen-panel-head b { color: #51e3ff; font-size: 12px; }
.screen-panel-head.warning b { color: #ff8888; }
.dashboard-panel-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.dashboard-purchase-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 12px; border: 1px solid rgba(81, 227, 255, .62); border-radius: 7px; color: #06223d; background: linear-gradient(135deg, #73ecf5, #43c9df); font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 5px 15px rgba(42, 194, 219, .22); touch-action: manipulation; }
.dashboard-purchase-button:hover { color: #03182d; background: linear-gradient(135deg, #94f4f8, #60d9e8); transform: translateY(-1px); }
.dashboard-purchase-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.screen-rank-head { gap: 10px; }
.screen-rank-tabs { flex: 0 0 auto; display: flex; gap: 3px; padding: 2px; border: 1px solid rgba(64, 188, 255, .28); border-radius: 5px; background: rgba(7, 24, 50, .58); }
.screen-rank-tabs button { min-height: 24px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #8ebee1; font-size: 12px; font-weight: 800; }
.screen-rank-tabs button.active { color: #061326; background: #51e3ff; box-shadow: 0 0 12px rgba(81, 227, 255, .32); }
.screen-rank-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding-right: 6px; scrollbar-color: rgba(81, 227, 255, .62) rgba(14, 46, 85, .42); scrollbar-width: thin; }
.screen-rank-list::-webkit-scrollbar, .screen-warning-list::-webkit-scrollbar { width: 6px; }
.screen-rank-list::-webkit-scrollbar-thumb, .screen-warning-list::-webkit-scrollbar-thumb { background: rgba(81, 227, 255, .62); border-radius: 999px; }
.screen-rank-list::-webkit-scrollbar-track, .screen-warning-list::-webkit-scrollbar-track { background: rgba(14, 46, 85, .42); border-radius: 999px; }
.screen-rank { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(53, 130, 214, .32); border-radius: 5px; background: linear-gradient(90deg, rgba(13, 57, 103, .72), rgba(7, 24, 50, .66)); }
.screen-rank b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: rgba(81, 227, 255, .16); color: #eaf8ff; }
.screen-rank:first-of-type b { background: linear-gradient(135deg, #ffe08a, #b77a1a); color: #10233e; }
.screen-rank span { color: #f2fbff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-rank strong { color: #51e3ff; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.screen-warning-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px; scrollbar-color: rgba(255, 136, 136, .7) rgba(80, 22, 34, .42); scrollbar-width: thin; }
.screen-warning-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 38px; margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(255, 88, 88, .42); border-radius: 5px; background: linear-gradient(90deg, rgba(101, 22, 34, .72), rgba(42, 13, 28, .64)); }
.screen-warning-row span { color: #fff3f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-warning-row strong { color: #ff9a9a; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.screen-warning-empty { flex: 1 1 auto; display: grid; place-items: center; min-height: 0; color: #7fb7d8; font-weight: 700; }
.screen-right { position: relative; z-index: 1; grid-row: 2; display: grid; grid-template-rows: minmax(0, 1fr) 96px; gap: 14px; min-width: 0; min-height: 0; }
.screen-map-frame { position: relative; min-height: 0; border: 1px solid rgba(82, 213, 255, .58); border-radius: 6px; background: radial-gradient(circle at 58% 48%, transparent 0 27%, rgba(80, 230, 255, .12) 27.2% 27.6%, transparent 27.9% 36%, rgba(255, 209, 102, .1) 36.2% 36.6%, transparent 36.9% 48%, rgba(80, 230, 255, .08) 48.2% 48.5%, transparent 48.8%), radial-gradient(circle at 58% 48%, rgba(70, 213, 255, .25), transparent 42%), linear-gradient(135deg, rgba(2, 12, 31, .92), rgba(3, 26, 55, .76)); box-shadow: 0 0 48px rgba(24, 194, 255, .2), inset 0 0 42px rgba(47, 199, 255, .08); overflow: hidden; }
.screen-map-frame > .screen-map::after { content: ""; position: absolute; inset: 12%; pointer-events: none; background: conic-gradient(from 80deg, transparent, rgba(83, 232, 255, .2), transparent 18%, transparent); border-radius: 50%; opacity: .72; animation: radarSweep 7s linear infinite; }
.screen-map-frame::before, .screen-map-frame::after { content: ""; position: absolute; width: 86px; height: 86px; pointer-events: none; border-color: #64e8ff; opacity: .85; }
.screen-map-frame::before { top: 12px; left: 12px; border-top: 2px solid; border-left: 2px solid; }
.screen-map-frame::after { right: 12px; bottom: 12px; border-right: 2px solid; border-bottom: 2px solid; }
.screen-map { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 520px; }
.screen-bottom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.screen-bottom article { min-width: 0; padding: 14px 16px; border: 1px solid rgba(64, 188, 255, .42); border-radius: 6px; background: linear-gradient(135deg, rgba(7, 31, 62, .86), rgba(5, 16, 34, .9)); box-shadow: inset 0 0 18px rgba(61, 205, 255, .08); }
.screen-bottom span { display: block; color: #9fc6f0; font-size: 13px; }
.screen-bottom strong { display: block; margin-top: 8px; color: #f6fbff; font-size: 24px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.screen-bottom .screen-channel-box { padding: 12px 14px; }
.screen-bottom .screen-channel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 5px; margin-top: 7px; }
.screen-bottom .screen-channel-list strong { min-width: 0; margin-top: 0; color: #35f28b; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes screenScan {
    0%, 100% { transform: translateY(-120px); opacity: .08; }
    50% { transform: translateY(80vh); opacity: .28; }
}
@keyframes radarSweep {
    to { transform: rotate(360deg); }
}
@media (max-width: 1200px) {
    .purchase-filter-grid.inventory-current-filter-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
    .inventory-current-filter-grid .purchase-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; overflow: auto; border-right: 0; border-bottom: 1px solid rgba(55, 142, 235, .24); }
    .logo { min-width: 110px; }
    .nav-group { flex: 0 0 auto; min-width: 142px; margin: 0; }
    .nav-group-title { padding: 0 8px; white-space: nowrap; }
    .sidebar .layui-btn { min-width: 124px; }
    .sidebar button { text-align: left; }
    .sidebar .nav-icon { margin-right: 7px; }
    .page-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell:not(.screening) .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-flow-panel { grid-template-columns: 1fr; }
    .app-shell:not(.screening) .dashboard-flow-panel { grid-template-columns: 1fr; }
    .workflow-actions { justify-content: flex-start; max-width: none; }
    .module-guide { align-items: flex-start; flex-direction: column; }
    .module-steps { justify-content: flex-start; }
    .profit-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profit-breakdown-grid .breakdown-card.final { grid-column: 1 / -1; }
    .profit-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .batch-profit-detail-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .collection-accounting-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)) auto; }
    .collection-accounting-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-report-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .daily-schedule-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .daily-schedule-filter-actions { justify-content: flex-end; }
    .form-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .big-screen { min-height: auto; overflow: auto; grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
    .screen-top { grid-template-columns: 120px 1fr; }
    .screen-clock { grid-column: 1 / -1; justify-self: center; }
    .screen-left, .screen-right { grid-row: auto; }
    .screen-map { height: 58vh; min-height: 420px; }
    .screen-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .main { padding: 14px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .kpi-row, .form-grid, .upload-grid { grid-template-columns: 1fr; }
    .user-editor .form-grid { grid-template-columns: 1fr; gap: 13px; }
    .user-password-setting { grid-template-columns: 1fr; gap: 10px; }
    .purchase-history-import-card { align-items: stretch; flex-direction: column; gap: 14px; padding: 15px; }
    .purchase-history-import-button { width: 100%; min-height: 44px; }
    .data-operation-section { padding: 14px; }
    .data-operation-section-head, .data-migration-preview-head, .data-migration-history-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .data-operation-section-head > .layui-btn, .data-migration-actions, .data-migration-actions .layui-btn { width: 100%; }
    .data-migration-actions { align-items: stretch; flex-direction: column; }
    .data-migration-safety-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .data-migration-preview dl { grid-template-columns: 1fr 1fr; }
    .data-migration-confirm-actions { align-items: stretch; flex-direction: column-reverse; }
    .data-migration-confirm-actions .layui-btn { width: 100%; margin: 0; }
    .data-migration-history .data-wrap { overflow-x: auto; }
    .data-migration-history table { min-width: 760px; }
    .daily-schedule-filter-grid, .daily-schedule-summary { grid-template-columns: 1fr; }
    .daily-schedule-toolbar-actions { width: 100%; margin-left: 0; }
    .daily-schedule-toolbar-actions .layui-btn { width: 100%; margin: 0; }
    .daily-schedule-filter-actions { align-items: stretch; flex-direction: column; }
    .daily-schedule-filter-actions .layui-btn { width: 100%; margin: 0; }
    .daily-schedule-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .daily-schedule-tabs button { min-width: 0; padding: 0 8px; }
    .app-shell:not(.screening) .kpi-row { grid-template-columns: 1fr; }
    .workflow-status { grid-template-columns: 1fr; }
    .workflow-actions { align-items: stretch; flex-direction: column; }
    .chart { height: 360px; }
    .kpi { min-height: 66px; padding-left: 68px; }
    .kpi strong { font-size: 16px; }
    .map-panel, .rank-panel, .dashboard-warning-panel { height: auto; min-height: auto; }
    .rank-tabs, .rank-card { min-width: 320px; }
    .table-toolbar, .toolbar-actions { align-items: stretch; flex-direction: column; }
    .toolbar-actions { min-width: 0; }
    .toolbar-actions input { min-width: 0; }
    .promotion-split-grid { grid-template-columns: 1fr; }
    .purchase-filter-grid, .batch-filter-grid, .profit-filter-grid, .collection-accounting-filter-grid, .inventory-report-filter-grid, .product-mapping-filter-grid, .inventory-report-dashboard { grid-template-columns: 1fr; min-width: 0; width: 100%; }
    .toolbar-actions.product-mapping-actions { width: 100%; margin-left: 0; align-items: flex-end; }
    .toolbar-actions.in-transit-export-actions { width: 100%; margin-left: 0; align-items: flex-end; }
    .toolbar-actions.batch-profit-detail-toggle-actions { width: 100%; margin-left: 0; align-items: flex-end; }
    .toolbar-actions.batch-profit-detail-toggle-actions .layui-btn { width: auto; min-width: 128px; }
    .inventory-chart-wide { grid-column: auto; }
    .inventory-chart { height: 300px; }
    .inventory-chart-trend, .inventory-chart-heatmap { height: 340px; }
    .inventory-chart-head { align-items: flex-start; flex-direction: column; gap: 3px; }
    .batch-filter-grid .purchase-filter-actions { grid-column: auto; }
    .purchase-filter-actions { align-items: stretch; flex-direction: column; }
    .table-pagination, .pagination-actions { align-items: stretch; flex-direction: column; }
    .pagination-actions select { width: 100%; }
    .page-count { min-width: 0; }
    .admin-table .sticky-action-column { min-width: 92px; padding-left: 7px; padding-right: 7px; }
    .admin-table .table-actions { align-items: stretch; flex-direction: column; gap: 4px; }
    .admin-table .table-actions .layui-btn { width: 100%; margin: 0; }
    .profit-summary-grid { grid-template-columns: 1fr; }
    .purchase-document-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchase-document-direct-toolbar { align-items: stretch; flex-direction: column; }
    .purchase-document-direct-filters { justify-content: flex-start; }
    .purchase-document-supplier-summary-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .collection-accounting-summary-grid { grid-template-columns: 1fr; }
    .profit-breakdown-grid { grid-template-columns: 1fr; }
    .profit-breakdown-grid .breakdown-card.final { grid-column: auto; }
    .license-status-bar { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
    .license-info-grid { grid-template-columns: 1fr; }
    .license-instance { grid-column: auto; }
    .license-activate-row { grid-template-columns: 1fr; align-items: stretch; }
    .recharge-qr-card { align-items: flex-start; flex-direction: column; }
    .recharge-qr-card img { width: min(220px, 100%); height: auto; }
    .recharge-confirm-box { align-items: stretch; flex-direction: column; }
    .recharge-confirm-actions { align-items: stretch; flex-direction: column; width: 100%; }
    .recharge-confirm-box .layui-btn { width: 100%; }
    .fifo-rebuild-result-head { flex-direction: column; }
    .fifo-rebuild-meta { grid-template-columns: 1fr; }
    .big-screen { padding: 10px; gap: 10px; }
    .screen-top { grid-template-columns: 1fr; text-align: center; }
    .screen-title strong { font-size: 22px; }
    .screen-back, .screen-clock { justify-self: stretch; }
    .screen-metric-grid, .screen-bottom { grid-template-columns: 1fr; }
    .screen-card.primary-card strong { font-size: 32px; }
    .screen-map { min-height: 360px; }
}

.warehouse-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 14px;
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #d9e1ea;
    background: #f8fafc;
}
.warehouse-scope-grid label,
.permission-options label,
.permission-group-title {
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.5;
    color: #2f3b48;
}
.warehouse-scope-grid input[type="checkbox"],
.permission-options input[type="checkbox"],
.permission-group-title input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: #16b8a5;
}
.role-editor .form-grid label,
.stocktake-editor .form-grid label,
.stocktake-remark { color: #2f3b48; }
.permission-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.permission-group {
    border: 1px solid #d9e1ea;
    background: #fff;
}
.permission-group-title {
    padding: 10px 12px;
    border-bottom: 1px solid #e5eaf0;
    background: #f6f8fa;
    font-weight: 700;
}
.permission-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
    padding: 12px;
}
.stocktake-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-left: 4px solid #1fbca8;
    background: #f2faf8;
    font-weight: 700;
}
.stocktake-remark {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.stocktake-table select,
.stocktake-table input {
    width: 100%;
    min-width: 105px;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid #d5dbe3;
    padding: 0 7px;
    background: #fff;
}
.stocktake-table th,
.stocktake-table td { white-space: nowrap; }

.cloud-loss-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin: 4px 0 18px;
    padding: 16px;
    border: 1px solid #dce6ed;
    border-radius: 6px;
    background: #f7fafc;
}
.cloud-loss-filter-grid label { display: grid; gap: 6px; color: #42566c; font-size: 13px; }
.cloud-loss-filter-grid input,
.cloud-loss-filter-grid select { box-sizing: border-box; width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #cfdbe5; border-radius: 4px; background: #fff; }
.cloud-loss-filter-grid input:focus,
.cloud-loss-filter-grid select:focus { border-color: #16baaa; outline: 0; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.cloud-loss-filter-actions { display: flex; align-items: end; gap: 8px; }
.cloud-staff-create-actions { flex-wrap: nowrap; }
.cloud-staff-create-actions select {
    box-sizing: border-box;
    width: 220px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #cfdbe5;
    border-radius: 4px;
    background: #fff;
}
.cloud-staff-create-actions select:focus { border-color: #16baaa; outline: 0; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.cloud-loss-table-wrap { width: 100%; overflow-x: auto; }
.cloud-loss-table { min-width: 1640px; }
.cloud-staff-table { min-width: 980px; }
.cloud-loss-table th,
.cloud-loss-table td { white-space: nowrap; vertical-align: middle; }
.cloud-loss-table th { color: #263b52; background: #f2f6f9; }
.cloud-loss-long-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.cloud-loss-actions { min-width: 170px; }
.cloud-loss-table .cloud-loss-actions .layui-btn {
    display: inline-flex;
    width: 52px;
    height: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
}
.cloud-loss-actions .layui-btn + .layui-btn { margin-left: 5px; }
.cloud-staff-table .cloud-loss-actions { min-width: 244px; }
.cloud-staff-table .cloud-loss-actions .layui-btn {
    display: inline-flex;
    width: 74px;
    height: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    vertical-align: middle;
}
.cloud-staff-table .cloud-loss-actions .layui-btn.cloud-qr-action {
    width: auto;
    min-width: 112px;
    padding: 0 12px;
    white-space: nowrap;
}
.cloud-staff-table .cloud-loss-actions .layui-btn + .layui-btn { margin-left: 7px; }
.cloud-staff-bound-at { margin-top: 5px; color: #718096; font-size: 12px; }
.cloud-loss-source { margin-top: 4px; color: #718096; font-size: 12px; }
.cloud-loss-empty { padding: 34px 10px !important; color: #78899b; text-align: center !important; }
.table-link-button { min-height: 32px; padding: 0 8px; border: 0; background: transparent; color: #0d7d70; cursor: pointer; text-decoration: underline; }
.cloud-status { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.cloud-status--pending { color: #875800; background: #fff2cf; }
.cloud-status--approved { color: #08664e; background: #dff6ec; }
.cloud-status--rejected { color: #a52b26; background: #ffe6e4; }
.cloud-status--revoked { color: #59697a; background: #e9eef3; }
.cloud-staff-editor { margin-bottom: 20px; padding: 18px; border: 1px solid #bcded8; border-left: 4px solid #16baaa; border-radius: 4px; background: #f5fbfa; }
.cloud-staff-editor__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.cloud-staff-editor__head strong { color: #17334c; font-size: 18px; }
.cloud-staff-editor__head span { color: #65788b; font-size: 13px; }

@media (max-width: 900px) {
    .permission-groups { grid-template-columns: 1fr; }
    .permission-options { grid-template-columns: 1fr; }
    .cloud-loss-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .cloud-loss-filter-grid { grid-template-columns: 1fr; }
    .cloud-loss-filter-actions { align-items: stretch; }
    .cloud-loss-filter-actions .layui-btn { flex: 1; }
    .cloud-staff-create-actions { width: 100%; }
    .cloud-staff-create-actions select { width: 100%; }
    .cloud-staff-editor__head { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .big-screen::after { animation: none; }
    .screen-map-frame > .screen-map::after { animation: none; }
    .screen-back { transition: none; }
}
.show-page { overflow: hidden; }
.dialog-form { display: grid; gap: 14px; padding: 18px; }
.dialog-form .dialog-note { margin: 0; color: #333; line-height: 1.6; }
.dialog-form .required-mark { color: #e5484d; font-style: normal; }
.dialog-form label { display: grid; gap: 7px; color: #102033; font-size: 14px; }
.dialog-form input,
.dialog-form select,
.dialog-form textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 0 10px; background: #fff; color: #102033; border: 1px solid #d2d2d2; border-radius: 2px; }
.dialog-form textarea { min-height: 82px; padding-top: 9px; padding-bottom: 9px; resize: vertical; }
.dialog-form input:focus,
.dialog-form select:focus,
.dialog-form textarea:focus { border-color: #16baaa; outline: none; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.import-mapping-dialog { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; color: #172235; background: #f7f9fc; }
.import-mapping-note, .import-mapping-warning { margin: 0; line-height: 1.55; }
.import-mapping-note { color: #43536a; }
.import-mapping-warning { padding: 8px 10px; border-left: 3px solid #ffb800; background: #fff7df; color: #7a4d00; }
.import-mapping-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid #d8e0ea; background: #fff; }
.import-mapping-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
.import-mapping-table th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; border-bottom: 1px solid #ccd7e4; background: #edf3f8; color: #1c334e; font-size: 14px; text-align: left; }
.import-mapping-table th:nth-child(1), .import-mapping-table th:nth-child(3) { width: 28%; }
.import-mapping-table th:nth-child(2), .import-mapping-table th:nth-child(4) { width: 22%; }
.import-mapping-table td { padding: 10px 12px; border-bottom: 1px solid #e7edf3; vertical-align: middle; }
.import-mapping-table tbody tr:hover td { background: #fff9d9; }
.import-mapping-table select { width: 100%; min-height: 38px; padding: 0 30px 0 9px; border: 1px solid #c8d3df; border-radius: 3px; background: #fff; color: #172235; }
.import-mapping-table select:focus { border-color: #16baaa; outline: none; box-shadow: 0 0 0 3px rgba(22, 186, 170, .1); }
.import-mapping-source strong, .import-mapping-source small { display: block; }
.import-mapping-source strong { color: #182b42; font-size: 14px; line-height: 1.45; white-space: normal; word-break: break-word; }
.import-mapping-source small { margin-top: 4px; color: #73839a; font-size: 12px; line-height: 1.4; white-space: normal; word-break: break-all; }
.arrival-dialog-form { gap: 12px; padding: 16px 18px 10px; }
.show-page .big-screen { height: 100vh; min-height: 0; overflow: hidden; }
.show-page .screen-left, .show-page .screen-right { min-height: 0; overflow: hidden; }
.show-page .screen-warning-panel { min-height: 0; overflow: hidden; }
.show-page .screen-warning-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (max-width: 1100px) {
    html:has(.show-page), body.show-page { max-width: 100%; overflow-x: hidden; }
    .show-page { min-height: 100vh; max-width: 100%; overflow-x: hidden; overflow-y: auto; }
    .show-page .big-screen { box-sizing: border-box; width: 100%; max-width: 100%; height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: visible; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .show-page .screen-left, .show-page .screen-right { min-height: 0; overflow: visible; }
    .show-page .screen-left, .show-page .screen-right, .show-page .screen-card, .show-page .screen-side-panel, .show-page .screen-bottom > * { min-width: 0; max-width: 100%; }
    .show-page .screen-card::before { right: 0; }
    .show-page .screen-rank-list { max-height: 360px; }
    .show-page .screen-warning-panel { min-height: 220px; overflow: hidden; }
    .show-page .screen-map-frame { min-height: 460px; }
    .show-page .screen-map { height: 58vh; min-height: 460px; }
}
@media (max-width: 640px) {
    .show-page .big-screen { padding: 10px; gap: 10px; }
    .show-page .screen-top { min-height: auto; padding: 12px; gap: 8px; }
    .show-page .screen-brand { font-size: 13px; }
    .show-page .screen-title span { font-size: 10px; }
    .show-page .screen-title strong { font-size: 20px; line-height: 1.18; white-space: normal; }
    .show-page .screen-clock { font-size: 13px; }
    .show-page .screen-card { min-height: 88px; padding: 13px; }
    .show-page .screen-card strong { font-size: 26px; }
    .show-page .screen-card.primary-card { min-height: 112px; }
    .show-page .screen-card.primary-card strong { font-size: 31px; }
    .show-page .screen-metric-grid { gap: 10px; }
    .show-page .screen-side-panel { padding: 12px; }
    .show-page .screen-rank-list { max-height: none; overflow: visible; padding-right: 0; }
    .show-page .screen-warning-panel { min-height: 200px; max-height: none; overflow: visible; }
    .show-page .screen-warning-list { overflow: visible; padding-right: 0; }
    .show-page .screen-map-frame { min-height: 390px; }
    .show-page .screen-map { height: 390px; min-height: 390px; }
    .show-page .screen-bottom { gap: 10px; }
    .show-page .screen-bottom article { padding: 12px; }
    .show-page .screen-bottom strong { font-size: 21px; }
    .show-page .screen-bottom .screen-channel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.platform-support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 0;
  padding: 13px 16px;
  color: #5b3d08;
  border: 1px solid #f0c86f;
  border-radius: 10px;
  background: #fff5d9;
  box-shadow: 0 5px 16px rgba(129, 88, 13, .08);
}

.platform-support-banner div { display: grid; gap: 3px; }
.platform-support-banner strong { font-size: 15px; }
.platform-support-banner span { color: #81611f; font-size: 12px; }
.platform-support-banner button { color: #fff; background: #a66c09; }

.renewal-only-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid #f4d6a3;
  border-radius: 12px;
  color: #7a4b00;
  background: #fff8e8;
  box-shadow: 0 8px 22px rgba(123, 79, 10, .08);
}
.renewal-only-banner div { display: grid; gap: 4px; min-width: 0; }
.renewal-only-banner strong { font-size: 15px; }
.renewal-only-banner span { font-size: 13px; line-height: 1.6; }
.renewal-only-banner button { flex: 0 0 auto; color: #fff; background: #b97812; }

@media (max-width: 760px) {
  .platform-support-banner { align-items: flex-start; flex-direction: column; }
  .merchant-notice-card { flex-direction: column; }
  .merchant-ad-grid { grid-template-columns: 1fr; }
  .selected-plan-summary { align-items: flex-start; flex-direction: column; }
  .license-activate-row.plan-purchase-row { grid-template-columns: 1fr; }
}

/* Merchant control-center visual system */
:root {
  --merchant-navy: #0b1f33;
  --merchant-navy-deep: #061522;
  --merchant-cyan: #19b8a8;
  --merchant-cyan-dark: #0e8d82;
  --merchant-ink: #172638;
  --merchant-muted: #6c7b8b;
  --merchant-line: #dce4ec;
  --merchant-canvas: #f3f6f9;
  --merchant-surface: #fff;
  --merchant-danger: #c43b4d;
  --merchant-shadow: 0 12px 36px rgba(20, 39, 61, .09);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, a, input, select, textarea { touch-action: manipulation; }

.login-page {
  padding: 32px;
  background: radial-gradient(circle at 75% 18%, rgba(25,184,168,.22), transparent 34%), linear-gradient(135deg, #061525, #0d2944 58%, #113b55);
}
.login-panel {
  width: min(440px, 100%);
  padding: 38px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: rgba(7,24,40,.78);
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}
.brand-mark { margin: 0; color: #6ce2d4; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.login-panel h1 { margin: 12px 0 6px; color: #fff; font-size: 29px; }
.login-panel .login-subtitle { margin: 0 0 25px; color: #b7c8d8; line-height: 1.65; }
.login-panel label { margin: 13px 0 7px; color: #dce8f2; font-weight: 650; }
.login-panel label small { color: #91a9bc; font-weight: 400; }
.login-panel input {
  min-height: 45px;
  padding: 0 12px;
  color: var(--merchant-ink);
  border: 1px solid #cfd9e3;
  border-radius: 9px;
  background: #fff;
}
.login-panel input:focus { border-color: var(--merchant-cyan-dark); box-shadow: 0 0 0 3px rgba(25,184,168,.13); }
.login-captcha-row { grid-template-columns: minmax(0, 1fr) 178px; gap: 10px; }
.login-captcha-image { width: 178px; height: 46px; border: 0; border-radius: 9px; background: #fff; }
.login-captcha-image .layui-icon { color: #fff; background: var(--merchant-cyan-dark); }
.login-panel .primary.wide {
  min-height: 45px;
  margin-top: 17px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--merchant-cyan), var(--merchant-cyan-dark));
  box-shadow: 0 7px 18px rgba(14,141,130,.2);
  font-weight: 700;
}
.platform-login-link { margin-top: 16px; color: #6ce2d4; text-align: center; }
.install-link { color: #8fa5b8; text-align: center; }
.form-error { color: #ffb8c0; }

.app-shell:not(.screening) {
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
  color: var(--merchant-ink);
  background: radial-gradient(circle at 100% 0, rgba(25,184,168,.06), transparent 28%), var(--merchant-canvas);
}
.app-shell:not(.screening) .sidebar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  width: auto;
  height: 100vh;
  padding: 24px 18px;
  border: 0;
  background: radial-gradient(circle at 30% 0, rgba(67,216,198,.16), transparent 31%), linear-gradient(180deg, #0b2238, var(--merchant-navy-deep));
  box-shadow: 14px 0 36px rgba(7,23,38,.08);
}
.app-shell:not(.screening) .merchant-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 4px 9px 31px;
  border: 0;
  color: #fff;
}
.merchant-logo b {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #072033;
  border-radius: 13px;
  background: linear-gradient(135deg, #69e6d7, #35c4b3);
  box-shadow: 0 10px 24px rgba(49,201,182,.23);
  font-size: 16px;
}
.merchant-logo span { display: grid; min-width: 0; gap: 2px; }
.merchant-logo strong { overflow: hidden; color: #fff; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.merchant-logo small { overflow: hidden; color: #85a2b7; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.merchant-nav { display: grid; gap: 7px; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.app-shell:not(.screening) .merchant-nav .layui-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  height: auto;
  margin: 0;
  padding: 11px 14px;
  color: #afc2d2;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: color .18s ease, background-color .18s ease;
}
.app-shell:not(.screening) .merchant-nav .layui-btn:hover { color: #fff; background: rgba(255,255,255,.065); }
.app-shell:not(.screening) .merchant-nav .layui-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(55,204,187,.21), rgba(255,255,255,.08));
  box-shadow: inset 0 0 0 1px rgba(111,230,215,.14);
}
.app-shell:not(.screening) .merchant-nav .nav-icon { flex: 0 0 21px; width: 21px; margin: 0; color: #7f9cb1; font-size: 20px; }
.app-shell:not(.screening) .merchant-nav .layui-btn:hover .nav-icon,
.app-shell:not(.screening) .merchant-nav .layui-btn.active .nav-icon { color: #60ddce; }
.app-shell:not(.screening) .main { min-width: 0; padding: 0 38px 52px; background: transparent; }
.app-shell:not(.screening) .topbar {
  min-height: 104px;
  margin: 0 0 22px;
  padding: 0;
  border-bottom: 1px solid var(--merchant-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.app-shell:not(.screening) .topbar h1 { margin: 3px 0 0; color: var(--merchant-ink); font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.app-shell:not(.screening) .topbar p { color: var(--merchant-muted); }
.app-shell:not(.screening) .user-pill { padding: 7px 12px; color: #247056; border: 0; border-radius: 999px; background: #dff7ec; font-size: 12px; font-weight: 750; }
.app-shell:not(.screening) .topbar-logout { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.app-shell:not(.screening) .topbar-logout span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell:not(.screening) .topbar-logout i { font-size: 16px; }
.app-shell:not(.screening) .topbar-logout strong { font-weight: 800; }
.app-shell:not(.screening) .topbar-logout:hover { color: #a72d3e; background: #ffe4e7; box-shadow: 0 6px 18px rgba(167,45,62,.12); }
.module-tabs { padding: 10px 12px; border-color: #e1e8ee; border-radius: 14px; box-shadow: var(--merchant-shadow); }
.module-tabs .layui-btn { min-height: 42px; border-radius: 9px; }
.module-guide, .notice-panel { border-color: #e1e8ee; border-left-color: var(--merchant-cyan); border-radius: 14px; box-shadow: 0 8px 24px rgba(20,39,61,.06); }
.workbench .panel, .workbench .edit-card {
  border: 1px solid #e1e8ee;
  border-radius: 17px;
  background: var(--merchant-surface);
  box-shadow: 0 14px 40px rgba(20,39,61,.075);
}
.workbench .panel { padding: 22px; }
.workbench .edit-card { overflow: hidden; }
.workbench .edit-card-head { padding: 0 18px; border-bottom-color: #edf1f5; }
.workbench .table-toolbar { border-color: #e5ebf0; border-radius: 12px; background: #f7f9fb; }
.workbench input:not([type=file]), .workbench select, .workbench textarea, .toolbar-actions input { min-height: 42px; border-color: #cfd9e3; border-radius: 9px; }
.primary.layui-btn, .workbench .primary.layui-btn { border-color: var(--merchant-cyan-dark); border-radius: 9px; background: linear-gradient(135deg, var(--merchant-cyan), var(--merchant-cyan-dark)); box-shadow: 0 7px 18px rgba(14,141,130,.16); }
.workbench .layui-table th { color: #526273; background: #f7f9fb; }
.workbench .layui-table td { border-bottom-color: #edf1f5; }
.workbench .layui-table tbody tr:hover td { background: #f1fbf9; }
.merchant-notice-card { color: #60430b; border-color: #f0d79a; border-left-color: #d9a62e; border-radius: 14px; background: #fffaf0; box-shadow: 0 8px 24px rgba(129,88,13,.06); }
.merchant-notice-card strong { color: #805a0e; }
.merchant-notice-card p { color: #5f6670; }
.merchant-notice-card a { color: var(--merchant-cyan-dark); }
.merchant-ad-card { border-color: #dce7e5; border-radius: 16px; background: #fff; box-shadow: var(--merchant-shadow); }
.merchant-ad-card strong { color: var(--merchant-ink); }
.merchant-ad-card p { color: var(--merchant-muted); }
.app-shell:not(.screening) .kpi {
  min-height: 122px;
  padding: 22px;
  border: 1px solid #e3e9ef;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #fbfdfd);
  box-shadow: var(--merchant-shadow);
}
.app-shell:not(.screening) .kpi::before { display: none; }
.app-shell:not(.screening) .kpi i { left: auto; right: 18px; top: 20px; width: 34px; height: 34px; color: #0d776d; border: 0; background: #dcf7ec; box-shadow: none; transform: none; }
.app-shell:not(.screening) .kpi.profit i { color: #94620e; border: 0; background: #fff0d0; }
.app-shell:not(.screening) .kpi span { color: var(--merchant-muted); }
.app-shell:not(.screening) .kpi strong { margin-top: 12px; color: var(--merchant-ink); font-size: 22px; }

.recharge-records-table-wrap, .dashboard-transport-wrap, .admin-table-wrap, .table-scroll, .table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

@media (max-width: 1100px) {
  .app-shell:not(.screening) { grid-template-columns: 1fr; }
  .app-shell:not(.screening) .sidebar { position: static; width: 100%; height: auto; padding: 16px; overflow: visible; }
  .app-shell:not(.screening) .merchant-logo { padding: 2px 4px 15px; }
  .merchant-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .app-shell:not(.screening) .merchant-nav .layui-btn { min-width: 0; min-height: 46px; }
  .app-shell:not(.screening) .main { padding: 0 22px 40px; }
  .app-shell:not(.screening) .topbar { min-height: 92px; }
}

@media (max-width: 700px) {
  .renewal-only-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 13px;
  }
  .renewal-only-banner button { width: 100%; min-height: 42px; }
  body { overscroll-behavior-y: contain; }
  .login-page { align-items: start; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); overflow-y: auto; }
  .login-panel { margin: auto 0; padding: 25px 22px; border-radius: 17px; backdrop-filter: blur(12px); }
  .login-panel h1 { font-size: 25px; }
  .login-panel .login-subtitle { margin-bottom: 19px; }
  .login-panel input, .login-panel .primary.wide { min-height: 48px; }
  .login-captcha-row { grid-template-columns: minmax(0, 1fr) 160px; }
  .login-captcha-image { width: 160px; height: 48px; }
  .app-shell:not(.screening) .sidebar { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
  .merchant-logo b { flex-basis: 38px; width: 38px; height: 38px; border-radius: 11px; }
  .merchant-logo strong { font-size: 17px; }
  .merchant-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .app-shell:not(.screening) .merchant-nav .layui-btn { min-height: 48px; padding: 9px 11px; border-radius: 10px; }
  .app-shell:not(.screening) .merchant-nav .nav-icon { flex-basis: 20px; width: 20px; font-size: 18px; }
  .app-shell:not(.screening) .main { padding: 0 14px calc(30px + env(safe-area-inset-bottom)); }
  .app-shell:not(.screening) .topbar { align-items: flex-start; flex-direction: column; min-height: 0; gap: 12px; margin-bottom: 16px; padding: 20px 0 16px; }
  .app-shell:not(.screening) .topbar h1 { font-size: 23px; }
  .app-shell:not(.screening) .user-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell:not(.screening) .topbar-logout { width: 100%; min-height: 48px; justify-content: center; }
  .module-tabs { flex-wrap: nowrap; margin: 0 0 14px; padding: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .module-tabs::-webkit-scrollbar { display: none; }
  .module-tabs .layui-btn, .module-tabs .layui-btn.align-end { flex: 0 0 auto; min-height: 44px; margin-left: 0; padding: 0 14px; font-size: 14px; }
  .module-guide, .notice-panel { padding: 13px 14px; border-radius: 12px; }
  .workbench .panel { padding: 16px; border-radius: 14px; }
  .workbench .edit-card { border-radius: 14px; }
  .workbench input:not([type=file]), .workbench select, .workbench textarea, .toolbar-actions input { min-height: 46px; font-size: 16px; }
  .workbench .layui-btn, .toolbar-actions .layui-btn { min-height: 44px; }
  .app-shell:not(.screening) .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .app-shell:not(.screening) .kpi { min-height: 108px; padding: 16px; border-radius: 14px; }
  .app-shell:not(.screening) .kpi i { right: 12px; top: 13px; width: 30px; height: 30px; }
  .app-shell:not(.screening) .kpi strong { max-width: 100%; font-size: 17px; }
  .layui-layer { max-width: calc(100vw - 24px) !important; }
  .layui-layer-btn a { min-height: 40px; padding: 0 16px; line-height: 40px; }
}

@media (max-width: 380px) {
  .merchant-nav { grid-template-columns: 1fr; }
  .app-shell:not(.screening) .kpi-row { grid-template-columns: 1fr; }
  .login-captcha-row { grid-template-columns: minmax(0, 1fr); }
  .login-captcha-image { width: 100%; height: 48px; }
}

@media (hover: none) {
  .app-shell:not(.screening) .merchant-nav .layui-btn:hover { transform: none; }
}

/* Merchant UI refinement v2: compact, quiet and consistent */
.login-page { background: linear-gradient(145deg, #071827, #0c2b42); }
.login-panel { width: min(420px, 100%); padding: 32px; border-radius: 16px; background: rgba(8,29,45,.96); box-shadow: 0 20px 55px rgba(0,0,0,.24); backdrop-filter: none; }
.login-panel h1 { font-size: 27px; }
.login-panel .login-subtitle { margin-bottom: 20px; }
.login-panel .primary.wide { border-radius: 8px; background: #159f91; box-shadow: none; }

.app-shell:not(.screening) { grid-template-columns: 220px minmax(0, 1fr); background: #f4f6f8; }
.app-shell:not(.screening) .sidebar {
  padding: 18px 12px;
  background: #0b2133;
  box-shadow: 6px 0 20px rgba(9,31,48,.06);
}
.app-shell:not(.screening) .merchant-logo { gap: 10px; padding: 0 8px 20px; }
.merchant-logo b { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; background: #42c8ba; box-shadow: none; font-size: 14px; }
.merchant-logo strong { font-size: 16px; }
.merchant-logo small { font-size: 10px; }
.merchant-nav { gap: 4px; }
.app-shell:not(.screening) .merchant-nav .layui-btn {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #aebfcd;
  transition: color .15s ease, background-color .15s ease;
}
.app-shell:not(.screening) .merchant-nav .layui-btn:hover { background: rgba(255,255,255,.055); }
.app-shell:not(.screening) .merchant-nav .layui-btn.active { background: rgba(37,190,174,.16); box-shadow: inset 3px 0 0 #3cc7b8; }
.app-shell:not(.screening) .merchant-nav .nav-icon { flex-basis: 19px; width: 19px; font-size: 18px; }

.app-shell:not(.screening) .main { padding: 0 26px 38px; }
.app-shell:not(.screening) .topbar { min-height: 80px; margin-bottom: 18px; }
.app-shell:not(.screening) .topbar h1 { font-size: 23px; letter-spacing: 0; }
.app-shell:not(.screening) .topbar p { margin-top: 4px; font-size: 13px; }
.app-shell:not(.screening) .topbar-logout { min-height: 38px; padding: 6px 11px; border-radius: 8px; background: #e5f5f1; box-shadow: none; }
.app-shell:not(.screening) .topbar-logout:hover { box-shadow: none; }

.module-tabs { margin-bottom: 14px; padding: 7px; border-color: #e3e8ed; border-radius: 10px; box-shadow: none; }
.module-tabs .layui-btn { min-height: 38px; padding: 0 14px; border-radius: 7px; font-size: 14px; }
.module-guide, .notice-panel { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; box-shadow: none; }
.page-grid, .dashboard-primary-column, .kpi-row, .merchant-home-content { gap: 12px; }

.workbench .panel, .workbench .edit-card {
  border-color: #e2e7ec;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(22,38,55,.045);
}
.workbench .panel { padding: 18px; }
.workbench .edit-card-head { min-height: 48px; padding: 0 16px; }
.workbench .layui-card-body { padding: 16px; }
.workbench .table-toolbar { padding: 10px 12px; border-radius: 9px; background: #f7f8fa; }
.workbench input:not([type=file]), .workbench select, .workbench textarea, .toolbar-actions input { min-height: 40px; border-radius: 7px; }
.workbench .layui-table th, .workbench .layui-table td { padding-top: 11px; padding-bottom: 11px; }
.primary.layui-btn, .workbench .primary.layui-btn { border-color: #159f91; border-radius: 7px; background: #159f91; box-shadow: none; }

.merchant-notice-card { padding: 12px 14px; border-radius: 10px; box-shadow: none; }
.merchant-ad-card { border-radius: 12px; box-shadow: 0 4px 16px rgba(22,38,55,.05); }
.app-shell:not(.screening) .kpi-row { gap: 10px; }
.app-shell:not(.screening) .kpi {
  min-height: 98px;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(22,38,55,.045);
}
.app-shell:not(.screening) .kpi i { right: 13px; top: 13px; width: 30px; height: 30px; }
.app-shell:not(.screening) .kpi strong { margin-top: 9px; font-size: 19px; }
.dashboard-panel, .dashboard-flow-panel { border-radius: 10px; box-shadow: 0 4px 16px rgba(8,27,48,.11); }
.dashboard-panel::after { display: none; }
.license-info-grid > div { min-height: 66px; }
.recharge-records-block { margin-top: 18px; }

@media (max-width: 900px) {
  .app-shell:not(.screening) { grid-template-columns: 1fr; }
  .app-shell:not(.screening) .sidebar { position: static; height: auto; padding: 12px; }
  .app-shell:not(.screening) .merchant-logo { padding: 0 4px 11px; }
  .merchant-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .merchant-nav::-webkit-scrollbar { display: none; }
  .app-shell:not(.screening) .merchant-nav .layui-btn { flex: 0 0 auto; width: auto; min-width: 112px; min-height: 42px; }
  .app-shell:not(.screening) .merchant-nav .layui-btn.active { box-shadow: inset 0 -3px 0 #3cc7b8; }
  .app-shell:not(.screening) .main { padding: 0 16px 28px; }
  .app-shell:not(.screening) .topbar { min-height: 72px; }
}

@media (max-width: 600px) {
  .login-page { padding: 12px; }
  .login-panel { padding: 24px 20px; border-radius: 14px; }
  .app-shell:not(.screening) .sidebar { padding: 10px; }
  .app-shell:not(.screening) .merchant-logo { padding-bottom: 9px; }
  .app-shell:not(.screening) .merchant-nav .layui-btn { min-width: 104px; min-height: 44px; }
  .app-shell:not(.screening) .main { padding: 0 12px 24px; }
  .app-shell:not(.screening) .topbar { align-items: flex-start; flex-direction: row; min-height: 0; gap: 10px; padding: 15px 0 13px; }
  .app-shell:not(.screening) .topbar > div { min-width: 0; flex: 1; }
  .app-shell:not(.screening) .topbar h1 { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell:not(.screening) .topbar p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell:not(.screening) .topbar-logout { flex: 0 0 auto; width: auto; min-height: 40px; padding: 6px 10px; }
  .app-shell:not(.screening) .topbar-logout span { display: none; }
  .module-tabs { margin-bottom: 12px; }
  .module-guide, .notice-panel { padding: 11px 12px; }
  .workbench .panel { padding: 14px; border-radius: 10px; }
  .workbench .edit-card { border-radius: 10px; }
  .workbench .table-toolbar { padding: 9px 10px; }
  .app-shell:not(.screening) .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app-shell:not(.screening) .kpi { min-height: 92px; padding: 13px; border-radius: 10px; }
  .app-shell:not(.screening) .kpi i { right: 10px; top: 10px; width: 27px; height: 27px; font-size: 12px; }
  .app-shell:not(.screening) .kpi strong { font-size: 16px; }
}

@media (max-width: 360px) {
  .app-shell:not(.screening) .kpi-row { grid-template-columns: 1fr; }
}

/* Deduction and fine refinement: focused actions and compact entry form */
.promotion-expense-total-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.promotion-expense-total-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #dbe6ec;
  border-left: 4px solid #16baaa;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 49, 67, .06);
}
.promotion-expense-total-card span,
.promotion-expense-total-card small { display: block; }
.promotion-expense-total-card span { color: #667789; font-size: 14px; }
.promotion-expense-total-card strong { display: block; margin-top: 6px; color: #102a43; font-size: 26px; line-height: 1.15; }
.promotion-expense-total-card small { margin-top: 6px; color: #8a99a8; font-size: 12px; }
.promotion-expense-total-card.fine-total-card { border-left-color: #ffb800; }
.promotion-expense-filter-actions {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
  min-width: min(100%, 850px);
}
.promotion-expense-filter-actions > input,
.promotion-expense-filter-actions > select { width: 100%; min-width: 0; }
.deduction-import-result { margin: 0 0 12px; }
.deduction-import-hint { margin: 0 0 14px; color: #667789; font-size: 13px; line-height: 1.6; }
.promotion-split-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.fine-entry-form {
  margin: 2px 0 18px;
  padding: 18px;
  border: 1px solid #dfe7ee;
  border-radius: 10px;
  background: #f8fafb;
}
.fine-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.fine-entry-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.fine-entry-head strong {
  color: #152a3a;
  font-size: 16px;
}
.fine-entry-head span {
  color: #71808d;
  font-size: 13px;
}
.fine-entry-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #e9eef2;
  color: #51616e;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.fine-entry-close:hover { background: #dfe7ec; color: #203746; }
.fine-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.deduction-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fine-entry-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.fine-entry-grid label > span {
  color: #52616d;
  font-size: 13px;
  font-weight: 600;
}
.fine-entry-grid .required-field > span::after {
  content: " *";
  color: #e34d59;
  font-weight: 700;
}
.fine-entry-grid input,
.fine-entry-grid select {
  width: 100%;
  height: 40px;
  border: 1px solid #d6e0e7;
  border-radius: 7px;
  background: #fff;
}
.fine-entry-grid input:focus,
.fine-entry-grid select:focus {
  border-color: #22a79a;
  box-shadow: 0 0 0 3px rgba(34, 167, 154, .1);
}
.fine-reason-field { grid-column: 1 / -1; }
.fine-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e4ebf0;
}
@media (max-width: 900px) {
  .promotion-expense-filter-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0; }
  .promotion-expense-filter-actions > input { grid-column: 1 / -1; }
  .fine-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deduction-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .promotion-expense-filter-actions { grid-template-columns: minmax(0, 1fr); }
  .promotion-expense-filter-actions > input { grid-column: auto; }
  .promotion-expense-filter-actions > .layui-btn { width: 100%; margin: 0; }
  .promotion-expense-total-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .promotion-expense-total-card { padding: 14px 16px; }
  .promotion-expense-total-card strong { font-size: 22px; }
  .fine-entry-form { padding: 14px; }
  .fine-entry-head > div { display: block; }
  .fine-entry-head span { display: block; margin-top: 4px; line-height: 1.5; }
  .fine-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .deduction-entry-grid { grid-template-columns: minmax(0, 1fr); }
  .fine-reason-field { grid-column: auto; }
  .fine-entry-actions > .layui-btn { flex: 1; min-height: 44px; margin: 0; }
}

/* Dashboard refinement: clear KPI hierarchy and focused stock warnings */
.dashboard-screen-refined {
  grid-template-columns: minmax(0, 1fr) minmax(340px, .42fr);
  align-items: stretch;
  gap: 14px;
  overflow: visible;
}
.dashboard-screen-refined > .dashboard-primary-column-refined {
  grid-column: 1;
  min-width: 0;
  grid-template-rows: auto auto minmax(440px, 1fr);
  align-self: stretch;
}
.dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-kpi-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-self: start;
  align-items: start;
}
.dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-transport-panel {
  min-width: 0;
}
.manufacturer-password-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(7, 24, 38, .55); }
.manufacturer-password-dialog { box-sizing: border-box; width: min(440px, 100%); max-height: 90dvh; overflow-y: auto; padding: 24px; border-radius: 12px; background: #fff; box-shadow: 0 16px 50px #07182633; }
.manufacturer-password-dialog h2 { font-size: 18px; margin: 0 0 12px; }
.manufacturer-password-dialog p { color: #64748b; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.manufacturer-password-dialog label { display: grid; gap: 8px; margin: 16px 0; }
.manufacturer-password-dialog input { box-sizing: border-box; width: 100%; height: 42px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 16px; }
.manufacturer-password-error { color: #b91c1c; font-size: 13px; }
.dashboard-replenishment-panel {
  min-width: 0;
  padding: 12px 14px;
}
.dashboard-replenishment-head {
  gap: 12px;
  margin-bottom: 9px;
  padding-bottom: 8px;
}
.dashboard-replenishment-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.dashboard-replenishment-heading > span {
  color: #eaf8ff;
  font-size: 15px;
  font-weight: 800;
}
.dashboard-replenishment-heading > b {
  margin-left: 0;
  color: #6fd8f0;
  font-size: 11px;
  line-height: 1.35;
}
.dashboard-replenishment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.dashboard-replenishment-actions > b {
  color: #51e3ff;
  font-size: 12px;
  white-space: nowrap;
}
.dashboard-replenishment-days {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #c6edff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.dashboard-replenishment-days input {
  width: 58px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid rgba(81, 227, 255, .52);
  border-radius: 6px;
  outline: 0;
  color: #fff;
  background: rgba(7, 29, 54, .86);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.dashboard-replenishment-days input:focus {
  border-color: #51e3ff;
  box-shadow: 0 0 0 3px rgba(81, 227, 255, .14);
}
.dashboard-replenishment-days em {
  color: #8eb8d2;
  font-style: normal;
}
.dashboard-replenishment-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-height: 132px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: rgba(81, 227, 255, .62) rgba(14, 46, 85, .42);
  scrollbar-width: thin;
}
.dashboard-replenishment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(53, 130, 214, .38);
  border-left: 3px solid #32d7ed;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(13, 57, 103, .78), rgba(7, 24, 50, .72));
}
.dashboard-replenishment-scope {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.dashboard-replenishment-scope strong,
.dashboard-replenishment-scope small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-replenishment-scope strong {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.dashboard-replenishment-scope small {
  color: #a8d1e3;
  font-size: 11px;
}
.dashboard-replenishment-coverage {
  display: grid;
  grid-auto-flow: column;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-height: 32px;
  padding: 5px;
  border-radius: 5px;
  color: #51e3ff;
  background: rgba(27, 83, 124, .58);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.dashboard-replenishment-coverage small {
  font-size: 10px;
  font-weight: 700;
}
.dashboard-replenishment-item.is-critical {
  border-color: rgba(248, 84, 84, .72);
  border-left-color: #ff4d5d;
  background: linear-gradient(90deg, rgba(112, 29, 39, .8), rgba(49, 18, 32, .76));
}
.dashboard-replenishment-item.is-critical .dashboard-replenishment-coverage {
  color: #fff;
  background: rgba(220, 38, 38, .9);
  box-shadow: 0 0 14px rgba(255, 64, 64, .26);
}
.dashboard-replenishment-item.is-warning {
  border-color: rgba(245, 172, 62, .56);
  border-left-color: #ffad35;
  background: linear-gradient(90deg, rgba(92, 66, 29, .78), rgba(49, 36, 21, .74));
}
.dashboard-replenishment-item.is-warning .dashboard-replenishment-coverage {
  color: #fff1c9;
  background: rgba(138, 91, 24, .76);
}
.dashboard-replenishment-empty.screen-warning-empty {
  min-height: 64px;
  padding: 12px;
}
.dashboard-screen-refined > .dashboard-warning-panel {
  grid-column: 2;
  grid-row: auto;
  min-width: 0;
}
.dashboard-screen-refined .dashboard-transport-panel,
.dashboard-screen-refined .dashboard-warning-panel {
  min-height: 440px;
}
.dashboard-screen-refined .dashboard-stock-list {
  max-height: none;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.dashboard-screen-refined .dashboard-stock-row {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) 72px;
  gap: 7px;
  min-height: 42px;
  padding: 7px 8px;
}
.dashboard-screen-refined .dashboard-stock-row.show-safety-stock {
  grid-template-columns: minmax(0, .76fr) minmax(0, 1fr) 62px 62px;
}
.dashboard-screen-refined .dashboard-stock-header span,
.dashboard-screen-refined .dashboard-stock-header strong {
  font-size: 12px;
}
.dashboard-screen-refined .dashboard-stock-row .safety-stock-cell {
  color: #a8dcf1;
  background: rgba(27, 83, 124, .32);
  box-shadow: none;
}
.dashboard-screen-refined .screen-warning-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  color: #93b7cf;
  text-align: center;
}
@media (max-width: 1100px) {
  .dashboard-screen-refined { grid-template-columns: minmax(0, 1fr); }
  .dashboard-screen-refined > .dashboard-primary-column-refined,
  .dashboard-screen-refined > .dashboard-warning-panel {
    grid-column: 1;
    grid-row: auto;
  }
  .dashboard-screen-refined .dashboard-stock-list { max-height: none; }
}
@media (max-width: 900px) {
  .dashboard-replenishment-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dashboard-stock-panel-head { flex-direction: column; }
  .dashboard-stock-switches { width: 100%; justify-content: flex-start; margin-left: 0; }
  .dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-kpi-row > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dashboard-screen-refined .dashboard-stock-row {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) 68px;
  }
  .dashboard-screen-refined .dashboard-stock-row.show-safety-stock { grid-template-columns: minmax(0, .76fr) minmax(0, 1fr) 60px 60px; }
  .dashboard-replenishment-panel { padding: 12px; }
  .dashboard-replenishment-head { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-replenishment-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-left: 0;
  }
  .dashboard-replenishment-days input {
    width: 64px;
    height: 40px;
    font-size: 16px;
  }
  .dashboard-replenishment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 252px;
  }
}
@media (max-width: 520px) {
  .dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-kpi-row { grid-template-columns: minmax(0, 1fr); }
  .dashboard-screen-refined .dashboard-primary-column-refined > .dashboard-kpi-row > .kpi:last-child:nth-child(odd) { grid-column: auto; }
  .dashboard-screen-refined .dashboard-stock-list { overflow-x: auto; }
  .dashboard-screen-refined .dashboard-stock-row { min-width: 430px; }
  .dashboard-replenishment-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: 304px;
  }
  .dashboard-replenishment-item {
    grid-template-columns: minmax(0, 1fr) 64px;
    min-height: 48px;
  }
  .dashboard-replenishment-scope {
    grid-template-columns: minmax(76px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 8px;
  }
  .dashboard-replenishment-scope small {
    font-size: 12px;
  }
}

/* Compact dashboard KPI cards */
.dashboard-screen-refined .dashboard-kpi-row .kpi {
  height: 72px;
  min-height: 72px;
  padding: 9px 80px 9px 12px;
  gap: 0;
  align-content: center;
  align-self: start;
}
.dashboard-screen-refined .dashboard-kpi-row .kpi i {
  top: 50%;
  right: 10px;
  width: 58px;
  height: 58px;
  font-size: 22px;
  transform: translateY(-50%);
}
.dashboard-screen-refined .dashboard-kpi-row .kpi span {
  padding-right: 0;
  font-size: 13px;
  line-height: 1.2;
}
.dashboard-screen-refined .dashboard-kpi-row .kpi strong {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.15;
}
@media (max-width: 600px) {
  .dashboard-screen-refined .dashboard-kpi-row .kpi {
    height: 68px;
    min-height: 68px;
    padding: 8px 72px 8px 11px;
  }
  .dashboard-screen-refined .dashboard-kpi-row .kpi i {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }
  .dashboard-screen-refined .dashboard-kpi-row .kpi span { font-size: 12px; }
  .dashboard-screen-refined .dashboard-kpi-row .kpi strong { font-size: 17px; }
}

/* Merchant mobile dashboard: keep transport and stock details fully visible without horizontal dragging */
@media (max-width: 700px) {
  html,
  body,
  #app {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .app-shell:not(.screening) {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-shell:not(.screening) .sidebar {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .app-shell:not(.screening) .merchant-nav {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .app-shell:not(.screening),
  .app-shell:not(.screening) .main,
  .app-shell:not(.screening) .main > *,
  .dashboard-screen-refined,
  .dashboard-screen-refined > *,
  .dashboard-screen-refined .dashboard-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .dashboard-screen-refined {
    gap: 10px;
    padding: 0;
  }
  .dashboard-screen-refined .dashboard-primary-column-refined {
    grid-template-rows: auto auto;
    gap: 10px;
  }
  .dashboard-screen-refined .dashboard-transport-panel,
  .dashboard-screen-refined .dashboard-warning-panel {
    min-height: 0;
    padding: 12px;
    overflow: visible;
  }
  .dashboard-screen-refined .screen-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .dashboard-screen-refined .screen-panel-head span {
    min-width: 0;
    font-size: 15px;
  }
  .dashboard-screen-refined .screen-panel-head b {
    margin-left: auto;
    font-size: 11px;
    line-height: 1.45;
    text-align: right;
  }
  .dashboard-screen-refined .dashboard-panel-head-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    margin-left: 0;
  }
  .dashboard-screen-refined .dashboard-panel-head-actions b { margin-left: 0; }
  .dashboard-screen-refined .dashboard-purchase-button { min-height: 40px; padding: 0 14px; }
  .dashboard-screen-refined .screen-warning-empty {
    min-height: 116px;
    padding: 18px 10px;
  }

  .dashboard-transport-wrap {
    width: 100%;
    overflow: visible;
    padding: 0;
  }
  .dashboard-transport-table,
  .dashboard-transport-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .dashboard-transport-table {
    border-spacing: 0;
  }
  .dashboard-transport-table thead {
    display: none;
  }
  .dashboard-transport-table tbody {
    display: grid;
    gap: 7px;
  }
  .dashboard-transport-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(53, 130, 214, .38);
    border-radius: 9px;
    background: rgba(10, 45, 82, .72);
  }
  .dashboard-transport-table tbody tr > td {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    min-height: 28px;
    max-width: none;
    padding: 4px 0;
    overflow: visible;
    border-radius: 0;
    border-bottom: 1px solid rgba(145, 197, 231, .12);
    background: transparent;
    box-shadow: none;
    color: #eef8ff;
    font-size: 11px;
    line-height: 1.3;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .dashboard-transport-table tbody tr > td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #8eb8d2;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
  }
  .dashboard-transport-table tbody tr > td.dashboard-sticky-action {
    grid-column: 1 / -1;
  }
  .dashboard-transport-table tbody tr > td[data-label="货款"] {
    display: none;
  }
  .dashboard-transport-table tbody tr > td[data-label="采购日期"] {
    grid-column: 1 / -1;
    color: #65e5ff;
    font-size: 13px;
    font-weight: 800;
  }
  .dashboard-transport-table tbody tr > td.dashboard-sticky-action {
    border-bottom: 0;
  }
  .dashboard-transport-table td.dashboard-sticky-action {
    position: static;
    right: auto;
    min-height: 38px;
    padding-top: 6px;
    background: transparent;
    box-shadow: none;
  }
  .dashboard-transport-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: min(200px, 100%);
    margin-left: auto;
  }
  .dashboard-transport-actions a {
    display: grid;
    min-height: 34px;
    place-items: center;
    padding: 0 9px;
    border: 1px solid rgba(81, 227, 255, .28);
    border-radius: 7px;
    background: rgba(29, 94, 132, .5);
    font-size: 11px;
    text-shadow: none;
    touch-action: manipulation;
  }
  .dashboard-transport-actions a:nth-child(2) {
    border-color: rgba(255, 111, 113, .3);
    background: rgba(132, 41, 54, .42);
  }
  .dashboard-transport-actions a + a::before {
    display: none;
  }

  .dashboard-screen-refined .dashboard-stock-list {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    gap: 4px;
  }
  .dashboard-screen-refined .dashboard-stock-row {
    grid-template-columns: minmax(62px, .8fr) minmax(0, 1fr) 58px;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }
  .dashboard-screen-refined .dashboard-stock-row.show-safety-stock {
    grid-template-columns: minmax(56px, .75fr) minmax(0, 1fr) 52px 52px;
  }
  .dashboard-screen-refined .dashboard-stock-header {
    position: static;
    display: grid;
    min-height: 30px;
    padding: 4px 5px;
    border-radius: 6px;
  }
  .dashboard-screen-refined .dashboard-stock-header span,
  .dashboard-screen-refined .dashboard-stock-header strong {
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) {
    min-height: 34px;
    padding: 4px 5px;
    border-radius: 6px;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > * {
    min-width: 0;
    margin: 0;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > span {
    grid-column: auto;
    overflow: hidden;
    color: #eef8ff;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > span:first-child {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > [data-label] {
    grid-column: auto;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > [data-label]::before {
    display: none;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > strong,
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header) > .stock-link {
    display: grid;
    width: 100%;
    min-height: 26px;
    place-items: center;
    padding: 2px 3px;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .dashboard-screen-refined .dashboard-stock-row:not(.dashboard-stock-header):not(.show-safety-stock) > [data-label="当前库存"] {
    grid-column: auto;
  }
}

@media (max-width: 380px) {
  .dashboard-screen-refined .dashboard-transport-panel,
  .dashboard-screen-refined .dashboard-warning-panel {
    padding: 10px;
  }
  .dashboard-transport-table tbody tr {
    gap: 0 6px;
    padding: 5px 6px;
  }
  .dashboard-transport-table tbody tr > td {
    gap: 4px;
    min-height: 26px;
    padding: 3px 0;
    font-size: 11px;
  }
  .dashboard-transport-table tbody tr > td::before {
    font-size: 10px;
  }
}
.profit-trace-panel { margin-top: 18px; padding: 18px; border: 1px solid #dce7f2; border-radius: 14px; background: #f8fbfe; }
.profit-trace-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.profit-trace-head h3 { margin: 0 0 4px; color: #17324d; font-size: 18px; }
.profit-trace-head span, .muted-note { color: #6f8194; }
.profit-trace-panel h4 { margin: 18px 0 8px; color: #28445f; font-size: 15px; }
.profit-trace-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.profit-trace-summary article { padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid #e4ecf4; }
.profit-trace-summary span { display: block; color: #75879a; font-size: 12px; }
.profit-trace-summary strong { display: block; margin-top: 5px; color: #17324d; font-size: 17px; }
.profit-trace-summary .is-balanced { border-color: #a7e1ce; background: #f0fbf7; }
.profit-trace-summary .is-warning { border-color: #f3c2b9; background: #fff5f3; }
@media (max-width: 768px) {
  .profit-trace-head { align-items: flex-start; }
  .profit-trace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.import-task-workbench { display: grid; gap: 14px; }
.import-task-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.import-task-intro h2, .import-mapping-panel h2 { margin: 0 0 6px; }
.import-task-intro p, .import-mapping-panel p { margin: 0; color: var(--muted); }
.import-task-filter { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; }
.import-task-filter label, .import-mapping-form label { display: grid; gap: 6px; }
.import-task-filter select, .import-mapping-form select, .import-mapping-form input, .import-mapping-form textarea { width: 100%; }
.import-task-result-cell { min-width: 220px; max-width: 420px; white-space: normal; }
.table-subline { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.import-task-status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.import-task-status.is-completed { color: #0c775c; background: #daf7eb; }
.import-task-status.is-failed { color: #a92e42; background: #ffe5e9; }
.import-task-status.is-duplicate { color: #8e5a09; background: #fff0cb; }
.import-task-status.is-running, .import-task-status.is-queued { color: #185f9f; background: #e1f0ff; }
.import-mapping-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(360px, 1.2fr); gap: 18px; margin-top: 14px; }
.import-mapping-form { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 12px; }
.import-mapping-form .wide { grid-column: 1 / -1; }
.import-mapping-form .checkbox-label { display: flex; align-items: center; flex-direction: row; }
.import-mapping-form .checkbox-label input { width: auto; }
.mapping-template-list { display: grid; align-content: start; gap: 9px; }
.mapping-template-list article { display: grid; grid-template-columns: minmax(120px, .4fr) minmax(180px, .6fr); gap: 12px; padding: 12px 14px; border: 1px solid #e5ebf1; border-radius: 10px; background: #f9fbfc; }
.mapping-template-list article small { display: block; margin-top: 4px; color: var(--muted); }
.mapping-template-list code { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12px; }

@media (max-width: 900px) {
  .import-mapping-layout { grid-template-columns: 1fr; }
  .import-task-filter { grid-template-columns: 1fr 1fr; }
  .import-task-filter .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .import-task-intro { align-items: stretch; flex-direction: column; }
  .import-task-filter, .import-mapping-form { grid-template-columns: 1fr; }
  .import-task-filter .filter-actions, .import-mapping-form .wide { grid-column: auto; }
  .mapping-template-list article { grid-template-columns: 1fr; }
}

.inventory-ledger-filter-grid { grid-template-columns: repeat(5, minmax(125px, 1fr)) auto; }
.inventory-ledger-workbench .data-wrap td:nth-child(9),
.inventory-ledger-workbench .data-wrap td:nth-child(10),
.inventory-ledger-workbench .data-wrap td:nth-child(11) { min-width: 150px; white-space: normal; }
@media (max-width: 1100px) {
  .inventory-ledger-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}
@media (max-width: 600px) {
  .inventory-ledger-filter-grid { grid-template-columns: 1fr 1fr; }
  .inventory-ledger-filter-grid .purchase-filter-actions { grid-column: 1 / -1; }
}

.business-analytics-workbench { --muted: var(--merchant-muted, #6c7b8b); display: grid; gap: 14px; }
.analytics-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.analytics-heading h2, .analytics-brief h2 { margin: 0 0 5px; }
.analytics-inventory-panel { min-width: 0; }
.analytics-inventory-panel .table-sort-button:hover, .analytics-inventory-panel .table-sort-button:focus-visible { color: #0f766e; }
.analytics-heading p, .analytics-brief p { margin: 0; color: var(--muted); }
.smart-replenishment-controls { display: flex; align-items: flex-end; gap: 10px; flex: 0 0 auto; }
.smart-replenishment-controls label { display: grid; grid-template-columns: minmax(90px, 112px) auto; align-items: center; gap: 5px; }
.smart-replenishment-controls label span { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.smart-replenishment-controls input { width: 112px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.smart-replenishment-controls em { color: var(--muted); font-style: normal; }
.analytics-summary-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.analytics-summary-grid article { grid-column: span 3; min-height: 94px; padding: 13px 14px; border: 1px solid #dfe8f1; border-radius: 12px; background: #fff; }
.analytics-summary-grid article:nth-child(n + 5) { grid-column: span 3; }
.analytics-summary-grid span, .analytics-summary-grid small { display: block; color: var(--muted); }
.analytics-summary-grid strong { display: block; margin: 7px 0 3px; color: #17324d; font-size: clamp(18px, 1.55vw, 25px); font-variant-numeric: tabular-nums; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-summary-grid .is-warning { border-color: #f1d59a; background: #fffaf0; }
.analytics-summary-grid .is-danger { border-color: #f1b8c0; background: #fff6f7; }
.analytics-brief { display: grid; grid-template-columns: minmax(220px, .35fr) minmax(320px, .65fr); gap: 18px; }
.analytics-brief ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.analytics-brief li { padding: 10px 12px; border-radius: 9px; background: #f4f8fb; }
.analytics-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.analytics-status.is-normal { color: #117258; background: #dcf7ed; }
.analytics-status.is-slow_moving { color: #8d5d0d; background: #fff0d0; }
.analytics-status.is-stockout_risk, .analytics-status.is-negative, .analytics-status.is-delisted_stock { color: #a22c40; background: #ffe4e8; }
.delist-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.delist-status.is-active { color: #117258; background: #dcf7ed; }
.delist-status.is-partially_delisted { color: #8d5d0d; background: #fff0d0; }
.delist-status.is-fully_delisted, .delist-status.is-delisted { color: #a22c40; background: #ffe4e8; }
.analytics-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.analytics-trend-list { display: grid; max-height: 430px; overflow: auto; }
.analytics-trend-list article { display: grid; grid-template-columns: 105px 1fr 1fr 70px; gap: 9px; padding: 9px 4px; border-bottom: 1px solid #edf1f5; }
.analytics-trend-list time { color: var(--muted); }
.analytics-trend-list b { text-align: right; }
.analytics-trend-list .is-positive, .analytics-brief .is-positive { color: #0b7b5b; }
.analytics-trend-list .is-warning, .analytics-brief .is-warning { color: #9a620c; }
.analytics-trend-list .is-negative, .analytics-brief .is-negative { color: #ad2e43; }
.analytics-planning-panel { overflow: hidden; }
.analytics-planning-panel .table-toolbar { margin-bottom: 12px; }
.analytics-planning-table-wrap { border: 1px solid #e2eaf1; border-radius: 10px; background: #fff; }
.analytics-planning-table { min-width: 1020px; margin: 0; }
.analytics-planning-table td { vertical-align: middle; }
.analytics-coverage-days { color: #1f6f5d; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-coverage-days.is-urgent { color: #c62f46; }
.analytics-planning-table tbody tr:has(.is-critical) { background: #fff8f9; }
.analytics-planning-table tbody tr:has(.is-high) { background: #fffdf8; }
.analytics-planning-priority { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 4px 8px; border-radius: 999px; color: #486275; background: #edf3f7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.analytics-planning-priority.is-critical { color: #b52e45; background: #fde8ec; }
.analytics-planning-priority.is-high { color: #95600d; background: #fff0d7; }
.analytics-planning-priority.is-medium { color: #246a88; background: #e8f4f8; }
.analytics-planning-reason { min-width: 230px; }
.analytics-planning-reason span, .analytics-planning-reason small { display: block; line-height: 1.45; }
.analytics-planning-reason small { margin-top: 3px; color: var(--muted); }
.table-muted { color: var(--muted); font-size: 12px; white-space: nowrap; }
.analytics-alerts { overflow: hidden; }
.analytics-alert-toolbar { margin-bottom: 12px; }
.analytics-filter-total { flex: 0 0 auto; color: #31506d; font-size: 14px; }
.analytics-alert-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.analytics-alert-summary article { display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 11px 13px; border: 1px solid #dfe8f1; border-radius: 10px; background: #f8fbfd; }
.analytics-alert-summary span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-alert-summary strong { margin-left: 10px; color: #17324d; font-size: 20px; font-variant-numeric: tabular-nums; }
.analytics-alert-summary .is-critical { border-color: #efbdc4; background: #fff6f7; }
.analytics-alert-summary .is-critical strong { color: #bd3048; }
.analytics-alert-summary .is-warning { border-color: #f0d29c; background: #fffaf1; }
.analytics-alert-summary .is-warning strong { color: #9a620c; }
.analytics-alert-filter-grid { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(170px, .8fr) minmax(240px, 1.5fr) auto; align-items: end; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid #e3ebf2; border-radius: 10px; background: #f8fafc; }
.analytics-alert-filter-grid label { display: grid; min-width: 0; gap: 6px; }
.analytics-alert-filter-grid label > span { color: #526b82; font-size: 12px; font-weight: 600; }
.analytics-alert-filter-grid input, .analytics-alert-filter-grid select { width: 100%; height: 36px; min-width: 0; border: 1px solid #d6e0e8; border-radius: 7px; background: #fff; }
.analytics-alert-filter-actions { display: flex; gap: 8px; }
.analytics-alert-filter-actions .layui-btn { height: 36px; margin: 0; }
.analytics-alert-table-wrap { min-height: 128px; border: 1px solid #e2eaf1; border-radius: 10px; background: #fff; }
.analytics-alert-table { min-width: 880px; margin: 0; table-layout: fixed; }
.analytics-alert-table th:nth-child(1) { width: 82px; }
.analytics-alert-table th:nth-child(2) { width: 122px; }
.analytics-alert-table th:nth-child(4) { width: 180px; }
.analytics-alert-table th:nth-child(5) { width: 154px; }
.analytics-alert-table tbody tr { border-left: 3px solid transparent; }
.analytics-alert-table tbody tr.is-critical { border-left-color: #cf3952; background: #fff8f9; }
.analytics-alert-table tbody tr.is-warning { border-left-color: #e09c29; background: #fffdf8; }
.analytics-alert-table td { vertical-align: middle; }
.analytics-alert-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; padding: 4px 9px; border-radius: 999px; background: #eaf4f8; color: #246a88; font-size: 12px; font-weight: 700; white-space: nowrap; }
.analytics-alert-badge.is-critical { background: #fde8ec; color: #b52e45; }
.analytics-alert-badge.is-warning { background: #fff0d7; color: #95600d; }
.analytics-alert-type { color: #31506d; font-weight: 600; }
.analytics-alert-detail, .analytics-alert-scope { min-width: 0; overflow: hidden; }
.analytics-alert-detail strong, .analytics-alert-detail span, .analytics-alert-scope strong, .analytics-alert-scope span { display: block; }
.analytics-alert-detail strong { margin-bottom: 3px; overflow: hidden; color: #243c52; text-overflow: ellipsis; white-space: nowrap; }
.analytics-alert-detail span { display: -webkit-box; overflow: hidden; color: #5a6f82; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.analytics-alert-scope strong { margin-bottom: 3px; overflow: hidden; color: #31506d; text-overflow: ellipsis; white-space: nowrap; }
.analytics-alert-scope span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.analytics-alert-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.analytics-alert-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 96px; color: var(--muted); }
.analytics-alert-state .layui-icon { color: #2a7ea8; font-size: 24px; }
.analytics-alert-pagination { margin-top: 14px; padding: 12px 0 0; border-top: 1px solid #e8eef3; }
@media (max-width: 900px) {
  .analytics-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-summary-grid article, .analytics-summary-grid article:nth-child(n + 5) { grid-column: auto; }
  .analytics-brief, .analytics-two-column { grid-template-columns: 1fr; }
  .analytics-alert-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-alert-keyword { grid-column: 1 / -1; }
  .analytics-alert-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 600px) {
  .analytics-heading { align-items: stretch; flex-direction: column; }
  .smart-replenishment-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; width: 100%; }
  .smart-replenishment-controls label { grid-template-columns: minmax(0, 1fr) auto; }
  .smart-replenishment-controls input { width: 100%; }
  .smart-replenishment-controls > .layui-btn { grid-column: 1 / -1; width: 100%; margin: 0; }
  .analytics-summary-grid article:last-child { grid-column: 1 / -1; }
  .analytics-brief ul, .analytics-alert-summary, .analytics-alert-filter-grid { grid-template-columns: 1fr; }
  .analytics-alert-keyword, .analytics-alert-filter-actions { grid-column: auto; }
  .analytics-alert-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .analytics-alert-toolbar { align-items: flex-start; }
  .analytics-filter-total { width: 100%; }
  .analytics-alert-pagination { align-items: stretch; gap: 10px; }
  .analytics-alert-pagination .pagination-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .analytics-alert-pagination .pagination-actions > span:not(.page-count) { display: none; }
  .analytics-alert-pagination .pagination-actions select { grid-column: 1 / -1; grid-row: 1; }
  .analytics-alert-pagination .pagination-actions button:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .analytics-alert-pagination .pagination-actions button:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  .analytics-alert-pagination .pagination-actions .page-count { grid-column: 1 / -1; grid-row: 3; text-align: center; }
  .analytics-alert-table { min-width: 740px; font-size: 12px; }
  .analytics-planning-table { min-width: 980px; font-size: 12px; }
  .analytics-alert-table th:nth-child(2) { width: 108px; }
  .analytics-alert-table th:nth-child(4) { width: 150px; }
  .analytics-alert-table th:nth-child(5) { width: 138px; }
  .analytics-trend-list article { grid-template-columns: 86px 1fr; }
  .analytics-trend-list article b { text-align: left; }
}

/* Inventory warning: connect every category that belongs to the same warehouse. */
.dashboard-stock-group {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) 100px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(81, 227, 255, .36);
  border-radius: 7px;
  background: rgba(8, 35, 68, .72);
  box-shadow: 0 6px 16px rgba(0, 13, 30, .12);
}
.dashboard-stock-group.show-safety-stock {
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) 100px 100px;
}
.dashboard-stock-warehouse {
  position: relative;
  grid-column: 1;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 8px 10px 8px 13px;
  border-right: 1px solid rgba(81, 227, 255, .3);
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 54, 91, .98), rgba(8, 42, 73, .96));
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
.dashboard-stock-warehouse::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 7px 0 0 7px;
  background: #32d7ed;
  box-shadow: 0 0 10px rgba(50, 215, 237, .35);
  content: '';
}
.dashboard-stock-group-rows {
  grid-column: 2 / -1;
  display: grid;
  min-width: 0;
}
.dashboard-stock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 7px 8px;
  background: linear-gradient(90deg, rgba(13, 57, 103, .72), rgba(7, 24, 50, .66));
}
.dashboard-stock-item.show-safety-stock {
  grid-template-columns: minmax(0, 1fr) 100px 100px;
}
.dashboard-stock-item + .dashboard-stock-item {
  border-top: 1px solid rgba(81, 227, 255, .24);
}
.dashboard-stock-item > span {
  min-width: 0;
  overflow: hidden;
  color: #fff3f3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-stock-item > strong,
.dashboard-stock-item > .stock-link {
  display: grid;
  width: 100%;
  min-height: 26px;
  place-items: center;
  margin: 0;
  padding: 2px 6px;
  border-radius: 5px;
  color: #51e3ff;
  background: rgba(27, 83, 124, .45);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.dashboard-stock-item > .stock-link {
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}
.dashboard-stock-item.low-stock-row {
  background: linear-gradient(90deg, rgba(112, 29, 39, .78), rgba(49, 18, 32, .76));
  box-shadow: inset 0 0 0 1px rgba(248, 84, 84, .5);
}
.dashboard-stock-item > strong.low-stock-cell,
.dashboard-stock-item > .stock-link.low-stock-cell {
  color: #fff;
  background: rgba(220, 38, 38, .9);
  box-shadow: 0 0 14px rgba(255, 64, 64, .28);
}
.dashboard-stock-item > .stock-link.low-stock-cell:hover {
  background: rgba(248, 54, 54, .96);
  box-shadow: 0 0 18px rgba(255, 75, 75, .42);
}
.dashboard-stock-item > .safety-stock-cell {
  color: #a8dcf1;
  background: rgba(27, 83, 124, .32);
  box-shadow: none;
}

.dashboard-screen-refined .dashboard-stock-group {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) 72px;
}
.dashboard-screen-refined .dashboard-stock-group.show-safety-stock {
  grid-template-columns: minmax(0, .76fr) minmax(0, 1fr) 62px 62px;
}
.dashboard-screen-refined .dashboard-stock-item {
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 7px;
}
.dashboard-screen-refined .dashboard-stock-item.show-safety-stock {
  grid-template-columns: minmax(0, 1fr) 62px 62px;
}

@media (max-width: 700px) {
  .dashboard-screen-refined .dashboard-stock-list {
    gap: 8px;
  }
  .dashboard-screen-refined .dashboard-stock-group {
    grid-template-columns: minmax(62px, .8fr) minmax(0, 1fr) 58px;
    border-radius: 7px;
  }
  .dashboard-screen-refined .dashboard-stock-group.show-safety-stock {
    grid-template-columns: minmax(56px, .75fr) minmax(0, 1fr) 52px 52px;
  }
  .dashboard-screen-refined .dashboard-stock-warehouse {
    padding: 6px 5px 6px 8px;
    font-size: 12px;
    line-height: 1.25;
  }
  .dashboard-screen-refined .dashboard-stock-warehouse::before {
    width: 3px;
  }
  .dashboard-screen-refined .dashboard-stock-item {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 4px;
    min-height: 34px;
    padding: 4px 5px;
  }
  .dashboard-screen-refined .dashboard-stock-item.show-safety-stock {
    grid-template-columns: minmax(0, 1fr) 52px 52px;
  }
  .dashboard-screen-refined .dashboard-stock-item > span {
    font-size: 11px;
    line-height: 1.2;
  }
  .dashboard-screen-refined .dashboard-stock-item > strong,
  .dashboard-screen-refined .dashboard-stock-item > .stock-link {
    min-height: 26px;
    padding: 2px 3px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .dashboard-screen-refined .dashboard-stock-group {
    grid-template-columns: minmax(58px, .78fr) minmax(0, 1fr) 54px;
  }
  .dashboard-screen-refined .dashboard-stock-group.show-safety-stock {
    grid-template-columns: minmax(52px, .72fr) minmax(0, 1fr) 48px 48px;
  }
  .dashboard-screen-refined .dashboard-stock-item {
    grid-template-columns: minmax(0, 1fr) 54px;
  }
  .dashboard-screen-refined .dashboard-stock-item.show-safety-stock {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
  }
}

/* Merchant dashboard: one navy surface for navigation and operational panels. */
.app-shell:not(.screening) {
  --merchant-dashboard-navy: linear-gradient(180deg, #0b2638 0%, #12344b 100%);
}
.app-shell:not(.screening) .sidebar,
.dashboard-screen-refined .dashboard-panel {
  background: var(--merchant-dashboard-navy);
}

/* Dashboard replenishment: expand to fit every filtered item. */
.dashboard-replenishment-list {
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

/* AI business assistant: isolated from existing operational layouts. */
.ai-analytics-workbench { width: 100%; max-width: none; margin: 0; }
.ai-settings-workbench { width: 100%; max-width: none; margin: 0; }
.ai-chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 310px); align-items: stretch; gap: 16px; width: 100%; }
.ai-chat-shell { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #dce7ee; }
.ai-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #e3ebf0; background: #fff; }
.ai-chat-header > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-chat-header h2 { margin: 0 0 3px; font-size: 18px; color: #102f43; }
.ai-chat-header p { margin: 0; color: #718495; font-size: 13px; }
.ai-provider-mark,
.ai-empty-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(145deg, #20c7bd, #1687a5); color: #fff; font-weight: 800; box-shadow: 0 8px 20px rgba(22,135,165,.18); }
.ai-chat-welcome { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 390px; padding: 38px 24px; text-align: center; background: linear-gradient(180deg, #f9fcfd, #f4f8fa); }
.ai-chat-welcome h3 { margin: 0 0 8px; font-size: 22px; color: #12344b; }
.ai-chat-welcome p { max-width: 680px; margin: 0; color: #718495; line-height: 1.7; }
.ai-suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(760px, 100%); margin-top: 28px; }
.ai-chat-welcome .ai-suggestion-grid { display: none; }
.ai-suggestion-grid button { min-height: 54px; padding: 12px 16px; border: 1px solid #d7e6ec; border-radius: 12px; background: #fff; color: #23475b; text-align: left; cursor: pointer; transition: .18s ease; }
.ai-suggestion-grid button:hover { transform: translateY(-1px); border-color: #2dbcb5; box-shadow: 0 8px 22px rgba(17,90,116,.09); }
.ai-chat-stream { height: clamp(430px, 57vh, 680px); min-height: 430px; overflow: auto; padding: 22px; background: #f6f9fb; scroll-behavior: smooth; }
.ai-message { display: flex; gap: 10px; width: 100%; max-width: none; margin: 0 0 18px; }
.ai-message.is-user { flex-direction: row-reverse; }
.ai-message-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; background: #123c56; color: #fff; font-size: 12px; font-weight: 800; }
.ai-message.is-user .ai-message-avatar { background: #27b8b0; }
.ai-message.is-error .ai-message-avatar { background: #d84040; }
.ai-message-body { min-width: 0; max-width: 86%; padding: 13px 15px; border: 1px solid #e0e9ee; border-radius: 5px 15px 15px; background: #fff; box-shadow: 0 5px 14px rgba(26,60,78,.05); }
.ai-message.is-user .ai-message-body { border-color: #bce8e5; border-radius: 15px 5px 15px 15px; background: #e9f8f6; }
.ai-message.is-error .ai-message-body { border-color: #f2c2c2; background: #fff4f4; color: #b92424; }
.ai-message-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 7px; color: #7d8f9d; font-size: 12px; }
.ai-message-meta strong { color: #1d4357; }
.ai-intent-badge { display: inline-flex; margin: 0 0 8px; padding: 3px 8px; border-radius: 999px; background: #e8f6f5; color: #167b77; font-size: 11px; font-weight: 700; }
.ai-memory-badge { display: inline-flex; margin: 0 0 8px 6px; padding: 3px 8px; border: 1px solid rgba(20,184,166,.28); border-radius: 999px; background: rgba(20,184,166,.1); color: #0f766e; font-size: 11px; font-weight: 700; }
.ai-message-body > p { margin: 0; white-space: pre-wrap; line-height: 1.75; color: #253e4d; }
.ai-message-body > small { display: block; margin-top: 10px; color: #8797a2; }
.ai-result-block { margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: #eef8f7; color: #194b50; }
.ai-result-block.is-risk { background: #fff5e6; color: #784f0a; }
.ai-result-block.is-suggestion { background: #eef4ff; color: #214c85; }
.ai-result-block ul,
.ai-message details ul { margin: 7px 0 0; padding-left: 20px; }
.ai-result-block li,
.ai-message details li { margin: 4px 0; line-height: 1.55; }
.ai-message details { margin-top: 10px; color: #607989; }
.ai-message details summary { cursor: pointer; }
.ai-evidence-block { margin-top: 12px; padding: 12px; border: 1px solid #dbe8ed; border-radius: 10px; background: #fbfdfe; color: #244a5e; }
.ai-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ai-evidence-grid > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 9px; border-radius: 8px; background: #f0f6f8; }
.ai-evidence-grid small { color: #6e8491; }
.ai-evidence-grid strong { color: #123e55; font-size: 15px; word-break: break-word; }
.ai-evidence-grid em { color: #7e919c; font-size: 10px; font-style: normal; }
.ai-data-warning { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #fff5e8; color: #765017; font-size: 12px; }
.ai-action-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-action-links button { padding: 7px 10px; border: 1px solid #b8ddd9; border-radius: 8px; background: #f2fbfa; color: #137b76; cursor: pointer; font-size: 12px; }
.ai-action-links button:hover { border-color: #28aaa4; background: #e7f7f5; }
.ai-action-links i { margin-left: 4px; font-size: 11px; }
.ai-thinking { display: flex; align-items: center; gap: 9px; color: #4c6b7d; }
.ai-mobile-quick-strip { display: none; }
.ai-composer { padding: 16px 18px; border-top: 1px solid #e1eaef; background: #fff; }
.ai-composer textarea { width: 100%; min-height: 92px; padding: 12px 14px; resize: vertical; border: 1px solid #cfdde5; border-radius: 12px; box-sizing: border-box; line-height: 1.55; outline: none; }
.ai-composer textarea:focus { border-color: #21aaa4; box-shadow: 0 0 0 3px rgba(33,170,164,.1); }
.ai-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.ai-composer span { color: #8797a2; font-size: 12px; }
.ai-quick-panel { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid #cce8e3; background: linear-gradient(180deg, #f3fbf9 0%, #edf8f5 100%); }
.ai-quick-panel-head { display: flex; align-items: center; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid #d3eae6; }
.ai-quick-panel-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: #d8f3ee; color: #10877f; }
.ai-quick-panel-icon i { font-size: 20px; }
.ai-quick-panel h3 { margin: 0 0 3px; color: #153e43; font-size: 17px; }
.ai-quick-panel p { margin: 0; color: #708a8b; font-size: 12px; }
.ai-quick-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 15px; color: #174e4b; }
.ai-quick-section-title span { font-size: 13px; font-weight: 800; }
.ai-quick-section-title small { color: #789392; font-size: 10px; text-align: right; }
.ai-quick-section-title.is-recommended { margin-top: 18px; }
.ai-quick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.ai-quick-section-title + .ai-quick-list { margin-top: 8px; }
.ai-quick-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 56px; padding: 11px 12px; border: 1px solid #cde5e1; border-radius: 11px; background: rgba(255,255,255,.9); color: #285158; text-align: left; line-height: 1.5; cursor: pointer; transition: .18s ease; }
.ai-quick-list button:hover { transform: translateY(-1px); border-color: #2dbcb5; background: #fff; box-shadow: 0 7px 18px rgba(19,113,108,.08); }
.ai-quick-list button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ai-quick-list button span { min-width: 0; }
.ai-quick-list button i { flex: 0 0 auto; color: #22a59e; font-size: 12px; }
.ai-quick-list.is-frequent button { border-color: #9fd8cf; background: #e9f8f4; }
.ai-quick-list button em { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #cfeee7; color: #13766f; font-size: 10px; font-style: normal; white-space: nowrap; }
.ai-quick-tip { display: flex; gap: 8px; margin-top: auto; padding: 13px 12px; border-radius: 10px; background: rgba(216,243,238,.72); color: #577879; font-size: 12px; line-height: 1.55; }
.ai-quick-tip i { flex: 0 0 auto; margin-top: 2px; color: #14938b; }
.ai-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 430px; padding: 42px; text-align: center; }
.ai-empty-state h2 { margin: 18px 0 8px; color: #14364a; }
.ai-empty-state p { margin: 0 0 20px; color: #728695; }
.ai-empty-state small { color: #8797a2; }
.ai-settings-card { padding: 20px; }
.ai-config-status { padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ai-config-status.is-ready { background: #dcf6ed; color: #087558; }
.ai-config-status.is-empty { background: #edf1f4; color: #697a86; }
.ai-security-notice { display: flex; gap: 12px; margin: 16px 0 20px; padding: 13px 15px; border: 1px solid #ccebe8; border-radius: 10px; background: #f1fbfa; color: #315d63; }
.ai-security-notice strong { flex: 0 0 auto; color: #128079; }
.ai-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ai-settings-form label { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #263f4d; }
.ai-settings-form input:not([type="checkbox"]),
.ai-settings-form select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #d4e0e6; border-radius: 8px; box-sizing: border-box; background: #fff; }
.ai-settings-form input[readonly] { background: #f5f8fa; color: #6c7e89; }
.ai-settings-form small { color: #82929d; }
.ai-switch-field { flex-direction: row !important; flex-wrap: wrap; align-items: center; padding: 13px 14px; border: 1px solid #dbe6eb; border-radius: 9px; background: #f9fbfc; }
.ai-switch-field > span { flex: 1; font-weight: 700; }
.ai-switch-field > small { flex: 0 0 100%; }
.ai-switch-field input { width: 18px; height: 18px; }
.ai-switch-field.is-danger { border-color: #f0d7d7; background: #fff9f9; }
.ai-settings-form .form-actions { grid-column: 1 / -1; justify-content: flex-end; }

@media (max-width: 1100px) {
  .ai-chat-layout { grid-template-columns: minmax(0, 1fr); }
  .ai-quick-panel { display: none; }
  .ai-mobile-quick-strip { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; border-top: 1px solid #e1eaef; background: #f7fbfb; scrollbar-width: none; }
  .ai-mobile-quick-strip::-webkit-scrollbar { display: none; }
  .ai-mobile-quick-strip button { flex: 0 0 auto; max-width: 78vw; min-height: 34px; padding: 7px 11px; overflow: hidden; border: 1px solid #c9e4df; border-radius: 999px; background: #fff; color: #22635f; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 760px) {
  .ai-analytics-workbench,
  .ai-settings-workbench { margin: 0; }
  .ai-chat-shell { overflow: visible; }
  .ai-chat-header { align-items: flex-start; gap: 10px; padding: 12px; }
  .ai-chat-header > div { align-items: flex-start; gap: 9px; }
  .ai-provider-mark { width: 36px; height: 36px; border-radius: 11px; }
  .ai-chat-header h2 { font-size: 16px; }
  .ai-chat-header p { display: -webkit-box; overflow: hidden; white-space: normal; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .ai-chat-header > button { flex: 0 0 auto; padding: 0 10px; }
  .ai-chat-welcome { min-height: 300px; padding: 28px 16px; }
  .ai-chat-welcome h3 { font-size: 19px; }
  .ai-suggestion-grid { grid-template-columns: 1fr; gap: 8px; }
  .ai-chat-stream { height: auto; min-height: 300px; max-height: 55dvh; padding: 12px 8px; }
  .ai-message { gap: 7px; margin-bottom: 13px; }
  .ai-message-avatar { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
  .ai-message-body { max-width: calc(100% - 37px); padding: 11px 12px; }
  .ai-message-meta { flex-wrap: wrap; gap: 4px 10px; }
  .ai-evidence-grid { grid-template-columns: 1fr; }
  .ai-mobile-quick-strip { padding: 9px 10px; }
  .ai-composer { position: static; bottom: auto; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .ai-composer textarea { min-height: 86px; resize: none; font-size: 16px; }
  .ai-composer > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; }
  .ai-composer > div button { width: 100%; min-height: 44px; }
  .ai-settings-card { padding: 14px; }
  .ai-settings-form { grid-template-columns: 1fr; }
  .ai-security-notice { flex-direction: column; gap: 5px; }
}

/* 耗时请求反馈：读请求轻提示，写请求等待期间防重复操作，不展示虚假百分比。 */
.request-feedback { position: fixed; right: 18px; top: 76px; z-index: 2147482000; max-width: calc(100vw - 24px); pointer-events: none; }
.request-feedback-card { width: 340px; max-width: 100%; box-sizing: border-box; padding: 18px 20px; border: 1px solid #c5e6e3; border-radius: 12px; background: #fff; color: #173444; box-shadow: 0 12px 36px rgba(11,34,48,.18); }
.request-feedback-card strong { display: block; font-size: 16px; line-height: 1.6; }
.request-feedback-track { height: 6px; margin: 13px 0 10px; background: #e3f1ef; border-radius: 6px; overflow: hidden; }
.request-feedback-track span { display: block; width: 40%; height: 100%; border-radius: inherit; background: #12b4a5; animation: request-feedback-slide 1.35s ease-in-out infinite alternate; }
.request-feedback-detail, .request-feedback-card p { color: #58717d; font-size: 13px; line-height: 1.7; margin: 0; }
.request-feedback-card p { margin-top: 7px; }
.request-feedback-blocking { inset: 0; max-width: none; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11,34,48,.20); pointer-events: auto; }
@keyframes request-feedback-slide { from { transform: translateX(0); } to { transform: translateX(150%); } }
@media (prefers-reduced-motion: reduce) { .request-feedback-track span { animation: none; width: 100%; opacity: .65; } }
@media (max-width: 640px) { .request-feedback:not(.request-feedback-blocking) { top: 62px; right: 12px; } .request-feedback-card { width: min(340px, calc(100vw - 32px)); padding: 16px; } }
