/* Shared review theme: quiet surfaces, clear hierarchy, compact daily work. */
:root {
  --paper: #f3f5f8;
  --ink: #202a39;
  --ink-2: #536174;
  --blue: #1769ce;
  --line: #e4e9ef;
  --line-strong: #d7dfe8;
  --shadow-soft: 0 2px 6px rgba(28,45,70,.025);
  --display: "SF Pro Display", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}
html,body { background: var(--paper); color: var(--ink); }
body { line-height: 1.5; }
.ambient-grid { display: none; }
button,summary,a,input,select,textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible,summary:focus-visible,a:focus-visible { outline: 3px solid #81b2ec; outline-offset: 3px; }
input:focus,select:focus,textarea:focus { border-color: #4991e7; box-shadow: 0 0 0 3px #e7f0fb; }
button:disabled { cursor: default; opacity: .55; }
input,select,textarea { min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink); }
input,select { min-height: 44px; padding: 10px 12px; }
label { color: #526071; font-size: 12px; gap: 6px; }
.button { min-height: 44px; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 650; }
.button:hover { transform: none; box-shadow: none; }
.button-primary,.button-blue { background: #1769ce; }
.button-ghost { background: #fff; border-color: var(--line-strong); }
.sidebar { width: 220px; padding: 25px 14px 18px; background: #fafbfd; backdrop-filter: none; border-right: 1px solid var(--line); }
.sidebar-brand { padding: 0 10px 18px; }
.brand-stamp { box-shadow: 0 4px 12px #1769ce20; }
.environment-chip { font-size: 10px; background: #eaf4ee; margin-bottom: 20px; }
.desktop-nav-items { gap: 3px; }
.text-nav .nav-button { border-radius: 9px; min-height: 42px; font-size: 13px; font-weight: 550; }
.text-nav .nav-button.active { font-weight: 750; }
.sidebar-user { padding-top: 14px; }
.sidebar-user small { font-size: 10px; line-height: 1.4; }
.main-area { margin-left: 220px; padding: 0 32px 40px; max-width: 1700px; }
.topbar { min-height: 86px; background: #f3f5f8f2; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h2 { font-size: 28px; line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.topbar .eyebrow { font-size: 9px; margin-bottom: 5px; color: #778798; letter-spacing: .15em; }
.topbar-actions { gap: 10px; }
.icon-button { width: 40px; height: 40px; background: #fff; border-radius: 12px; }
.network-state { font-size: 11px; }
.icon-button.refresh-button,.icon-button.mobile-logout-button { font-size: 12px; font-weight: 600; }
.view-root { padding-top: 22px; }
.section-head,.manager-section-title { margin: 24px 0 12px; gap: 12px; }
.section-head.first { min-height: 0; margin: 0 0 16px; padding: 0; }
.section-head h3,.manager-section-title h3,.stock-panel-heading h3 { font-size: 19px; line-height: 1.4; font-weight: 700; }
.section-head p,.stock-panel-heading p { font-size: 12px; line-height: 1.6; color: #7a8695; margin-top: 4px; }
.panel,.order-card,.task-card,.demand-card,.message-card,.inventory-card,.product-card,.flow-summary-card,.flow-order-sheet { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-soft); background: #fff; }
.panel { padding: 22px; }
.order-card,.task-card,.demand-card,.message-card { padding: 16px; }
.order-card:hover,.task-card:hover,.demand-card:hover { transform: none; box-shadow: var(--shadow-soft); }
.card-list { gap: 10px; }
.metric-grid { gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card { min-height: 118px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); background: #fff; position: relative; }
.metric-card:first-child { background: #fff; }
.metric-card::after { content: '↗'; position: absolute; top: 14px; right: 16px; bottom: auto; width: auto; height: auto; border: 0; font-size: 18px; color: #93a5bb; }
.metric-card:hover { transform: none; background: #f8fbff; border-color: #abcaf0; box-shadow: none; }
.metric-card.signal { border-color: #f2c5bf; background: #fff6f4; }
.metric-label,.signal .metric-label { color: #637084; font-size: 12px; font-weight: 550; }
.metric-value { font-size: 32px; font-weight: 700; line-height: 1.2; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: 12px; font-weight: 500; margin-left: 6px; color: #7a8797; }
.metric-hint { font-size: 10px; font-weight: 500; margin-top: 5px; color: #7387a0; }
.split-layout { gap: 20px; }
.empty-state { min-height: 0; padding: 28px 16px; background: #fff; border: 1px dashed #d8e0e9; border-radius: 14px; }
.empty-state h3,.empty-state h4 { font-size: 16px; }
.empty-state p { font-size: 12px; line-height: 1.6; }
.empty-state { font-size: 12px; color: #7a8695; }
.empty-state strong { font-size: 16px; margin-bottom: 6px; }
.form-grid { gap: 14px; }
.form-grid > label,.outbound-picker > label { margin-bottom: 0; }
.card-meta { font-size: 12px; line-height: 1.6; }
.status-pill { font-size: 11px; font-weight: 650; padding: 5px 9px; }
.modal-panel { border: 1px solid var(--line); border-radius: 20px; background: #fbfcfe; padding: 24px; max-height: calc(100dvh - 40px); }
.modal-panel h3 { font-size: 23px; line-height: 1.35; padding-right: 28px; }
.modal-close { width: 40px; height: 40px; }
.modal-panel .form-grid { margin-top: 18px; }
.stock-sku-picker { border-radius: 14px; padding: 14px; background: #f8fafc; }
.stock-color-choice { font-size: 12px; border-radius: 10px; }
.stock-choice { min-height: 44px; font-size: 13px; }
.stock-record-option { min-height: 56px; }
.stock-record-option strong { font-size: 13px; }
.stock-record-option small { font-size: 11px; }
.stock-record-option b { font-size: 13px; }
.stock-record-option.selected,.stock-color-choice.selected,.stock-choice.selected { background: #edf5ff; box-shadow: none; border-color: #3784df; }
.manager-welcome { min-height: 160px; border-radius: 16px; padding: 24px; background: #194e87; box-shadow: none; }
.manager-welcome h3 { font-size: 25px; }
.manager-welcome p { font-size: 13px; }
.manager-metrics { gap: 12px; }
.manager-metrics > button { border-radius: 14px; border: 1px solid var(--line); box-shadow: none; padding: 16px; }
.manager-metrics strong { font-size: 30px; }
.login-card { border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 45px #24344d09; }
.login-card h2 { font-size: 28px; }
.outbound-panel { max-width: 1060px; margin: 0 auto; }
.outbound-picker { display: grid; gap: 18px; }
.outbound-panel .stock-panel-heading .eyebrow { display: none; }
.outbound-picker > label { max-width: 440px; }
.outbound-picker fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.outbound-picker legend { padding: 0 0 8px; font-size: 12px; color: #526071; }
.outbound-picker .stock-color-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
.outbound-picker .stock-color-choice { min-height: 62px; }
.out-color-placeholder { display: grid; place-items: center; width: 44px; height: 44px; background: #f0f3f7; border-radius: 8px; color: #8191a5; }
.outbound-picker .stock-choice { display: grid; gap: 5px; min-width: 72px; padding: 8px 12px; }
.outbound-picker .stock-choice small { font-size: 10px; font-weight: 500; color: #75869b; }
.outbound-lots { margin: 20px 0 12px; }
.outbound-lots .stock-record-option { grid-template-columns: minmax(0,1fr) auto; }
.outbound-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #edf5ff; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.outbound-summary > div { display: grid; gap: 4px; }
.outbound-summary small { color: #71849a; font-size: 11px; overflow-wrap: anywhere; }
.outbound-summary strong { font-size: 15px; }
.outbound-summary > span { font-size: 12px; color: #326ba5; white-space: nowrap; }
.outbound-summary b { font-size: 28px; font-variant-numeric: tabular-nums; }
.outbound-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.outbound-footer > span { font-size: 12px; color: #7a8695; }
@media(min-width:821px) and (max-width:1100px) {
  .sidebar { width: 190px; }
  .main-area { margin-left: 190px; padding-left: 22px; padding-right: 22px; }
  .split-layout,.admin-grid { grid-template-columns: 1fr; }
}
@media(max-width:820px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom,0px)); }
  .main-area { margin-left: 0; padding: 0 16px 20px; width: 100%; }
  .topbar { top: 0; min-height: calc(64px + env(safe-area-inset-top,0px)); padding: calc(10px + env(safe-area-inset-top,0px)) 0 10px; gap: 8px; }
  .topbar h2 { font-size: 23px; letter-spacing: -.02em; }
  .topbar .eyebrow { display: none; }
  .topbar-actions { gap: 6px; }
  .icon-button { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
  .network-state { display: none; }
  .topbar #install-button { font-size: 0; width: 44px; min-width: 44px; padding: 0; }
  .topbar #install-button::after { content: '安装'; font-size: 12px; }
  .view-root { padding-top: 16px; }
  .section-head.first { min-height: 0; margin-bottom: 14px; display: flex; align-items: center; }
  .section-head.first > div { flex: 1; min-width: 0; }
  .section-head.first > .flow-count { flex: 0 0 auto; align-self: flex-start; }
  .section-head h3 { font-size: 17px; }
  .section-head p { font-size: 11px; }
  .section-head { margin: 20px 0 10px; }
  .metric-grid { gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-card { min-height: 105px; padding: 13px 14px; border-radius: 13px; }
  .metric-value { font-size: 30px; margin-top: 7px; }
  .metric-label { font-size: 12px; }
  .metric-hint { font-size: 10px; margin-top: 4px; }
  .metric-card::after { top: 10px; right: 12px; font-size: 15px; }
  .split-layout { grid-template-columns: 1fr; gap: 0; }
  .panel { padding: 16px; border-radius: 15px; }
  .card-list { gap: 8px; }
  .empty-state { padding: 22px 14px; }
  .sidebar { inset: auto 10px calc(8px + env(safe-area-inset-bottom,0px)); height: 64px; width: auto; padding: 4px; border: 1px solid #dde5ef; border-radius: 18px; background: #fffffffa; box-shadow: 0 4px 22px #26384f10; overflow: visible; backdrop-filter: blur(12px); }
  .mobile-nav-items { grid-template-columns: repeat(var(--mobile-nav-count,5),minmax(0,1fr)); gap: 2px; }
  .text-nav .mobile-nav-items > .nav-button,.mobile-more-nav > summary { min-height: 54px; font-size: 12px; padding: 4px 2px; border-radius: 12px; justify-content: center; font-weight: 650; }
  .mobile-nav-items > .nav-button::before { display: none; }
  .mobile-nav-items .nav-button.active::after { display: none; }
  .mobile-nav-items .nav-button.active { background: #eaf3ff; color: #1769ce; }
  .mobile-nav-sheet { bottom: calc(82px + env(safe-area-inset-bottom,0px)); max-height: 65dvh; border-radius: 18px; background: #fff; }
  .mobile-nav-sheet section { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 12px 0; }
  .mobile-nav-sheet h4 { grid-column: 1/-1; font-size: 11px; color: #7a8695; }
  .mobile-nav-sheet .nav-button { min-height: 44px; font-size: 13px; background: #f5f7fa; }
  .mobile-nav-sheet header button { min-width: 44px; min-height: 44px; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  label { font-size: 12px; }
  input,select,textarea { font-size: 16px; min-height: 44px; }
  .form-grid .span-2 { grid-column: 1/-1; }
  .modal { padding: env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px); }
  .modal-panel { width: 100%; padding: 20px 16px; border-radius: 20px 20px 0 0; max-height: calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); overflow: auto; }
  .modal-panel h3 { font-size: 21px; }
  .modal-close { width: 44px; height: 44px; top: 12px; right: 12px; }
  .stock-panel-heading { gap: 8px; margin-bottom: 16px; }
  .stock-panel-heading h3 { font-size: 18px; }
  .stock-panel-heading > span { font-size: 11px; }
  .stock-record-option > b { display: block; }
  .stock-record-options { max-height: 200px; }
  .flow-detail-heading { padding: 16px; }
  .flow-detail-heading h4 { font-size: 17px; }
  .flow-detail-heading .eyebrow,.flow-stage-title .eyebrow,.flow-current-work .eyebrow { display: none; }
  .flow-detail-copy > b,.flow-detail-copy > strong { font-size: 12px; line-height: 1.5; }
  .flow-detail-copy > small { font-size: 10px; line-height: 1.5; }
  .flow-stat-strip { gap: 6px; padding: 12px; }
  .flow-stat-strip > span { padding: 10px; }
  .flow-stat-strip strong { font-size: 20px; }
  .flow-current-work { padding: 14px; }
  .stock-sku-summary strong { font-size: 13px; }
  .stock-sku-summary small,.stock-sku-summary span { font-size: 11px; }
  .stock-color-options,.outbound-picker .stock-color-options { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .stock-color-choice,.outbound-picker .stock-color-choice { grid-template-columns: 1fr; justify-items: center; gap: 4px; min-height: 74px; padding: 6px 3px; font-size: 11px; text-align: center; }
  .stock-color-choice img { width: 42px; height: 38px; object-fit: contain; }
  .stock-choice { min-width: 60px; font-size: 13px; }
  .outbound-summary { padding: 12px; }
  .outbound-summary strong { font-size: 13px; }
  .outbound-summary b { font-size: 23px; }
  .outbound-footer { gap: 8px; }
  .outbound-footer > span { font-size: 11px; }
  .outbound-footer .button { min-width: 148px; }
  .manager-welcome { padding: 20px; min-height: 0; grid-template-columns: 1fr; gap: 16px; }
  .manager-welcome h3 { font-size: 22px; }
  .manager-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .manager-metrics > button { padding: 14px; }
  .manager-metrics strong { font-size: 28px; }
  .login-screen.compact-login { padding: calc(24px + env(safe-area-inset-top,0px)) 18px 24px; gap: 20px; }
  .login-card { padding: 24px 20px; }
  .login-card h2 { font-size: 25px; }
  .test-flag { font-size: 10px; padding: 5px 8px; }
}
@media(max-width:360px) {
  .main-area { padding-left: 12px; padding-right: 12px; }
  .text-nav .mobile-nav-items > .nav-button,.mobile-more-nav > summary { font-size: 11px; }
  .outbound-summary { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
