:root {
  color-scheme: light;
  --canvas: #f6f7f8;
  --surface: #ffffff;
  --ink: #232931;
  --muted: #7d848e;
  --subtle: #a3a9b1;
  --line: #e9ebef;
  --line-strong: #dce0e6;
  --primary: #ce3d38;
  --primary-dark: #b7302c;
  --primary-soft: #fcf0ee;
  --green: #269674;
  --green-soft: #eaf6f0;
  --amber: #bd8427;
  --amber-soft: #fff6e7;
  --blue: #6080ac;
  --radius: 12px;
  --shadow: 0 2px 4px #26334803, 0 10px 24px #26334803;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 13px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 360px; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #ce3d3850; outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: #d98783 !important; box-shadow: 0 0 0 3px #ce3d3810; }
button:disabled { cursor: not-allowed; opacity: .43; transform: none !important; box-shadow: none !important; }
button, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
button > svg, .nav-item > svg, .icon-button svg, .stat-icon svg, .brand-mark svg,
.banner-icon svg, .search-box > svg, .part-icon svg, .activity-icon svg,
.empty-icon svg, .user-profile > svg, .search-trigger > svg, .sidebar-note > svg {
  width: 18px; height: 18px; stroke: currentColor;
}
button svg { vertical-align: middle; }
::selection { color: #812520; background: #f6d9d5; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d5d9df; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #bbc1ca; }
::-webkit-scrollbar-track { background: transparent; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 30;
  display: flex; flex-direction: column; padding: 27px 18px 18px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; min-height: 37px; }
.brand-mark {
  display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px;
  color: white; background: var(--primary); border-radius: 9px; font-weight: 750; font-size: 19px;
  box-shadow: 0 3px 6px #ce3d3815;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-copy strong { font-size: 17px; font-weight: 750; letter-spacing: -.45px; }
.brand-copy span, .brand-copy small { font-size: 10px; color: #9298a0; letter-spacing: .5px; }
.workspace-pill { display: flex; align-items: center; gap: 8px; padding: 10px 11px; margin: 30px 7px 29px; border: 1px solid var(--line); border-radius: 7px; color: #636b75; font-size: 12px; }
.workspace-pill > svg { width: 14px; height: 14px; color: #a0a6ae; }
.workspace-pill > svg:last-child { margin-left: auto; }
.workspace-pill .status-dot { width: 6px; height: 6px; }
.nav-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.nav-label { padding: 0 13px; margin-bottom: 8px; color: #a4a9b0; font-size: 10px; font-weight: 600; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 43px; width: 100%; padding: 0 13px;
  border: 0; border-radius: 7px; background: transparent; text-align: left;
  color: #727a85; font-size: 13px; transition: background .15s, color .15s;
}
.nav-item > svg { width: 18px; height: 18px; stroke-width: 1.7; }
.nav-item:hover { color: #343b45; background: #f6f7f9; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-count { margin-left: auto; padding: 2px 6px; border-radius: 4px; font-size: 10px; background: #eef0f3; color: #89909a; font-weight: 550; }
.nav-item.active .nav-count { background: #f7dedb; color: var(--primary); }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.sidebar-note { margin: 0 6px 23px; padding: 14px 12px; border-radius: 8px; background: #f8f9fa; border: 1px solid #eff0f3; font-size: 11px; line-height: 1.8; color: #9097a0; }
.sidebar-note > svg { width: 15px; height: 15px; display: block; margin-bottom: 8px; color: #8c96a3; }
.sidebar-note strong { color: #68717d; font-size: 11px; display: block; margin-bottom: 3px; font-weight: 550; }
.sidebar-note p { margin: 0; }
.user-profile { display: flex; align-items: center; gap: 10px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; color: #7c6552; background: #ede7df; font-size: 11px; font-weight: 700; }
.user-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user-copy strong { font-size: 11px; font-weight: 600; }
.user-copy span { color: #9aa0a8; font-size: 10px; }
.user-profile > svg { margin-left: auto; color: #adb3ba; width: 15px; height: 15px; }
.main-shell { margin-left: 232px; padding: 0 32px 25px; min-width: 0; }
.main-shell > * { max-width: 1500px; margin-left: auto; margin-right: auto; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #a0a6ae; font-size: 11px; }
.breadcrumb span:last-child { color: #737b85; }
.breadcrumb svg { width: 12px; height: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 6px; color: #8d959f; background: transparent; transition: .15s; }
.icon-button:hover { color: #424b58; border-color: var(--line); background: white; }
.icon-button .notification-dot { position: absolute; width: 5px; height: 5px; right: 7px; top: 6px; background: var(--primary); border: 1px solid var(--canvas); border-radius: 50%; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; color: #a68350; background: #f5f0e7; border: 1px solid #eee5d7; border-radius: 5px; font-size: 10px; font-weight: 500; white-space: nowrap; }
.demo-badge::before { content: ''; width: 5px; height: 5px; background: #c8a164; border-radius: 50%; }
.search-trigger { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #9da4ad; font-size: 11px; padding: 6px 0; }
.search-trigger > svg { width: 15px; height: 15px; }
.search-trigger kbd { padding: 2px 5px; border-radius: 3px; border: 1px solid #e2e5e9; font-size: 9px; font-family: inherit; }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 30px; padding-bottom: 26px; }
.eyebrow { margin: 0 0 7px; font-size: 10px; color: #9aa1ab; font-weight: 650; letter-spacing: 1.3px; text-transform: uppercase; }
.page-title { margin: 0; font-size: 28px; letter-spacing: -.8px; font-weight: 650; line-height: 1.45; }
.page-subtitle { margin: 8px 0 0; font-size: 12px; color: #949ba5; line-height: 1.7; }
.page-actions, .panel-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; font-size: 11px; font-weight: 550; line-height: 1.35; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.button > svg { width: 14px; height: 14px; stroke-width: 1.8; }
.button:hover { border-color: #c3c9d2; background: #fbfcfd; box-shadow: 0 2px 4px #20304204; }
.button:active { transform: translateY(1px); }
.button.primary { color: white; border-color: var(--primary); background: var(--primary); box-shadow: 0 2px 3px #ce3d3814; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.secondary { background: white; color: #606975; }
.button.subtle { border-color: transparent; color: #87909c; background: transparent; }
.button.subtle:hover { color: #4a5360; background: #f3f5f7; }
.button.danger { color: var(--primary); border-color: #f1d6d3; background: #fff7f6; }
.button.danger:hover { background: #fae8e5; }
.button.small { min-height: 29px; font-size: 10px; padding: 0 10px; }
.button.full-width { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 23px; }
.stat-card { position: relative; padding: 20px 20px 17px; overflow: hidden; border: 1px solid var(--line); background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; gap: 7px; color: #868e99; font-size: 11px; font-weight: 500; }
.stat-label svg { width: 13px; height: 13px; color: #b5bcc5; }
.stat-value { margin-top: 14px; margin-bottom: 10px; color: #2d3540; font-size: 31px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-value small { color: #acb2ba; margin-left: 7px; font-size: 10px; letter-spacing: 0; font-weight: 400; }
.stat-value .currency { color: #a6adb6; font-size: 20px; margin-right: 3px; font-weight: 400; }
.stat-bottom { display: flex; align-items: center; gap: 5px; color: #acb2ba; font-size: 10px; min-height: 16px; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-size: 10px; }
.stat-trend svg { width: 11px; height: 11px; }
.stat-icon { position: absolute; top: 17px; right: 18px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #969fab; background: #f5f7f9; }
.stat-icon svg { width: 14px; height: 14px; }
.stat-card:nth-child(2) .stat-icon { color: #71a18b; background: #f0f7f3; }
.stat-card:nth-child(3) .stat-icon { color: #a4876a; background: #f8f5f0; }
.stat-card:nth-child(4) .stat-icon { color: #8a9bb4; background: #f3f5f9; }
.sparkline { position: absolute; width: 79px; height: 30px; bottom: 19px; right: 16px; opacity: .72; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 20px; }
.content-stack, .side-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 20px 17px; }
.panel-title { margin: 0; font-size: 13px; font-weight: 650; line-height: 1.5; }
.panel-title > svg { width: 15px; height: 15px; margin-right: 7px; color: #98a0aa; vertical-align: -3px; }
.panel-subtitle { font-size: 10px; color: #a0a7b0; margin: 4px 0 0; line-height: 1.7; }
.panel-header .panel-subtitle { margin-top: 5px; }
.panel-actions .icon-button { width: 26px; height: 26px; }
.monitor-banner { display: flex; align-items: center; gap: 10px; margin: 0 20px 17px; padding: 11px 12px; color: #6d9b84; background: #f3faf6; border: 1px solid #e2f0e8; border-radius: 6px; }
.banner-icon { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 6px; background: #e4f3eb; color: #429a72; }
.banner-icon svg { width: 14px; height: 14px; }
.banner-copy { min-width: 0; font-size: 10px; line-height: 1.6; }
.banner-copy strong { font-weight: 550; color: #4f8065; font-size: 11px; }
.banner-copy span { margin-left: 8px; color: #86a491; }
.banner-copy p { margin: 2px 0 0; }
.monitor-banner > .button { margin-left: auto; min-height: 26px; padding: 0 8px; font-size: 10px; color: #799a87; border-color: #d7e9df; background: #fff9; }
.monitor-banner.paused { background: #fcf9f2; border-color: #eee7d7; color: #b08e52; }
.monitor-banner.paused .banner-icon { color: #b08e52; background: #f6eedc; }
.monitor-banner.paused .banner-copy strong { color: #9e834f; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.status-dot.pulse { box-shadow: 0 0 0 3px #26967412; animation: dot-pulse 2.5s infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 5px #26967403; } }
.tabs { display: flex; align-items: center; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 0 13px; margin-bottom: -1px; min-height: 32px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #939aa4; font-size: 11px; white-space: nowrap; }
.tab:hover { color: #5b6572; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-count { display: inline-flex; align-items: center; justify-content: center; padding: 1px 5px; min-width: 17px; line-height: 14px; border-radius: 4px; color: #a1a8b2; background: #f3f5f7; font-size: 9px; font-weight: 500; }
.tab.active .tab-count { color: var(--primary); background: #fcf0ed; }
.table-toolbar { display: flex; align-items: center; gap: 9px; padding: 15px 20px; }
.search-box { display: flex; align-items: center; gap: 7px; height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; background: white; min-width: 100px; }
.search-box > svg { width: 14px; height: 14px; color: #aab1ba; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #616c7a; font-size: 10px; }
.search-box input:focus-visible { box-shadow: none; }
.search-box:focus-within { border-color: #d5a09c; box-shadow: 0 0 0 2px #ce3d3808; }
.search-box input::placeholder { color: #afb5bd; }
.table-toolbar .search-box { width: 245px; }
.filter-select { height: 32px; max-width: 130px; padding: 0 24px 0 10px; border: 1px solid var(--line); border-radius: 5px; color: #838c98; background: white; font-size: 10px; cursor: pointer; }
.table-toolbar > .button:last-child, .table-toolbar > .icon-button:last-child { margin-left: auto; }
.table-wrap { width: 100%; overflow-x: auto; overflow-y: hidden; }
.material-table { width: 100%; min-width: 850px; border-collapse: collapse; white-space: nowrap; text-align: left; font-size: 11px; }
.material-table th { height: 37px; padding: 0 11px; border-top: 1px solid #f0f2f5; border-bottom: 1px solid var(--line); color: #9ca4ae; background: #fafbfc; font-size: 10px; font-weight: 500; }
.material-table td { height: 68px; padding: 12px 11px; border-bottom: 1px solid #f0f2f5; color: #636e7b; font-variant-numeric: tabular-nums; }
.material-table tbody tr { transition: background .15s; }
.material-table tbody tr:hover { background: #fcfcfd; }
.material-table tbody tr.selected { background: #fffbfa; }
.material-table tr:last-child td { border-bottom: 0; }
.material-table th:first-child, .material-table td:first-child { padding-left: 20px; padding-right: 7px; width: 30px; }
.material-table th:last-child, .material-table td:last-child { padding-right: 14px; width: 25px; }
/* Click-to-sort headers: arrow marks the active column and direction. */
.th-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sortable:hover { color: var(--text, #667487); }
.sort-ind { margin-left: 3px; font-size: 9px; color: var(--primary); }
/* Compact quantity inputs inside the submit-confirm table. */
.qty-input { min-height: 32px; padding: 6px 9px; width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
input[type='checkbox'] { width: 13px; height: 13px; margin: 0; accent-color: var(--primary); vertical-align: middle; cursor: pointer; }
.part-cell { display: flex; align-items: center; gap: 9px; }
.part-icon { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 6px; background: #f4f6f9; border: 1px solid #eef0f4; color: #97a3b4; }
.part-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }
.part-name { display: block; font-size: 11px; letter-spacing: -.1px; font-weight: 600; color: #424e60; }
.part-description { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; color: #a4acb7; font-size: 9px; margin-top: 5px; }
.cell-secondary { display: block; margin-top: 5px; color: #acb3bc; font-size: 9px; line-height: 1.5; }
.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; letter-spacing: -.25px; font-variant-numeric: tabular-nums; }
.price-over { color: var(--primary) !important; }
.material-table .stock-number { color: #455467; font-weight: 600; }
.material-table .stock-zero { color: #b6bdc5; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 500; line-height: 1.1; white-space: nowrap; }
.status-pill::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .65; }
.status-pill.ready, .status-pill.success { color: #5a9a7f; background: #edf7f1; }
.status-pill.warning { color: #b39461; background: #fcf6eb; }
.status-pill.muted { color: #a8afb9; background: #f4f6f8; }
.status-pill.neutral { color: #8296b0; background: #f0f4f9; }
.status-pill.danger { color: #c27470; background: #fcf0ee; }
.switch { position: relative; display: inline-block; flex: 0 0 28px; width: 28px; height: 16px; padding: 0; border: 0; border-radius: 12px; background: #dce1e7; transition: background .2s; vertical-align: middle; }
.switch::after { content: ''; position: absolute; width: 12px; height: 12px; top: 2px; left: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #00000012; transition: transform .2s; }
.switch.toggle-on, .switch[aria-checked='true'] { background: var(--primary); }
.switch.toggle-on::after, .switch[aria-checked='true']::after { transform: translateX(12px); }
.switch:disabled { opacity: .4; }
.row-actions { display: flex; align-items: center; justify-content: center; }
.row-actions .icon-button { width: 24px; height: 24px; }
.row-actions .icon-button svg { width: 14px; height: 14px; }
.progress-track { width: 59px; height: 3px; background: #edf0f3; border-radius: 3px; overflow: hidden; margin-top: 7px; }
.progress-fill { height: 100%; min-width: 0; border-radius: inherit; background: #abbccc; }
.progress-fill.complete { background: #88b6a0; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); color: #aab1bb; font-size: 9px; }
.table-footer > span, .table-footer > div { display: flex; align-items: center; gap: 7px; }
.table-footer .button { min-height: 25px; padding: 0 7px; font-size: 9px; }
.pagination { display: flex; gap: 6px; align-items: center; }
.pagination .icon-button { width: 24px; height: 24px; border: 1px solid var(--line); }
.pagination .current-page { display: grid; place-items: center; height: 24px; width: 24px; border-radius: 4px; color: #758193; background: #f4f6f9; border: 1px solid #e9edf2; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; padding: 36px; color: #8a94a1; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: #f3f5f8; color: #abb6c4; margin-bottom: 16px; }
.empty-icon svg { width: 23px; height: 23px; }
.empty-state h3 { margin: 0 0 8px; font-size: 14px; color: #697583; font-weight: 550; }
.empty-state p { max-width: 330px; margin: 0 0 20px; font-size: 11px; line-height: 1.8; }

.quota-card { overflow: hidden; }
.quota-card .panel-header { padding-bottom: 5px; }
.quota-ring { position: relative; display: flex; align-items: center; justify-content: center; width: 156px; height: 156px; margin: 7px auto 12px; }
.quota-ring > svg { position: absolute; inset: 0; width: 156px; height: 156px; overflow: visible; }
.quota-center { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.quota-center strong { color: #364252; font-size: 26px; font-weight: 600; letter-spacing: -.8px; line-height: 1.2; }
.quota-center strong small { font-size: 12px; font-weight: 450; margin-left: 1px; }
.quota-center > span { color: #9ba4af; font-size: 9px; }
.quota-center .tiny { margin-top: 2px; }
.quota-legend { margin: 0 20px; padding-top: 3px; display: flex; flex-direction: column; gap: 11px; }
.legend-row { display: flex; align-items: center; gap: 7px; color: #8b95a2; font-size: 10px; }
.legend-row strong, .legend-row > span:last-child { margin-left: auto; color: #677486; font-weight: 500; font-variant-numeric: tabular-nums; }
.legend-row .text-muted { color: #a1a9b4; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; background: #cf5751; }
.legend-dot.green { background: #93b8a6; }
.legend-dot.amber { background: #dfc394; }
.legend-dot.muted { background: #e9edf2; }
.legend-dot.blue { background: #90a5c1; }
.quota-meter { height: 4px; margin: 13px 20px 0; background: #eff2f5; border-radius: 4px; overflow: hidden; }
.quota-meter > span { display: block; height: 100%; background: #93a8c1; border-radius: inherit; }
.quota-note { padding: 12px 13px; margin: 18px 20px 20px; border: 1px solid #eff1f4; border-radius: 6px; color: #9ba5b2; background: #fafbfd; font-size: 9px; line-height: 1.8; }
.quota-note svg { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
.quota-note strong { color: #8692a2; font-weight: 500; }
.policy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; color: #95a0ad; font-size: 10px; line-height: 1.55; }
.policy-row > strong, .policy-row > span:last-child { color: #617085; font-weight: 500; text-align: right; }
.policy-row small { display: block; font-size: 9px; color: #abb3bd; margin-top: 3px; }
.policy-row:last-child { padding-bottom: 18px; }
.policy-row .status-pill { font-size: 9px; }
.part-paused-chip { margin-left: 6px; padding: 2px 6px; vertical-align: 1px; }
/* 订单来源徽章（推送抢货/秒杀）与行内订阅铃铛点亮态，同 .status-pill.ready 色系。 */
.part-origin-chip { margin-left: 6px; padding: 2px 6px; vertical-align: 1px; }
.icon-button.grab-bell.grab-on { color: #34745a; }
.section-divider { border: 0; border-top: 1px solid var(--line); margin: 14px 20px; }
.activity-list { padding: 1px 20px 7px; }
.activity-item { position: relative; display: flex; gap: 10px; padding: 3px 0 19px; }
.activity-item:not(:last-child)::after { content: ''; position: absolute; top: 25px; bottom: 0; left: 10px; width: 1px; background: #edf0f4; }
.activity-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; color: #94a3b6; background: #f0f4f8; }
.activity-icon svg { width: 11px; height: 11px; stroke-width: 1.7; }
.activity-icon.success { color: #82ac98; background: #eff7f3; }
.activity-icon.warning { color: #c0a47d; background: #faf5ed; }
.activity-icon.danger { color: #ce817b; background: #fcf1ef; }
.activity-copy { min-width: 0; padding-top: 2px; font-size: 10px; color: #909baa; line-height: 1.7; }
.activity-copy strong { color: #68788c; font-size: 10px; font-weight: 550; }
.activity-copy p { margin: 3px 0 0; font-size: 9px; color: #abb3bd; overflow-wrap: anywhere; }
.activity-time { display: block; color: #b4bcc7; margin-top: 4px; font-size: 9px; }
.footer-note { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 22px; font-size: 9px; line-height: 1.7; color: #b3bac4; }
.footer-note > span { display: flex; align-items: center; gap: 5px; }
.footer-note svg { width: 11px; height: 11px; color: #a5b6aa; }

.strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.strategy-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.strategy-card .stat-icon { position: static; width: 34px; height: 34px; margin-bottom: 16px; }
.strategy-card h3 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.strategy-card p { margin: 0 0 20px; color: #939ca8; font-size: 11px; line-height: 1.8; }
.strategy-card .form-field + .form-field { margin-top: 18px; }
.strategy-card > .button:last-child { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-field > label, .form-field > .label { color: #677587; font-size: 11px; font-weight: 550; }
.form-field label .required { color: var(--primary); margin-left: 3px; }
.full-width { grid-column: 1 / -1; }
.field-hint { margin: 0; color: #a0aab7; font-size: 10px; line-height: 1.75; }
.field-hint.error { color: var(--primary); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: #59697d; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.input, .select { min-height: 37px; padding: 8px 11px; }
.select { cursor: pointer; }
.textarea { display: block; min-height: 115px; padding: 11px 12px; resize: vertical; line-height: 1.8; }
.input::placeholder, .textarea::placeholder { color: #b3bbc5; }
.input:disabled, .select:disabled, .textarea:disabled { background: #f6f8fa; color: #a6b0bd; cursor: not-allowed; }
.input-prefix { display: flex; align-items: center; position: relative; }
.input-prefix > span { position: absolute; left: 12px; color: #a0aab8; font-size: 12px; }
.input-prefix > .input { padding-left: 28px; }
.form-section { padding: 24px; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-title { display: block; margin: 0 0 18px; font-size: 13px; font-weight: 600; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); }
.order-card { margin: 0 20px 15px; border: 1px solid var(--line); border-radius: 8px; padding: 17px; }
.order-card:last-child { margin-bottom: 20px; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; }
.order-top strong { font-size: 11px; font-weight: 550; color: #5b6e86; }
.order-top small { color: #a2adba; margin-left: 10px; font-size: 10px; }
.order-items { display: flex; justify-content: space-between; gap: 16px; color: #778599; font-size: 11px; line-height: 1.8; }
.order-items strong { color: #43546b; font-weight: 550; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: #f2f5f8; color: #8d9bae; font-size: 10px; }
.chip svg { width: 11px; height: 11px; }
.code-block { margin: 0; padding: 16px; border-radius: 7px; background: #f6f8fa; border: 1px solid #e9eef3; color: #8190a4; font-family: Consolas, monospace; font-size: 11px; line-height: 1.9; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.connection-banner { display: flex; align-items: flex-start; gap: 12px; padding: 17px 20px; margin-bottom: 20px; color: #9d875c; background: #fcf8ef; border: 1px solid #f0e8d5; border-radius: 9px; font-size: 11px; line-height: 1.8; }
.connection-banner > svg { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.connection-banner strong { display: block; margin-bottom: 3px; color: #8f7750; font-weight: 550; }
.connection-banner p { margin: 0; }
.connection-banner .button { margin-left: auto; align-self: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 28px; background: #1f293b55; backdrop-filter: blur(3px); animation: backdrop-in .15s ease-out; }
.modal-backdrop[hidden] { display: none; }
.modal { display: flex; flex-direction: column; width: 570px; max-width: 100%; max-height: calc(100dvh - 56px); background: white; border: 1px solid #ffffff70; border-radius: 13px; box-shadow: 0 24px 100px #15233825, 0 8px 22px #15233815; animation: modal-in .2s ease-out; }
.modal.wide { width: 730px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 23px 25px 19px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.4px; }
.modal-header p { margin: 7px 0 0; color: #99a3b0; font-size: 11px; line-height: 1.75; }
.close-button { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 0; border-radius: 5px; background: transparent; color: #a1aab6; }
.close-button:hover { background: #f3f5f8; color: #5e6b7d; }
.close-button svg { width: 17px; height: 17px; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 23px 25px; }
.modal-body > p:first-child { margin-top: 0; }
.modal-body > p { color: #8d98a8; line-height: 1.8; font-size: 11px; }
.modal-footer { display: flex; justify-content: flex-end; align-items: center; flex-shrink: 0; gap: 9px; padding: 17px 25px; border-top: 1px solid var(--line); background: #fcfcfd; border-radius: 0 0 13px 13px; }
.modal-footer .button { min-height: 36px; padding: 0 16px; }
.modal-footer .field-hint { margin-right: auto; }
.import-preview { margin-top: 18px; padding: 13px; border: 1px solid #e3ebe6; border-radius: 6px; background: #f5faf7; color: #779985; font-size: 11px; line-height: 1.8; }
.import-preview.error { border-color: #f0dcda; color: #c27e77; background: #fff8f7; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; line-height: 1.7; color: #7f8c9e; }
.checkbox-row input { margin-top: 3px; flex-shrink: 0; }
.checkbox-row strong { font-weight: 550; color: #66778d; }
.checkbox-row small { display: block; font-size: 10px; color: #a0aab8; margin-top: 3px; }
.segmented { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #e9edf2; border-radius: 6px; background: #f6f8fa; }
.segmented-button { display: inline-flex; align-items: center; justify-content: center; min-height: 29px; padding: 0 15px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #97a2b0; font-size: 11px; }
.segmented-button.active { color: #697a90; background: white; border-color: #e6eaf0; box-shadow: 0 1px 3px #283d5806; }
.toast-stack { position: fixed; z-index: 200; right: 25px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; max-width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; width: max-content; max-width: 100%; border: 1px solid #e2e8ee; border-radius: 8px; background: white; box-shadow: 0 5px 15px #24364f0c, 0 15px 40px #24364f0b; color: #687b91; font-size: 11px; line-height: 1.7; pointer-events: auto; animation: toast-in .2s ease-out; }
.toast > svg { width: 16px; height: 16px; margin-top: 1px; }
.toast.success > svg { color: #6ca58c; }
.toast.warning > svg { color: #c1a26f; }
.toast.error > svg { color: #cd817a; }
.toast strong { display: block; color: #50657d; font-weight: 550; }
.toast p { margin: 3px 0 0; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chart-bars { display: flex; align-items: flex-end; gap: 5px; height: 85px; padding: 0 20px; }
.chart-bar { flex: 1; min-width: 3px; background: #e9edf2; border-radius: 3px 3px 0 0; }
.chart-bar.active { background: #d5918a; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 10px; color: #9aa6b5; }
.legend > span { display: flex; align-items: center; gap: 5px; }
.tiny { font-size: 9px; color: #a7b0bd; }
.text-muted { color: #a0a9b5 !important; }
.text-danger { color: #c56b63 !important; }
.text-success { color: #5e9f81 !important; }
.badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e9edf2; border-radius: 4px; padding: 3px 6px; color: #8d9aab; background: #fafbfd; font-size: 9px; white-space: nowrap; }
.badge.high { color: #bd827b; background: #fcf3f1; border-color: #f5e7e3; }
.badge.medium { color: #ae9975; background: #fbf8f2; border-color: #f2ecdf; }
.badge.low { color: #92a1b2; background: #f5f7fa; border-color: #eaf0f5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout and component details used by the interactive workbench. */
.mobile-menu { display: none; }
.breadcrumb strong { font-weight: 500; color: #6b7583; }
.workspace-pill { background: white; width: calc(100% - 14px); text-align: left; min-height: 53px; }
.workspace-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 6px; color: #8f7c6e; background: #f3eeea; font-weight: 600; font-size: 12px; }
.workspace-pill small { display: block; font-size: 9px; color: #a8adb5; margin-top: 4px; }
.note-icon { display: grid; place-items: center; height: 24px; width: 24px; border-radius: 6px; background: #efe9e1; color: #a39179; margin-bottom: 10px; }
.note-icon svg { width: 13px; height: 13px; }
.sidebar-note .button { padding: 0; min-height: 24px; color: #99897a; font-size: 10px; margin-top: 7px; }
.user-copy small { color: #9aa0a8; font-size: 10px; }
.user-profile > .icon-button { margin-left: auto; width: 22px; height: 26px; }
.small-avatar { width: 27px; height: 27px; flex-basis: 27px; font-size: 10px; }
.demo-badge:has(.status-dot)::before, .status-pill:has(.status-dot)::before, .status-pill:has(svg)::before { display: none; }
.demo-badge .status-dot { background: #c8a164; width: 5px; height: 5px; flex-basis: 5px; }
.status-pill .status-dot { width: 4px; height: 4px; flex-basis: 4px; background: currentColor; }
.status-pill svg { width: 11px; height: 11px; }
.button { font-size: 12px; }
.button.small { font-size: 11px; }
.button.subtle.small { font-size: 11px; }
.page-subtitle { color: #88919d; font-size: 13px; }
.stat-label { font-size: 12px; }
.stat-value > span { color: #a5adb7; font-size: 11px; font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.stat-bottom { font-size: 10px; color: #9da6b3; }
.stat-meter { margin-top: 15px; height: 3px; border-radius: 3px; background: #f1f3f6; overflow: hidden; }
.stat-meter i { display: block; height: 100%; border-radius: inherit; background: #99acbf; }
.stat-card:nth-child(2) .stat-meter i { background: #8bb69f; }
.stat-card:nth-child(3) .stat-meter i { background: #d7b791; }
.stat-card:nth-child(4) .stat-meter i { background: #baaaa6; }
.content-stack > .monitor-banner { margin: 0; padding: 17px 18px; min-height: 82px; gap: 12px; border-color: #ece4e0; background: #fffcfa; border-radius: 10px; }
.content-stack > .monitor-banner .banner-icon { width: 36px; height: 36px; flex-basis: 36px; color: #c66d60; background: #faede7; border-radius: 8px; }
.content-stack > .monitor-banner .banner-icon svg { width: 18px; height: 18px; }
.content-stack > .monitor-banner .banner-copy strong { display: block; color: #766961; font-size: 12px; font-weight: 600; }
.content-stack > .monitor-banner .banner-copy span { display: block; margin: 5px 0 0; color: #a59990; font-size: 11px; font-weight: 400; line-height: 1.6; }
.content-stack > .monitor-banner > .button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.content-stack > .monitor-banner > .button.primary { color: white; background: var(--primary); border-color: var(--primary); }
.content-stack > .monitor-banner > .button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.content-stack > .monitor-banner.is-running { border-color: #e1eee7; background: #f6fbf8; }
.content-stack > .monitor-banner.is-running .banner-icon { color: #529479; background: #e8f4ed; }
.content-stack > .monitor-banner.is-running .banner-copy strong { color: #537c68; }
.content-stack > .monitor-banner.is-running .banner-copy span { color: #8aa393; }
.content-stack > .monitor-banner.is-running > .button { color: #698c79; border-color: #d7e7dd; background: white; }
.panel-title { font-size: 14px; }
.panel-title .chip { margin-left: 5px; padding: 2px 6px; font-size: 10px; }
.panel-subtitle { font-size: 11px; }
.tab { font-size: 12px; }
.tab-count { font-size: 10px; }
.table-toolbar { justify-content: space-between; }
.search-box input { font-size: 11px; }
.material-table { font-size: 12px; }
.material-table th { font-size: 11px; }
.material-table td { height: 72px; padding-top: 13px; padding-bottom: 13px; }
.material-table td > strong { color: #546377; font-weight: 550; }
.part-cell { border: 0; background: transparent; padding: 0; font: inherit; text-align: left; }
.part-cell:hover .part-name { color: var(--primary); }
.part-name { font-size: 12px; }
.part-description { font-size: 10px; color: #98a4b2; }
.cell-secondary { font-size: 10px; color: #9fa9b6; }
.status-pill { font-size: 10px; padding: 5px 7px; }
.material-table td > .icon-button { width: 23px; height: 25px; }
.material-table td > .icon-button svg { width: 13px; height: 13px; }
.row-paused .part-name { color: #9ba6b4; }
.priority-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #96a1af; }
.priority-label > i { display: inline-block; height: 6px; width: 6px; background: #b6c2cf; border-radius: 50%; }
.priority-label.high { color: #bc8173; }
.priority-label.high > i { background: #d79a87; }
.priority-label.normal > i { background: #c6b996; }
.priority-label.low { color: #a8b0ba; }
.priority-label.low > i { background: #ced4db; }
.table-footer { font-size: 10px; }
.table-footer svg { width: 11px; height: 11px; }
.quota-center { position: relative; z-index: 1; }
.legend-row { font-size: 11px; }
.legend-row > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: #96a1b0; }
.legend-row small { color: #b0b8c2; font-size: 9px; font-weight: 400; }
.legend-dot.red { background: #ce3d38; }
.legend-dot.gray { background: #e6e5e3; }
.quota-note { display: flex; align-items: flex-start; gap: 5px; font-size: 10px; }
.quota-note svg { flex: 0 0 12px; margin: 3px 0 0; }
.quota-note.over-budget { color: #b48f57; background: #fffbf1; border-color: #f2e8d7; }
.order-quota { display: grid; grid-template-columns: 1fr auto; padding: 16px 20px 20px; border-top: 1px solid var(--line); gap: 0 12px; color: #98a3b2; font-size: 10px; }
.order-quota > strong { color: #788699; font-weight: 500; }
.order-quota small { color: #b2b9c3; font-weight: 400; font-size: 9px; }
.order-quota .quota-meter { grid-column: 1 / -1; margin: 10px 0 0; }
.quota-meter > i { display: block; height: 100%; border-radius: inherit; background: #a7b6c6; }
.policy-body { padding: 0 20px 15px; }
.policy-body .policy-row { padding: 8px 0; font-size: 10px; }
.policy-row > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.policy-row > span > svg { width: 12px; height: 12px; color: #a4afbd; }
.activity-copy > p { margin-top: 0; color: #919eaf; font-size: 11px; line-height: 1.8; }
.activity-time { font-size: 10px; margin-top: 5px; }
.full-activity { padding: 7px 24px 20px; }
.full-activity .activity-item { padding-bottom: 24px; }
.full-activity .activity-copy > p { font-size: 12px; }
.full-activity .activity-icon { width: 25px; height: 25px; flex-basis: 25px; }
.full-activity .activity-item:not(:last-child)::after { left: 12px; top: 28px; }
.footer-sep { padding: 0 6px; color: #d1d6dc; }
.footer-note a { display: inline-flex; align-items: center; gap: 4px; }
.footer-note a:hover { color: #8b99ac; }
.strategy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.strategy-card.panel { padding: 0; overflow: hidden; }
.strategy-card .panel-header { min-height: 65px; border-bottom: 1px solid var(--line); padding: 19px 24px; }
.strategy-card .form-section { padding: 24px; }
.strategy-card .form-field + .form-field { margin-top: 0; }
.strategy-card .quota-note { margin: 20px 0 0; padding: 13px; }
.strategy-card .form-section .policy-row { padding-left: 0; padding-right: 0; }
.strategy-card .section-divider { margin-left: 0; margin-right: 0; }
.form-field > span { color: #708095; font-size: 12px; font-weight: 500; }
.field-hint { font-size: 11px; }
.form-actions > .text-muted { margin-right: auto; font-size: 11px; }
.strategy-card .form-section > .form-actions { margin: 22px -24px -24px; }
.estimate-number { color: #61758e; font-weight: 600; font-size: 25px; padding-top: 3px; letter-spacing: -.6px; }
.estimate-number small { font-size: 10px; color: #a6b0be; margin-left: 8px; letter-spacing: 0; font-weight: 400; }
.rule-explanations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 25px; gap: 24px; }
.rule-explanations > div { min-width: 0; }
.rule-explanations > div > svg { display: block; width: 22px; height: 22px; padding: 4px; box-sizing: content-box; margin-bottom: 12px; color: #95aa9c; background: #f1f7f3; border-radius: 6px; }
.rule-explanations strong { display: block; color: #6b7d92; font-size: 12px; font-weight: 550; }
.rule-explanations p { margin: 7px 0 0; color: #9ca8b8; font-size: 11px; line-height: 1.85; }
.setting-paragraph { font-size: 12px !important; line-height: 1.9 !important; color: #8f9bab !important; margin: 0 0 17px; }
.setting-paragraph:last-child { margin-bottom: 0; }
.setup-steps { margin-top: 23px; }
.setup-steps p { display: flex; align-items: center; gap: 9px; color: #95a1b1; font-size: 11px; margin: 0 0 11px; line-height: 1.6; }
.setup-steps p > span { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; background: #f2f5f8; color: #a0afc0; font-size: 10px; }
.connection-banner { align-items: center; }
.connection-banner .banner-icon { width: 34px; height: 34px; flex-basis: 34px; color: #b79b6d; background: #f7efdd; }
.connection-banner .banner-copy strong { color: #9a8051; font-size: 12px; }
.connection-banner .banner-copy span { display: block; margin: 3px 0 0; color: #b19b77; font-size: 11px; }
.connection-banner > .status-pill { margin-left: auto; }
.modal-wide { width: 730px; }
.modal-open { overflow: hidden; }
.modal-footer > .text-muted:first-child, .modal-footer > .button:first-child:not(:last-child) { margin-right: auto; }
.modal-footer > .panel-actions { margin-left: auto; }
.checkbox-row { gap: 25px; }
.checkbox-row > label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.checkbox-row > label input { margin: 0; }
.form-error { font-size: 11px; color: #c4716b; line-height: 1.8; margin: 14px 0 0; }
.form-error:empty { display: none; }
.demo-fields { margin-top: 23px; padding: 15px; border: 1px solid #e9edf2; border-radius: 7px; background: #fbfcfd; }
.demo-fields summary { display: flex; align-items: center; gap: 7px; cursor: pointer; color: #8392a5; font-size: 11px; list-style: none; }
.demo-fields summary::after { content: '+'; margin-left: auto; font-size: 17px; color: #a2acb9; }
.demo-fields[open] summary::after { content: '−'; }
.demo-fields summary::-webkit-details-marker { display: none; }
.demo-fields summary svg { width: 14px; height: 14px; }
.demo-fields summary > span { color: #b2bac5; font-size: 10px; margin-left: 5px; }
.demo-fields > .form-grid { margin-top: 18px; }
.import-drop { position: relative; display: flex; align-items: center; flex-direction: column; padding: 23px 20px; border: 1px dashed #d6dde7; border-radius: 8px; background: #fafbfd; }
.import-drop:hover { border-color: #c88b82; background: #fffaf8; }
.import-drop .empty-icon { width: 35px; height: 35px; border-radius: 9px; margin-bottom: 11px; }
.import-drop .empty-icon svg { width: 19px; height: 19px; }
.import-drop strong { color: #77899f; font-size: 12px; font-weight: 550; }
.import-drop > span:last-of-type { color: #a7b1be; font-size: 10px; margin-top: 6px; }
.import-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-drop:focus-within { outline: 2px solid #ce3d3860; outline-offset: 3px; }
.import-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 9px; }
.import-label strong { color: #8392a5; font-size: 11px; font-weight: 500; }
.modal-body > .textarea + .field-hint { margin-top: 9px; }
.import-preview.has-errors { border-color: #f0dcda; color: #c27e77; background: #fff8f7; }
.import-preview ul { padding-left: 20px; margin: 8px 0 0; font-size: 11px; }
.preview-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.order-summary-id { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-bottom: 20px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-summary-id > svg { color: #a4b3c5; }
.order-summary-id strong { font-size: 12px; color: #6c809b; font-weight: 550; }
.order-summary-id .status-pill { margin-left: auto; }

@media (min-width: 1850px) {
  .main-shell { padding-left: 42px; padding-right: 42px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .material-table td { height: 73px; }
}
@media (max-width: 1280px) {
  .main-shell { padding-left: 25px; padding-right: 25px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding-left: 16px; padding-right: 16px; }
  .sparkline { width: 57px; opacity: .5; }
  .stat-bottom { font-size: 9px; }
  .page-title { font-size: 25px; }
  .strategy-grid { gap: 14px; }
  .strategy-card { padding: 18px; }
}
@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
  .side-stack .panel { height: 100%; }
  .side-stack .panel-header { padding: 17px 15px; }
  .quota-ring { width: 130px; height: 130px; margin-top: 0; }
  .quota-ring > svg { width: 130px; height: 130px; }
  .quota-center strong { font-size: 23px; }
  .quota-legend { margin: 0 15px; }
  .quota-note { margin: 14px 15px 16px; }
  .policy-row { padding-left: 15px; padding-right: 15px; }
  .activity-list { padding-left: 15px; padding-right: 15px; }
  .search-trigger { display: none; }
  .strategy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { width: 76px; padding: 22px 11px 15px; align-items: center; }
  .sidebar-brand { padding: 0; }
  .brand-copy, .workspace-pill, .nav-label, .nav-count, .sidebar-note, .user-copy, .user-profile > svg { display: none; }
  .nav-group { margin-top: 35px; margin-bottom: 0; width: 100%; gap: 9px; }
  .nav-group + .nav-group { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line); }
  .nav-item { display: flex; justify-content: center; padding: 0; width: 43px; height: 43px; min-height: 43px; margin-left: auto; margin-right: auto; font-size: 0; gap: 0; }
  .nav-item > span { display: none; }
  .nav-item > svg { width: 19px; height: 19px; }
  .sidebar-bottom { width: 100%; }
  .user-profile { justify-content: center; padding-left: 0; padding-right: 0; }
  .main-shell { margin-left: 76px; padding-left: 22px; padding-right: 22px; }
  .page-heading { padding-top: 26px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px 14px 14px; }
  .stat-value { font-size: 27px; }
  .stat-icon { right: 12px; top: 13px; width: 24px; height: 24px; }
  .stat-label { max-width: calc(100% - 20px); font-size: 10px; }
  .sparkline { display: none; }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-stack > .panel:last-child { grid-column: 1 / -1; }
  .side-stack > .panel:last-child .activity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .side-stack > .panel:last-child .activity-item::after { display: none; }
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 18px 18px 16px; }
  .stat-value { font-size: 29px; }
  .stat-icon { right: 16px; top: 16px; }
  .sparkline { display: block; width: 60px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .page-title { font-size: 26px; }
  .page-subtitle { font-size: 11px; }
  .topbar-actions { gap: 7px; }
  .strategy-grid { grid-template-columns: minmax(0, 1fr); }
  .monitor-banner { align-items: flex-start; }
  .banner-copy span { display: block; margin-left: 0; margin-top: 2px; }
  .monitor-banner > .button { flex-shrink: 0; align-self: center; }
  .table-toolbar { flex-wrap: wrap; }
  .table-toolbar .search-box { flex: 1; min-width: 150px; }
  .table-footer { flex-wrap: wrap; gap: 10px; }
  .footer-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .connection-banner { flex-wrap: wrap; }
  .connection-banner .button { margin-left: 29px; }
  .order-top { align-items: flex-start; }
  .order-top small { display: block; margin: 5px 0 0; }
}
@media (max-width: 600px) {
  .sidebar { inset: 0 0 auto; width: 100%; height: 60px; padding: 0 17px; flex-direction: row; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { min-width: 35px; }
  .brand-mark { width: 31px; height: 31px; flex-basis: 31px; border-radius: 8px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .nav-group { flex-direction: row; width: auto; margin: 0; gap: 7px; }
  .nav-group + .nav-group { margin: 0; padding: 0; border: 0; }
  .nav-item { width: 35px; height: 35px; min-height: 35px; border-radius: 6px; }
  .nav-item > svg { width: 17px; height: 17px; }
  .sidebar-bottom { width: auto; margin: 0; padding: 0; }
  .user-profile { border: 0; padding: 0; }
  .user-profile .avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 9px; }
  .main-shell { margin-left: 0; padding: 60px 16px 22px; }
  .topbar { height: 56px; }
  .breadcrumb { font-size: 10px; gap: 6px; }
  .topbar-actions .icon-button { width: 25px; height: 28px; }
  .demo-badge { padding: 4px 6px; font-size: 9px; }
  .page-heading { padding-top: 22px; padding-bottom: 22px; }
  .page-title { font-size: 25px; }
  .page-subtitle { max-width: 330px; }
  .page-actions { gap: 7px; }
  .page-actions .button { padding-left: 9px; padding-right: 9px; font-size: 10px; }
  .stats-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 18px; }
  .stat-card { min-height: 114px; padding: 17px 18px; }
  .stat-value { margin: 8px 0 7px; font-size: 28px; }
  .stat-label { font-size: 11px; }
  .stat-icon { width: 27px; height: 27px; top: 16px; right: 18px; }
  .stat-bottom { font-size: 10px; }
  .sparkline { width: 82px; bottom: 22px; right: 18px; opacity: .7; }
  .content-stack, .side-stack { gap: 16px; }
  .side-stack { display: flex; flex-direction: column; }
  .side-stack > .panel { width: 100%; }
  .side-stack > .panel:last-child .activity-list { display: block; }
  .side-stack > .panel:last-child .activity-item::after { display: block; }
  .panel-header { padding: 17px 15px 15px; }
  .panel-title { font-size: 12px; }
  .panel-subtitle { font-size: 9px; }
  .panel-actions { gap: 5px; }
  .panel-actions .button { padding: 0 7px; font-size: 9px; min-height: 28px; }
  .monitor-banner { margin-left: 15px; margin-right: 15px; padding: 10px; gap: 8px; }
  .banner-copy { font-size: 9px; }
  .banner-copy strong { font-size: 10px; }
  .tabs { padding: 0 15px; gap: 18px; overflow-x: auto; }
  .tab { font-size: 10px; }
  .table-toolbar { padding: 13px 15px; gap: 7px; }
  .table-toolbar .search-box { min-width: 135px; }
  .filter-select { max-width: 112px; }
  .table-toolbar > .button { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .material-table th:first-child, .material-table td:first-child { padding-left: 15px; }
  .table-footer { padding: 12px 15px; }
  .quota-ring { width: 156px; height: 156px; margin-top: 0; }
  .quota-ring > svg { width: 156px; height: 156px; }
  .quota-legend { margin: 0 20px; }
  .quota-note { margin: 17px 20px 20px; }
  .policy-row { padding-left: 20px; padding-right: 20px; }
  .activity-list { padding-left: 20px; padding-right: 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .form-section { padding: 20px; }
  .form-actions { padding: 16px 20px; }
  .modal-backdrop { padding: 14px; }
  .modal { max-height: calc(100dvh - 28px); }
  .modal-header { padding: 20px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 15px 20px; flex-wrap: wrap; }
  .modal-footer .field-hint { width: 100%; margin-bottom: 4px; }
  .toast-stack { right: 16px; bottom: 16px; }
  .order-card { margin-left: 15px; margin-right: 15px; }
  .order-items { flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .side-stack .policy-body { padding-left: 15px; padding-right: 15px; }
  .rule-explanations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mobile-menu { display: inline-flex; margin-right: 2px; }
  .sidebar .user-profile > .icon-button { display: none; }
  .mobile-open::before { content: ''; position: fixed; inset: 0; z-index: 25; background: #22314822; pointer-events: none; }
  .mobile-open .sidebar { width: 232px; align-items: stretch; padding: 27px 18px 18px; box-shadow: 8px 0 35px #2231480c; }
  .mobile-open .sidebar-brand { padding: 0 9px; }
  .mobile-open .brand-copy { display: flex; }
  .mobile-open .workspace-pill { display: flex; }
  .mobile-open .nav-group { margin-top: 0; margin-bottom: 28px; gap: 6px; padding: 0; border: 0; }
  .mobile-open .nav-label { display: block; }
  .mobile-open .nav-item { justify-content: flex-start; width: 100%; min-height: 43px; padding: 0 13px; gap: 12px; font-size: 13px; }
  .mobile-open .nav-item > span { display: block; }
  .mobile-open .nav-count { display: block; }
  .mobile-open .sidebar-note { display: block; }
  .mobile-open .user-profile { justify-content: flex-start; padding-left: 8px; padding-right: 8px; }
  .mobile-open .user-copy { display: flex; }
  .mobile-open .sidebar .user-profile > .icon-button { display: inline-flex; }
  .button { font-size: 11px; }
  .stat-label { font-size: 11px; }
  .panel-subtitle { font-size: 10px; }
  .rule-explanations { padding: 23px; gap: 20px; }
}
@media (max-width: 700px) {
  .strategy-grid { grid-template-columns: minmax(0, 1fr); }
  .content-stack > .monitor-banner { flex-wrap: wrap; }
  .content-stack > .monitor-banner .banner-copy { flex: 1; min-width: 140px; }
  .content-stack > .monitor-banner > .button { margin-left: auto; }
  .rule-explanations { gap: 22px; }
  .checkbox-row { flex-wrap: wrap; row-gap: 12px; }
}
@media (max-width: 600px) {
  .sidebar { inset: 0 auto 0 0; width: 232px; height: 100dvh; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 27px 18px 18px; transform: translateX(-100%); transition: transform .2s ease; border-right: 1px solid var(--line); border-bottom: 0; }
  .mobile-open .sidebar { transform: translateX(0); }
  .mobile-open .nav-group { flex-direction: column; width: 100%; }
  .mobile-open .nav-group + .nav-group { margin-top: 0; }
  .mobile-open .brand-mark { width: 35px; height: 35px; flex-basis: 35px; }
  .mobile-open .sidebar-bottom { margin-top: auto; width: 100%; padding-top: 30px; }
  .mobile-open .user-profile { border-top: 1px solid var(--line); padding-top: 16px; }
  .mobile-open .user-profile .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .main-shell { padding-top: 0; }
  .topbar { height: 62px; }
  .topbar .breadcrumb { gap: 5px; }
  .topbar .breadcrumb > span { display: none; }
  .topbar .breadcrumb > svg { display: none; }
  .topbar .breadcrumb strong { font-size: 11px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .small-avatar { width: 24px; height: 24px; flex-basis: 24px; }
  .page-actions .button { font-size: 11px; min-height: 36px; }
  .page-subtitle { font-size: 12px; }
  .stat-label { font-size: 12px; }
  .stat-value > span { font-size: 11px; }
  .stat-bottom { font-size: 11px; }
  .stat-card { min-height: 135px; }
  .stat-meter { margin-top: 13px; }
  .content-stack > .monitor-banner { padding: 16px; gap: 10px; }
  .content-stack > .monitor-banner .banner-copy { min-width: 0; }
  .content-stack > .monitor-banner .banner-copy strong { font-size: 12px; }
  .content-stack > .monitor-banner .banner-copy span { font-size: 10px; }
  .content-stack > .monitor-banner > .button { margin-left: 46px; min-height: 31px; }
  .panel-title { font-size: 13px; }
  .panel-subtitle { font-size: 10px; }
  .panel-actions .button { font-size: 10px; }
  .tab { font-size: 11px; }
  .tabs { gap: 16px; }
  .table-toolbar { gap: 7px; }
  .table-toolbar .panel-actions { gap: 2px; }
  .table-toolbar .panel-actions .button { padding-left: 5px; padding-right: 5px; font-size: 10px; }
  .table-toolbar .panel-actions .button > svg { width: 12px; height: 12px; }
  .table-toolbar .search-box { flex: 1; width: auto; min-width: 125px; }
  .table-toolbar .search-box input { font-size: 10px; }
  .material-table { font-size: 12px; }
  .part-name { font-size: 12px; }
  .part-description, .cell-secondary { font-size: 10px; }
  .legend-row { font-size: 11px; }
  .policy-body .policy-row { font-size: 11px; padding-top: 10px; padding-bottom: 10px; }
  .side-stack .policy-body { padding: 0 20px 17px; }
  .quota-note { font-size: 11px; }
  .strategy-card .panel-header { min-height: 61px; padding: 17px 20px; }
  .strategy-card .form-section { padding: 20px; }
  .strategy-card .form-section > .form-actions { margin: 22px -20px -20px; padding: 15px 20px; }
  .rule-explanations { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 23px; }
  .rule-explanations > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 11px; }
  .rule-explanations > div > svg { grid-row: 1 / 3; margin: 0; }
  .rule-explanations strong { align-self: center; }
  .rule-explanations p { grid-column: 2; margin-top: 6px; font-size: 11px; }
  .connection-banner { gap: 10px; padding: 16px; }
  .connection-banner .banner-copy { flex: 1; }
  .connection-banner > .status-pill { margin-left: 44px; }
  .connection-banner .banner-copy span { font-size: 10px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions > .text-muted { width: 100%; margin-bottom: 4px; }
  .modal-footer > .text-muted:first-child { width: 100%; margin-bottom: 3px; font-size: 10px; }
  .modal-footer .button { font-size: 11px; padding-left: 12px; padding-right: 12px; }
  .demo-fields { padding: 12px; }
  .demo-fields summary > span { font-size: 9px; margin-left: 0; }
  .modal-body .policy-row { padding-left: 0; padding-right: 0; }
  .order-summary-id strong { font-size: 11px; }
  .modal-body .quota-note { margin-left: 0; margin-right: 0; }
  .import-label .button { font-size: 10px; }
  .field-hint { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Keep operational information readable at small dashboard sizes. */
.page-subtitle, .panel-subtitle, .field-hint, .stat-bottom, .table-footer,
.part-description, .cell-secondary, .text-muted { color: #6e7c8d; }
.material-table th { color: #667487; }
.status-pill.ready { color: #34745a; }
.status-pill.warning { color: #8a652f; }
.status-pill.muted { color: #687888; }
.status-pill.neutral { color: #506b90; }
.quota-reset-hint { margin: 10px 0 0; color: #778495; font-size: 10px; line-height: 1.7; grid-column: 1 / -1; }

.credential-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.credential-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 18px 20px; margin-bottom: 26px; background: #f7f9fc; border: 1px solid #e7ecf2; border-radius: 9px; }
.credential-summary > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 12px; }
.credential-summary strong { font-size: 13px; overflow-wrap: anywhere; }
.credential-secret { display: flex; align-items: center; gap: 8px; }
.credential-secret input { min-width: 0; flex: 1; }
.credential-secret button { flex-shrink: 0; }
.credential-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
/* 推送抢货回调凭据：整行堆叠，code 任意断行，复制按钮固定行尾。 */
.webhook-creds { display: grid; gap: 12px; }
.webhook-cred { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; }
.webhook-cred-value { display: flex; align-items: center; gap: 10px; min-width: 0; }
.webhook-cred-value code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.webhook-cred-value .button { flex-shrink: 0; }
.credential-result { margin: 20px 0 0; font-size: 12px; line-height: 1.7; color: #42665c; }
.credential-result.is-error { color: #bd3535; }
.credential-footnote { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; border-top: 1px solid #edf0f4; margin-top: 20px; padding-top: 17px; font-size: 11px; line-height: 1.7; color: #6e7c8d; }
.credential-footnote a { color: #516d91; }
.credential-notice, .credential-clear-confirm { padding: 14px 18px; border: 1px solid #ecdac5; background: #fffaf4; border-radius: 8px; font-size: 12px; line-height: 1.8; margin: 0 0 20px; color: #835e31; }
.credential-clear-confirm { margin-top: 20px; margin-bottom: 0; }
.credential-clear-confirm p { margin: 0 0 10px; }
#credential-panel [hidden] { display: none; }
.cart-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.cart-toolbar { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cart-toolbar .field-hint { margin: 6px 0 0; }
.cart-row-selected > td { background: #fff6f4; }
.cart-add-search { width: 100%; height: 38px; }
.cart-add-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 0; }
.cart-add-candidates { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.cart-candidate-label { display: grid; gap: 6px; cursor: pointer; }
.cart-candidate-label small { max-width: 330px; white-space: normal; color: #6e7c8d; }
.cart-candidate-table { min-width: 500px; }
.checkout-issues { padding-left: 18px; margin: 12px 0; color: #8a652f; font-size: 12px; line-height: 1.8; }
#cart-checkout-review { border-top: 1px solid #edf0f4; margin-top: 16px; padding-top: 16px; font-size: 13px; }
@media (max-width: 720px) { .credential-summary { grid-template-columns: 1fr; gap: 16px; padding: 16px; } .credential-actions { gap: 8px; } }

/* Order execution mode switch and production submission records. */
.order-mode-switch { display: inline-flex; gap: 6px; padding: 3px; background: #f4f5f7; border: 1px solid var(--line); border-radius: 8px; }
.order-mode-switch .button { min-height: 26px; padding: 0 10px; font-size: 11px; border: 0; background: transparent; color: var(--muted); }
.order-mode-switch .button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #26334814; }
.order-mode-switch .button:not(:disabled):not(.active):hover { color: var(--ink); }
.monitor-banner.is-production { border-color: #f1d6d3; background: #fff8f6; }
.monitor-banner.is-production .banner-icon { color: var(--primary); background: var(--primary-soft); }
.monitor-banner.is-production .banner-copy strong { color: #8f4a44; }
.monitor-banner.is-production .banner-copy span { color: #a9827c; }
/* Flash-sale mode: the banner itself turns into a standing warning. */
.monitor-banner.is-flash { border-color: #efc8c2; background: #fff3f0; }
.monitor-banner.is-flash .banner-icon { color: #c0392b; background: #fbdeda; }
.monitor-banner.is-flash .banner-copy strong { color: #a03327; }
.monitor-banner.is-flash .banner-copy span { color: #b0756b; }
.monitor-banner.is-flash.is-running { border-color: #eec3bc; background: #fff1ed; }
.monitor-banner.is-flash.is-running .banner-icon { color: #c0392b; background: #fbdeda; }
.monitor-banner.is-flash.is-running .banner-copy strong { color: #a03327; }
.monitor-banner.is-flash.is-running .banner-copy span { color: #b0756b; }
#production-submissions { display: grid; gap: 10px; margin-top: 14px; font-size: 12px; }
#production-submissions > strong { font-size: 12px; }
.submission-record { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.submission-record.unknown, .submission-record.submitting { border-color: #eddcb8; background: var(--amber-soft); }
.submission-record.confirmed { border-color: #d8ece1; background: var(--green-soft); }
.submission-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.submission-head .mono { font-size: 12px; overflow-wrap: anywhere; }
.submission-head .button { margin-left: auto; }
.submit-obligation { margin-top: 14px; padding: 12px 14px; border: 1px solid #f1d6d3; border-radius: 8px; background: #fff8f6; color: #8f4a44; font-weight: 550; }
.submit-obligation input { margin-top: 4px; }

/* skillshub account gate: login / register shell and sidebar account card. */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 18px; }
.login-card { width: 100%; max-width: 400px; padding: 30px 30px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 11px; padding: 0 2px 4px; }
.login-checking { text-align: center; }
.login-checking .login-brand { justify-content: center; padding-bottom: 8px; }
.login-notice { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #eddcb8; border-radius: 8px; background: var(--amber-soft); color: #8a652f; font-size: 12px; line-height: 1.7; }
.login-tabs { display: inline-flex; gap: 6px; width: 100%; margin: 18px 0 20px; padding: 3px; background: #f4f5f7; border: 1px solid var(--line); border-radius: 8px; }
.login-tab { flex: 1; min-height: 30px; padding: 0 10px; font-size: 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.login-tab.active { background: var(--surface); color: var(--ink); font-weight: 550; box-shadow: 0 1px 2px #26334814; }
.login-tab:not(.active):not(:disabled):hover { color: var(--ink); }
.login-card form { display: grid; gap: 4px; }
.login-card form[hidden] { display: none; }
.login-card .form-grid { gap: 16px; }
.login-card .button.full-width { grid-column: auto; width: 100%; margin-top: 6px; }
.login-footnote { margin: 18px 0 0; color: #9298a0; font-size: 11px; line-height: 1.8; }
.login-footnote a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.register-note { margin: 10px 0 0; color: #8a652f; font-size: 11px; line-height: 1.7; }
#auth-register-panel[hidden] { display: none; }
.register-success { display: grid; gap: 12px; padding: 18px 2px 2px; }
.register-success[hidden] { display: none; }
.register-success-head { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
.register-success-mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #edf7f1; color: #34745a; font-size: 15px; font-weight: 600; }
.register-success-line { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.register-success-line strong { color: var(--ink); }
.register-success-email { color: #9298a0; }
.register-success-status { margin: 0; font-size: 12px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.register-success-hint { margin: 0; padding: 10px 12px; border: 1px solid #eddcb8; border-radius: 8px; background: var(--amber-soft); color: #8a652f; font-size: 11px; line-height: 1.8; }
.auth-profile > .user-copy { flex: 1 1 auto; margin-right: 2px; }
.auth-profile > .icon-button { margin-left: 0; width: 24px; height: 26px; }
.auth-profile > .icon-button svg { width: 14px; height: 14px; }

/* Payment reminder for submitted production orders (orders page banner). */
.connection-banner.payment-banner { border-color: #f1d6d3; background: #fff8f6; color: #a9766f; }
.connection-banner.payment-banner .banner-icon { color: var(--primary); background: var(--primary-soft); }
.connection-banner.payment-banner .banner-copy strong { color: #8f4a44; }
.connection-banner.payment-banner .banner-copy span { color: #a9827c; }

/* Live material table: inline "click to refresh" entry for never-queried rows. */
.cell-secondary .refresh-link { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: 10px; line-height: 1.5; cursor: pointer; text-align: left; }
.cell-secondary .refresh-link:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 2px; }
.cell-secondary .refresh-link:disabled { color: inherit; cursor: default; }

/* Readonly form controls (e.g. the OPN identity field while editing a part):
   same muted treatment as disabled, so users can see typing is not expected. */
.input[readonly], .textarea[readonly], .select[readonly] { background: #f6f8fa; color: #a6b0bd; cursor: default; }

/* Product catalog: embedded image thumbnails + named attribute columns. */
.thumb-cell { width: 62px; }
.product-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; display: block; background: #fbf6f1; border: 1px solid #eee0d6; }
.product-thumb.empty { display: flex; align-items: center; justify-content: center; color: #cdbbaa; }
.product-thumb.empty svg { width: 16px; height: 16px; }
.catalog-table .attr-size { white-space: normal; min-width: 150px; max-width: 240px; line-height: 1.5; }
.catalog-table td .quote-name { display: block; white-space: normal; }

/* cost detail modal */
.cost-meta{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin-bottom:14px;font-size:13px}
.cost-section{margin-top:16px}
.cost-section h4{font-size:13px;font-weight:700;margin:0 0 8px;color:var(--ink,#2b2118)}
.cost-table{font-size:12.5px;width:100%}
.cost-table th,.cost-table td{padding:6px 10px;text-align:left}
.cost-table tfoot td{height:auto;font-weight:700;color:var(--ink,#2b2118);border-top:1px solid var(--line);background:#fafbfc}
.cost-group{margin-bottom:10px}
.cost-group>strong{display:block;font-size:12.5px;margin-bottom:6px}
.cost-steps{display:flex;flex-wrap:wrap;gap:6px}
.cost-step{font-size:12px;padding:3px 10px;border:1px solid rgba(0,0,0,.1);border-radius:999px;background:rgba(0,0,0,.03)}
.cost-step.total{border-color:rgba(37,99,235,.35);background:rgba(37,99,235,.08)}
.cost-step.waste{border-color:rgba(217,119,6,.35);background:rgba(217,119,6,.08)}
.cost-fees{list-style:none;margin:0;padding:0;font-size:13px}
.cost-fees li{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.cost-summary{display:flex;flex-wrap:wrap;gap:10px 18px;font-size:13.5px}
.cost-summary strong{font-size:15px}
.cost-raw{max-height:320px;overflow:auto;font-size:12px;line-height:1.7}
.cost-raw-row{display:flex;flex-wrap:wrap;gap:4px 12px;padding:3px 0;border-bottom:1px solid rgba(0,0,0,.05)}
.cost-raw-row .mono{min-width:44px;color:rgba(0,0,0,.45)}
.modal-body .empty-state{padding:28px 16px}

/* image zoom */
.product-thumb[data-action]{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.product-thumb[data-action]:hover{transform:scale(1.1);box-shadow:0 4px 14px rgba(0,0,0,.2)}
.modal.image-modal{width:min(860px,92vw)}
.image-zoom{display:flex;justify-content:center;align-items:center;min-height:180px}
.image-zoom img{max-width:100%;max-height:72vh;border-radius:12px;object-fit:contain;box-shadow:0 8px 30px rgba(0,0,0,.14)}

/* 产品资料侧边栏分类子菜单 */
.catalog-subnav{display:flex;flex-direction:column;gap:2px;padding:0 7px 8px}
.catalog-sub-item{display:flex;align-items:center;gap:8px;min-height:33px;width:100%;padding:0 10px;border:0;border-radius:6px;background:transparent;text-align:left;color:#727a85;font-size:12.5px;cursor:pointer;transition:background .15s,color .15s}
.catalog-sub-item:hover{color:#343b45;background:#f6f7f9}
.catalog-sub-item.active{color:var(--primary);background:var(--primary-soft);font-weight:600}
.catalog-sub-item.sub{margin-left:16px;min-height:30px;font-size:12px}
.catalog-sub-item .nav-count{margin-left:auto}

/* 成本分析变体 ↔ 基础产品 关联标记 */
.rel-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#f1f3f6;border:1px solid #e3e7ec;color:#7a828d;font-size:11px;line-height:1.5;vertical-align:1px;white-space:nowrap}

/* 握把/功能头简化四列视图：成本分析直接铺在行内 */
.catalog-simple .cost-cell{min-width:420px;max-width:780px;font-size:12.5px}
.catalog-simple .cost-cell .cost-section{margin:0 0 10px}
.catalog-simple .cost-cell .cost-section h4{font-size:12px;margin:0 0 6px}
.catalog-simple .cost-cell .material-table th,.catalog-simple .cost-cell .material-table td{padding:4px 8px;font-size:12px}
.catalog-simple .cost-cell .cost-group{margin:0 0 6px}
.material-label{font-weight:700;margin:0 0 4px}
.material-toggles{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.material-expand-row>td{background:#fafbfc;border-top:1px dashed var(--line);padding:10px 14px}
.cost-figures{display:flex;flex-wrap:wrap;gap:4px 12px}
.cost-meta.compact{margin:4px 0 8px;gap:8px}

/* 四列简化视图：摘要行 + 原位展开明细（2026-09-17 第十二轮） */
.catalog-simple tbody td{vertical-align:top}
.cost-sum-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px;padding:4px 0;font-size:12.5px}
.cost-sum-line+.cost-sum-line{border-top:1px dashed var(--line)}
.cost-sum-line .sum-name{font-weight:600;font-size:13px}
.cost-sum-line .sum-sub{color:var(--muted);font-size:12px;margin-left:-6px}
.cost-sum-line .sum-fig{white-space:nowrap}
.cost-sum-line .sum-fig strong{font-size:13px}
.cost-sum-raw{display:block}
.cost-sum-raw .cost-figures{padding:2px 0}
.detail-toggle-wrap{margin-top:6px}
.material-divider{border:none;border-top:1px dashed var(--line);margin:12px 0}
.material-expand-row .cost-cell-body{max-width:920px}

/* ── 报价模块优化（2026-09-18）：行精简 + 实时算价 + 目录勾选 ── */
.quote-lines-table .cell-cost,.quote-lines-table .cell-parts{min-width:210px;max-width:280px}
.quote-lines-table .cost-input-row{display:flex;gap:4px;align-items:center}
.quote-lines-table .cost-input-row input{min-width:0;flex:1}
.quote-lines-table .currency-mini{width:58px;flex:none}
.cost-hint-wrap{margin-top:2px}
.cost-hint{font-size:11.5px;color:var(--muted)}
.cost-hint strong{font-weight:600}
.cost-hint.none{opacity:.75}
.cost-hint.warn{color:#c4716b;font-weight:600}
.quote-lines-table .cell-parts .part-row{display:flex;gap:4px;margin-bottom:4px;align-items:center}
.quote-lines-table .cell-parts .part-row:last-child{margin-bottom:0}
.quote-lines-table .cell-parts input{min-width:0}
.quote-lines-table .cell-parts input:not(.part-cost){flex:1}
.part-cost{width:76px;flex:none}
.pack-label{font-size:11px;color:var(--muted);flex:none}
.cell-quote{white-space:nowrap}
.quote-calc{font-size:12.5px}
.quote-calc.manual strong{color:#b45309}
.quote-calc.muted{color:var(--muted)}
.manual-tag{font-style:normal;font-size:10px;border:1px solid currentColor;border-radius:8px;padding:0 4px;margin-left:3px}
.quote-total{font-size:11.5px;color:var(--muted)}
.quote-pending{color:#b45309;font-size:11px}
.quote-table td.row-actions{white-space:nowrap}
.quote-table td.row-actions .button+.button{margin-left:4px}
.catalog-select-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom, 0px));z-index:60;display:flex;align-items:center;gap:10px;background:#1f2937;color:#fff;padding:10px 16px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.28)}
.catalog-select-bar .bar-count strong{font-size:15px}
.catalog-select-bar .button.subtle{background:transparent;border-color:#4b5563;color:#e5e7eb}
.catalog-table .col-check{width:34px;text-align:center}
.catalog-table td.col-check{text-align:center;vertical-align:middle}

/* ─── 第十八轮（2026-09-18）：全站易用性 + 引用上次报价 ─── */
.link-code{background:none;border:none;padding:0;color:var(--primary);font:inherit;font-weight:600;letter-spacing:.02em;cursor:pointer}
.link-code:hover{text-decoration:underline}
.quote-table td.cell-time{white-space:nowrap;color:var(--muted);font-size:12.5px}
.quote-table td.col-amount{text-align:right;font-variant-numeric:tabular-nums}
.quote-table th.col-amount{text-align:right}
.material-table tbody tr{transition:background .12s}
.material-table tbody tr:hover{background:#faf7f5}
#quote-lines tr td{vertical-align:middle}
.part-row{display:grid;grid-template-columns:minmax(96px,1fr) auto 84px;gap:6px;align-items:center;margin-bottom:6px}
.part-row:last-child{margin-bottom:0}
.part-row input{min-width:0}
.part-tag{font-size:11px;color:var(--muted);white-space:nowrap}
.part-cost{width:84px!important}
.pack-row{grid-template-columns:auto 84px}
.quote-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}
.quote-footer-left{display:flex;flex-direction:column;gap:4px;min-width:0}
.quote-total-line{font-size:17px;line-height:1.3}
.quote-total-line .srv-total{font-size:13px;color:var(--muted);font-weight:600}
.quote-footer-actions{display:flex;gap:8px;flex-wrap:wrap}
.quote-form .empty-state{padding:26px 16px}
.price-ref{margin-top:3px;font-size:11px;color:#8a6d3b;background:#fdf6ec;border:1px solid #f0e0c0;border-radius:6px;padding:1px 6px;display:inline-block}

/* ─── 第二十八轮（2026-09-21）：UI/UX 排版整理——全宽版心 / 侧栏底部上提 / 全站字号温和加大 ───
   仅桌面端（>900px）生效，移动端断点行为保持原样。 */
@media (min-width: 901px) {
  /* 版心铺满：1500px 居中上限 → 2260px，1920 屏内容贴满侧边栏右侧，只留 36px 呼吸边距 */
  .main-shell > * { max-width: 2260px; }
  .main-shell { padding-left: 36px; padding-right: 36px; padding-bottom: 28px; }
  /* 侧边栏：底部两块不再沉底（空洞消失），内容超高时可滚动 */
  .sidebar { overflow-y: auto; overflow-x: hidden; }
  .sidebar-bottom { margin-top: 26px; padding-top: 22px; }
  /* 侧栏字号 / 控件 */
  .brand-copy strong { font-size: 18px; }
  .brand-copy span, .brand-copy small { font-size: 11px; }
  .workspace-pill { font-size: 13px; }
  .workspace-pill small { font-size: 10px; }
  .nav-label { font-size: 11px; }
  .nav-item { font-size: 14px; min-height: 46px; }
  .nav-count { font-size: 11px; }
  .sidebar-note { font-size: 12.5px; }
  .sidebar-note strong { font-size: 12.5px; }
  .sidebar-note .button { font-size: 11.5px; }
  .user-profile .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
  .user-copy strong { font-size: 13px; }
  .user-copy span, .user-copy small { font-size: 12px; }
  .avatar { font-size: 12px; }
  /* 顶栏与页头 */
  .breadcrumb { font-size: 12px; }
  .search-trigger { font-size: 12px; }
  .search-trigger kbd { font-size: 10px; }
  .demo-badge { font-size: 11px; }
  .eyebrow { font-size: 11px; }
  .page-title { font-size: 30px; }
  .page-subtitle { font-size: 14px; }
  /* 按钮 / 面板 / 页签 */
  .button { font-size: 13px; }
  .button.small { font-size: 12px; }
  .button.subtle.small { font-size: 12px; }
  .panel-title { font-size: 15px; }
  .panel-subtitle { font-size: 12px; }
  .panel-title .chip { font-size: 11px; }
  .chip { font-size: 11px; }
  .tab { font-size: 13px; }
  .tab-count { font-size: 11px; }
  /* 列表表格 */
  .search-box input { font-size: 12px; }
  .filter-select { font-size: 11.5px; }
  .material-table { font-size: 13px; }
  .material-table th { font-size: 12px; }
  .part-name { font-size: 13px; }
  .part-description, .cell-secondary { font-size: 11px; }
  .status-pill { font-size: 11px; }
  .table-footer { font-size: 11px; }
  .badge { font-size: 10.5px; }
  .tiny { font-size: 10.5px; }
  /* 表单 */
  .form-field > label, .form-field > .label { font-size: 12.5px; }
  .form-field > span { font-size: 13px; }
  .input, .select { font-size: 13px; }
  .field-hint { font-size: 12px; }
  .empty-state h3 { font-size: 15px; }
  .empty-state p { font-size: 12px; }
  /* 弹框 / 提示 / 页脚 */
  .modal-header h2 { font-size: 19px; }
  .modal-header p, .modal-body > p { font-size: 12px; }
  .toast { font-size: 12px; }
  .footer-note { font-size: 11px; }
  .activity-copy { font-size: 11.5px; }
  .activity-copy > p { font-size: 11.5px; }
  .activity-time { font-size: 10.5px; }
  .legend-row { font-size: 11.5px; }
  .quota-note { font-size: 11px; }
  .code-block { font-size: 12px; }
  .estimate-number { font-size: 27px; }
}
