:root {
  --navy:#17324d;
  --navy-deep:#10293f;
  --canvas:#f4f6f8;
  --surface:#fff;
  --teal:#287d78;
  --teal-hover:#216b67;
  --teal-soft:#eaf4f2;
  --text:#223042;
  --muted:#5e6c7b;
  --border:#dfe6ec;
  --danger:#ac3d3d;
  font-family:"Source Han Sans SC","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--text);
  background:var(--canvas);
  font-synthesis:none;
  font-size:14px;
  line-height:1.55;
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.6; }
a { color:var(--teal); }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:3px solid #9acac7; outline-offset:3px; }
.icon-library { position:absolute; width:0; height:0; overflow:hidden; }
.icon { width:21px; height:21px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.desktop-sidebar { position:fixed; z-index:80; inset:0 auto 0 0; width:248px; display:flex; flex-direction:column; background:var(--navy); color:#eef5fa; }
.sidebar-brand { display:block; width:100%; border:0; padding:29px 20px 26px; text-align:left; color:#fff; background:transparent; }
.sidebar-brand-name { display:block; white-space:nowrap; font-size:18px; font-weight:650; letter-spacing:-.5px; }
.sidebar-brand-caption { display:block; margin-top:7px; color:#b7ccdc; font-size:13px; }
.desktop-nav { flex:1; min-height:0; overflow:auto; padding:0 12px 20px; scrollbar-width:thin; scrollbar-color:#4f6b80 transparent; }
.desktop-nav button { display:flex; align-items:center; gap:13px; width:100%; min-height:44px; margin:4px 0; padding:10px 15px; border:0; border-radius:7px; color:#d9e6ef; text-align:left; background:transparent; font-size:14px; }
.desktop-nav button:hover { color:#fff; background:#ffffff0c; }
.desktop-nav button.active,.desktop-nav button.is-active,.desktop-nav button[aria-current="page"] { color:#fff; background:var(--teal); font-weight:600; }
.sidebar-footer { display:flex; align-items:center; gap:10px; margin:0 18px; padding:18px 0 21px; border-top:1px solid #ffffff29; }
.sidebar-footer .icon { width:21px; height:21px; }
.sidebar-footer span { display:block; white-space:nowrap; font-size:12px; color:#e6eef5; font-weight:550; }
.sidebar-footer small { display:block; margin-top:4px; color:#a9bece; font-size:11px; }
.desktop-main { min-width:0; margin-left:248px; }
.masthead { position:sticky; top:0; z-index:60; display:flex; align-items:center; gap:18px; min-height:68px; padding:12px 28px; border-bottom:1px solid var(--border); background:#fff; }
.masthead strong { margin-right:auto; font-size:19px; font-weight:650; }
.masthead button { padding:5px 0; border:0; color:var(--teal); background:transparent; font-size:13px; }
.masthead .back-button { color:var(--muted); }
.account-label { color:var(--muted); font-size:13px; }
.masthead label { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); }
.masthead select { min-height:32px; max-width:120px; border:1px solid var(--border); border-radius:5px; background:#fff; color:var(--text); }
.masthead #web-logout { border-left:1px solid var(--border); padding-left:18px; }
.nav-toggle { display:none; align-items:center; justify-content:center; }
.preview-label { margin:0; padding:8px 28px; background:#eaf4f2; color:#3d625f; font-size:12px; }
#page { width:100%; max-width:1680px; min-height:calc(100vh - 69px); margin:0 auto; padding:26px 28px 48px; outline:0; }
#page .shell { width:100%; min-width:0; padding:0; }
#page .heading { color:var(--text); font-size:25px; line-height:1.35; letter-spacing:-.4px; font-weight:650; }
#page .title { color:var(--text); font-size:17px; font-weight:650; }
#page .section { margin-top:24px; }
#page .section-head { margin-bottom:16px; }
#page .lead { margin-top:10px; }
#page .muted { color:var(--muted); font-size:13px; }
#page .panel { padding:22px; background:#fff; border:1px solid var(--border); border-radius:9px; box-shadow:none; }
#page .grid { gap:16px; grid-template-columns:repeat(2,minmax(0,1fr)); }
#page .line { gap:16px; }
#page .primary,#page .secondary,#page .ghost { width:auto; min-height:38px; padding:8px 16px; border-radius:6px; font-size:13px; font-weight:550; box-shadow:none; }
#page .primary { color:#fff; background:var(--teal); border:1px solid var(--teal); }
#page .primary:hover:not(:disabled) { background:var(--teal-hover); }
#page .secondary { color:var(--teal); background:var(--teal-soft); border:1px solid #d7e9e5; }
#page .ghost { color:var(--muted); background:#fff; border:1px solid var(--border); }
#page .ghost:hover:not(:disabled),#page .secondary:hover:not(:disabled) { color:var(--teal); border-color:#a8ccc8; }
#page .text-button,#page .admin-small { min-height:32px; padding:5px 11px; font-size:12px; }
#page .grid>button { width:100%; }
#page .input { min-height:40px; padding:9px 12px; border:1px solid #d6dfe7; border-radius:6px; background:#fff; color:var(--text); font-size:14px; }
#page .input:focus { border-color:var(--teal); }
#page .input::placeholder { color:#87929e; }
#page select.input { appearance:auto; padding:7px 10px; }
#page .field { margin-top:18px; }
#page .field-label { margin-bottom:7px; color:#415060; font-size:13px; font-weight:550; }
#page .textarea { height:104px; resize:vertical; }
#page .segment { display:flex; gap:4px; width:fit-content; max-width:100%; padding:4px; border-radius:7px; background:#edf1f4; }
#page .segment button { min-height:32px; min-width:90px; border:0; padding:6px 15px; border-radius:5px; color:var(--muted); font-size:13px; background:transparent; }
#page .segment .active { color:var(--teal); background:#fff; box-shadow:0 1px 3px #17324d0b; }
#page .pill,#page .status-pill { display:inline-flex; align-items:center; padding:3px 9px; border-radius:4px; color:var(--teal); background:var(--teal-soft); font-size:12px; font-weight:500; white-space:nowrap; }
#page .notice { border:1px solid #e2e9e8; border-radius:6px; background:#f2f7f6; color:#42615e; padding:12px 16px; font-size:13px; }
#page .error { font-size:13px; color:var(--danger); padding:10px 0; }
#page .empty { color:var(--muted); padding:30px 0; font-size:13px; text-align:center; }
#page .number,.metric-value,.data-table .amount { font-family:"DIN Alternate","Bahnschrift","Source Han Sans SC","PingFang SC",sans-serif; font-variant-numeric:tabular-nums; }
#page .sticky { margin-top:20px; }
#page .scroll-y { display:block; overflow:auto; scrollbar-width:thin; scrollbar-color:#c3ced7 transparent; }
#page .scroll-x { display:block; overflow-x:auto; }
#page canvas { display:none; }
#page img { max-width:100%; object-fit:contain; }
#page .track { background:#eaf0f3; height:7px; border-radius:5px; }
#page .bar { background:var(--teal); }
#page .progress-complete { color:var(--teal); }
#page .bar.bar-complete { background:var(--teal); }
#page .analysis-hero { background:var(--navy); border-radius:9px; padding:24px; }
#page .analysis-hero .analysis-sum { color:#fff; font-size:32px; }
#page .analysis-hero .line,#page .analysis-label { color:#c1d3df; }
#page .analysis-hero .muted { color:#c1d3df; }
#page .admin-intro { padding:0 0 4px; border-radius:0; background:transparent; color:var(--text); }
#page .admin-identity { color:var(--muted); font-size:13px; margin-top:7px; }
#page .admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
#page button.pane-button { width:100%; min-height:110px; text-align:left; padding:22px; }
#page .pane-title { font-size:16px; }
#page .admin-list { max-height:420px; }
#page .import-list { max-height:300px; }
#page .import-box { padding:18px; background:#f4f8fa; border:1px solid #e3ebef; border-radius:7px; }
#page .admin-row,#page .order-row { padding:14px 0; border-top:1px solid #e8edf1; }
#page .category-actions { gap:8px; }
#page .category-actions .category-remove { color:var(--danger); }
#page .overlay { z-index:90; padding-left:248px; align-items:stretch; justify-content:flex-end; background:#132c4161; }
#page .overlay .panel { width:min(680px,100%); max-height:100vh; height:100vh; border:0; border-left:1px solid var(--border); border-radius:0; padding:28px; overflow:auto; }
#page .overlay .order-sheet { max-height:100vh; }
#page .rank-row+.rank-row { margin-top:16px; }
#page .rank-row .bar-label { font-size:13px; }
#page .filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; padding:18px; }
#page .filters>.field,#page .filters>.grid,#page .filters>.lead { margin-top:0; }
#page .filters>.field { min-width:180px; }
#page .filters>.grid { display:flex; flex:1; }
#page .filters .input { min-width:150px; }
#page .proof-canvas { display:none; }
#page .proof-tile { border-color:var(--border); }
#page .proof-preview { border:0; background:#f7f9fb; color:var(--muted); }
#page .attachment { min-height:96px; border:1px dashed #b9c9d5; border-radius:7px; background:#f8fafb; color:var(--teal); }
#page .attachment-image { height:110px; }
#page .upload-slot { border-radius:7px; border-color:var(--border); }
#page .upload-slot-selected { border-color:var(--teal); background:var(--teal-soft); }
#page .report-block { border-radius:7px; }
#page .order-right { white-space:nowrap; }
#page .route-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.dashboard { display:flex; flex-direction:column; gap:22px; }
.dashboard-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dashboard-toolbar label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.dashboard-toolbar select,.dashboard-toolbar input { min-height:36px; padding:7px 11px; border:1px solid var(--border); border-radius:5px; background:#fff; color:var(--text); font:inherit; }
.dashboard-toolbar .toolbar-period { margin-left:auto; color:var(--muted); font-size:13px; }
.dashboard-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.metric-card { display:flex; flex-direction:column; min-width:0; padding:20px 22px; border:1px solid var(--border); border-radius:9px; background:#fff; }
.metric-label { color:var(--muted); font-size:13px; }
.metric-value { display:block; margin-top:9px; color:var(--teal); font-size:clamp(23px,2vw,32px); font-weight:650; line-height:1.25; white-space:nowrap; letter-spacing:-.5px; }
.metric-value small { font:500 14px "Source Han Sans SC","PingFang SC",sans-serif; margin-left:5px; color:var(--muted); letter-spacing:0; }
.metric-meta { margin-top:10px; color:#84909c; font-size:12px; }
.dashboard-columns { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,1fr); gap:22px; align-items:stretch; }
.dashboard-bottom { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.dashboard-panel { min-width:0; border:1px solid var(--border); border-radius:9px; background:#fff; overflow:hidden; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:62px; padding:17px 22px 12px; }
.panel-title { margin:0; font-size:16px; color:var(--text); font-weight:650; }
.panel-action { border:0; padding:3px 0; background:transparent; color:var(--teal); font-size:12px; white-space:nowrap; }
.panel-caption { color:var(--muted); font-size:12px; }
.chart-wrap { min-height:220px; padding:8px 20px 16px; overflow:hidden; }
.chart-wrap svg { display:block; width:100%; height:225px; overflow:visible; }
.chart-grid { stroke:#e7edf2; stroke-width:1; }
.chart-line { fill:none; stroke:var(--teal); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.chart-axis { fill:#7c8995; font-size:11px; font-family:"DIN Alternate","PingFang SC",sans-serif; }
.chart-point { fill:#fff; stroke:var(--teal); stroke-width:2; }
.chart-legend { display:flex; gap:7px; align-items:center; margin:2px 0 8px 22px; color:var(--muted); font-size:12px; }
.chart-legend::before { content:""; width:15px; height:3px; background:var(--teal); border-radius:3px; }
.process-list { padding:0 22px 12px; }
.process-item { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:12px 0; border-top:1px solid #edf1f5; }
.process-item:first-child { border-top:0; }
.process-item span { color:var(--muted); font-size:13px; }
.process-item strong { color:var(--text); font-size:19px; font-weight:600; font-variant-numeric:tabular-nums; }
.table-wrap { overflow-x:auto; padding:0 22px 18px; }
.data-table { width:100%; border-collapse:collapse; text-align:left; white-space:nowrap; font-size:13px; }
.data-table th { padding:10px 13px; background:#f3f6f9; color:#627182; font-size:12px; font-weight:550; }
.data-table th:first-child { border-radius:5px 0 0 5px; }
.data-table th:last-child { border-radius:0 5px 5px 0; }
.data-table td { padding:13px; border-bottom:1px solid #edf1f4; color:#374858; }
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:#f8fafb; }
.data-table .amount { font-weight:600; color:var(--text); }
.data-table button { color:var(--teal); background:transparent; padding:4px 0; border:0; font-size:12px; }
.data-table .align-right { text-align:right; }
.dashboard-empty { padding:35px 20px; color:#8794a0; font-size:13px; text-align:center; }
.dashboard-error { border:1px solid #e5cccc; background:#fff7f6; color:var(--danger); border-radius:6px; padding:12px 16px; }
.login-screen { display:flex; align-items:center; justify-content:center; gap:110px; min-height:100vh; padding:56px; background:#edf2f5; }
.login-brand { max-width:420px; align-self:center; }
.login-brand .wordmark { color:var(--navy); font-size:20px; font-weight:650; white-space:nowrap; }
.login-brand h1 { color:var(--navy); font-size:38px; line-height:1.5; font-weight:600; letter-spacing:-1px; }
.login-brand-description { max-width:310px; color:var(--muted); font-size:15px; line-height:1.9; }
.login-brand-rule { width:48px; height:3px; background:var(--teal); margin:35px 0 18px; }
.login-brand-footer { color:#87949e; font-size:12px; }
.signin-panel { width:384px; flex:none; padding:32px 34px 25px; border:1px solid #dbe4eb; border-radius:12px; background:#fff; text-align:center; box-shadow:0 8px 35px #17324d06; }
.login-symbol { display:grid; place-items:center; margin:0 auto 10px; width:42px; height:42px; border-radius:10px; color:var(--teal); background:var(--teal-soft); }
.login-symbol .icon { width:25px; height:25px; }
.signin-panel h2 { margin:0 0 12px; color:var(--navy); font-size:23px; font-weight:650; }
.signin-panel p { color:var(--muted); font-size:13px; line-height:1.8; }
#login-instruction { min-height:46px; margin:0 0 17px; }
.qr-frame { display:grid; place-items:center; min-height:246px; padding:10px; background:#fafcfd; border:1px solid #e4ebef; border-radius:8px; }
.qr-frame img { display:block; width:224px; height:224px; max-width:100%; object-fit:contain; }
#login-code { margin:15px 0 10px; padding:7px 12px; color:var(--teal); background:var(--teal-soft); border-radius:5px; font-variant-numeric:tabular-nums; font-size:15px; font-weight:550; letter-spacing:1px; }
#login-status { color:var(--danger); margin:12px 0; }
#start-login { min-height:39px; margin:9px auto 0; width:100%; padding:8px 16px; border:1px solid #bdd7d3; border-radius:6px; background:#fff; color:var(--teal); font-size:13px; }
#start-login:hover:not(:disabled) { background:var(--teal-soft); }
.signin-panel .login-footnote { margin:18px 0 0; color:#89949d; font-size:11px; }
.toast { position:fixed; z-index:200; left:calc(50% + 124px); bottom:28px; max-width:80vw; transform:translateX(-50%); padding:11px 20px; border-radius:7px; background:var(--navy); color:#fff; box-shadow:0 3px 12px #17324d1a; font-size:13px; }
dialog { max-width:92vw; max-height:94vh; border:0; border-radius:10px; padding:20px; }
dialog::backdrop { background:#10293fbb; }
dialog form { text-align:right; }
dialog button { border:0; padding:4px 8px; color:var(--muted); background:transparent; font-size:22px; }
dialog img { display:block; max-width:82vw; max-height:78vh; object-fit:contain; }
@media (min-width:1600px) {
  #page { padding:30px 36px 52px; }
  .masthead { padding-inline:36px; }
  .metric-card { padding:24px 26px; }
}
@media (max-width:1180px) {
  .desktop-sidebar { width:224px; }
  .desktop-main { margin-left:224px; }
  .sidebar-brand { padding-inline:15px; }
  .sidebar-brand-name { font-size:17px; letter-spacing:-.7px; }
  .sidebar-footer { margin-inline:14px; gap:8px; }
  .sidebar-footer span { font-size:11px; }
  .dashboard-metrics { gap:12px; }
  .metric-card { padding:17px 15px; }
  .metric-value { font-size:25px; }
  .dashboard-columns { grid-template-columns:minmax(0,1.7fr) minmax(230px,1fr); gap:18px; }
  .dashboard-bottom { gap:18px; }
  #page { padding-inline:22px; }
  #page .overlay { padding-left:224px; }
  .masthead { padding-inline:22px; gap:12px; }
  .account-label { font-size:12px; }
  .toast { left:calc(50% + 112px); }
  .login-screen { gap:60px; }
}
@media (max-width:900px) {
  .desktop-sidebar { width:248px; transform:translateX(-100%); transition:transform .18s ease; box-shadow:12px 0 30px #10293f2b; }
  .desktop-sidebar.is-open { transform:translateX(0); }
  .desktop-main { margin-left:0; }
  .nav-toggle { display:flex; }
  .masthead { min-height:64px; }
  .masthead strong { font-size:17px; }
  .account-label { display:none; }
  .sidebar-brand-name { font-size:18px; letter-spacing:-.5px; }
  .sidebar-brand { padding-inline:20px; }
  .sidebar-footer span { font-size:12px; }
  .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-columns,.dashboard-bottom { grid-template-columns:minmax(0,1fr); }
  .dashboard-toolbar .toolbar-period { margin-left:0; }
  #page .overlay { padding-left:0; }
  #page .admin-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .login-screen { padding:32px; gap:32px; }
  .login-brand { max-width:280px; }
  .login-brand .wordmark { font-size:17px; }
  .login-brand h1 { font-size:29px; }
  .signin-panel { width:350px; padding:28px; }
  .toast { left:50%; }
}
@media (max-width:600px) {
  #page { padding:20px 16px 36px; }
  .masthead { gap:10px; padding-inline:16px; }
  .masthead strong { font-size:16px; }
  .masthead #web-logout { padding-left:12px; }
  .masthead label { font-size:0; }
  .masthead select { max-width:88px; font-size:12px; }
  .preview-label { padding-inline:16px; }
  .dashboard { gap:16px; }
  .dashboard-metrics { gap:10px; }
  .metric-card { padding:16px 13px; }
  .metric-label { font-size:12px; }
  .metric-value { font-size:22px; }
  .metric-meta { font-size:11px; }
  .panel-heading { padding:16px 16px 10px; }
  .table-wrap { padding-inline:12px; }
  .process-list { padding-inline:16px; }
  .dashboard-toolbar { gap:10px; }
  .dashboard-toolbar label { font-size:12px; }
  .dashboard-toolbar input { max-width:145px; }
  #page .grid { grid-template-columns:minmax(0,1fr); }
  #page .admin-grid { grid-template-columns:minmax(0,1fr); }
  #page .panel { padding:18px; }
  #page .filters { display:block; }
  #page .filters>.field,#page .filters>.grid,#page .filters>.lead { margin-top:12px; }
  #page .category-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
  #page .category-actions .admin-small { padding:5px 7px; }
  #page .segment { overflow-x:auto; }
  #page .segment button { min-width:74px; padding-inline:9px; }
  #page .overlay .panel { width:100%; padding:20px; }
  .login-screen { flex-direction:column; gap:26px; padding:30px 18px; }
  .login-brand { width:100%; max-width:384px; text-align:center; }
  .login-brand .wordmark { font-size:17px; margin:0; }
  .login-brand h1,.login-brand-description,.login-brand-rule,.login-brand-footer { display:none; }
  .signin-panel { width:min(100%,384px); padding:27px 25px 24px; }
  .toast { max-width:90vw; }
}

/* Desktop business views use the same spacing and scale as the approved overview. */
.dashboard-toolbar { margin-bottom:22px; }
.dashboard-toolbar .page-title { margin:0 auto 0 0; font-size:23px; font-weight:650; }
.dashboard-toolbar .input { width:auto; max-width:190px; }
#page .sales-chart { display:block; width:100%; height:auto; }
.table-pagination { display:flex; gap:20px; justify-content:flex-end; align-items:center; padding:0 22px 20px; }
.dashboard-quick-actions { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 22px; }
.dashboard-quick-actions button { width:auto; min-width:160px; }
.order-detail-dialog { width:min(740px,92vw); max-height:88vh; overflow:auto; padding:0 24px 24px; border:1px solid var(--border); border-radius:12px; color:var(--text); }
.order-detail-dialog::backdrop { background:#17324d66; }
.order-detail-dialog > .panel-heading { padding-left:0; padding-right:0; }
.detail-proof { display:block; max-width:100%; height:auto; margin-top:18px; }
@media(max-width:700px) { .dashboard-toolbar .page-title { width:100%; } .table-pagination { justify-content:center; gap:12px; } }
