:root {
  --navy: #17191d;
  --navy-2: #272a30;
  --teal: #246b5b;
  --teal-soft: #e9f3ef;
  --mint: #d7ebe4;
  --amber: #b87921;
  --amber-soft: #f7ecd8;
  --red: #c8493d;
  --red-soft: #f9e7e4;
  --blue: #496de8;
  --blue-soft: #edf0fc;
  --ink: #17202a;
  --muted: #687083;
  --line: #ddd9d0;
  --bg: #f6f4ee;
  --surface: #fffdf8;
  --sidebar: #17191d;
  --sidebar-text: #f8f8f5;
  --shadow: 0 12px 32px rgba(25, 31, 38, .08);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { min-width: 0; color:var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  background:
    radial-gradient(circle at 16% 22%, rgba(46, 196, 162, .18), transparent 28%),
    linear-gradient(135deg, #0c253b 0 50%, #eff6f5 50%);
}
.login-brand { color: white; padding: 12vh 12vw 8vh 9vw; }
.brand-mark {
  width: 68px; height: 68px; display: grid; place-items: center; border-radius: 20px;
  color: white; background: linear-gradient(145deg, #19a98c, #087f6b);
  box-shadow: 0 16px 38px rgba(0,0,0,.22); font-size: 24px; font-weight: 900; letter-spacing: -.04em;
}
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; box-shadow: none; }
.login-brand .eyebrow { color: #62d6bd; margin-top: 48px; }
.login-brand h1 { font-size: clamp(44px, 4.2vw, 68px); line-height: 1.12; margin: 0 0 24px; letter-spacing: -.045em; }
.login-brand > p:not(.eyebrow) { max-width: 540px; color: #c4d5e2; font-size: 17px; line-height: 1.8; }
.login-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.login-features span { padding: 9px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #d8e6ef; font-size: 13px; }
.login-card {
  align-self: center; justify-self: center; width: min(420px, 80%); padding: 44px;
  border: 1px solid rgba(16,42,67,.08); border-radius: 24px; background: rgba(255,255,255,.92);
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.login-card h2 { margin: 0 0 32px; font-size: 30px; color: var(--navy); }
label { display: grid; gap: 8px; color: #465b6c; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 10px;
  padding: 11px 12px; outline: none; color: var(--ink); transition: .15s ease;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #4ab69f; box-shadow: 0 0 0 3px rgba(8,127,107,.11); }
.login-card label + label { margin-top: 18px; }
.login-card .button { margin-top: 26px; }
.login-hint { margin: 18px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 24px 16px 18px; color: var(--sidebar-text); background: var(--sidebar);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand strong { display: block; color: white; font-size: 14px; }
.sidebar-brand span { display: block; margin-top: 4px; color: #a9adb5; font-size: 10px; letter-spacing: .06em; }
#main-nav { display: grid; gap: 4px; padding: 22px 0; overflow-y: auto; }
.nav-section { margin: 15px 10px 5px; color: #8e939c; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 10px;
  padding: 10px 12px; color: #d5d7dc; background: transparent; text-align: left; font-size: 13px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: white; }
.nav-item.active { color: white; background: #383a40; box-shadow: none; }
.nav-icon { width: 22px; font-size: 16px; text-align: center; }
.center-item { min-height: 46px; font-size: 15px; font-weight: 800; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sync-state { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #b8d4cf; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: #36d4ad; box-shadow: 0 0 0 4px rgba(54,212,173,.13); }
.sidebar-foot small { display: block; margin-top: 7px; color: #66879b; font-size: 10px; }

.main { min-width: 0; }
.topbar {
  height: 80px; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 30px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
}
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:34px 30px 18px; }
.page-heading h1 { margin:0; color:var(--ink); font-size:30px; letter-spacing:-.035em; }
.page-heading .eyebrow { margin-bottom:6px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.menu-button { display:none; flex:0 0 auto; }
.search-wrap,.notice-wrap { position: relative; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(46vw, 650px); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.search-box input { border: 0; padding: 10px 0; background: transparent; box-shadow: none; font-size: 12px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--navy); font-size: 18px; }
.icon-button:hover { border-color: #a8c6c0; background: var(--teal-soft); }
.notice-button { position: relative; font-size: 13px; font-weight: 800; }
.notice-button span { position: absolute; right: -5px; top: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; color: white; background: var(--red); font-size: 10px; }
.top-popover { position: absolute; z-index: 40; right: 0; top: calc(100% + 10px); width: 390px; max-height: 520px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.search-results { left: 0; right: auto; width: 420px; }
.popover-head { display:flex; align-items:center; justify-content:space-between; padding:10px 11px; border-bottom:1px solid var(--line); }
.popover-head span { color:var(--muted); font-size:11px; }
.popover-item { width:100%; display:grid; grid-template-columns:58px 1fr; gap:10px; border:0; border-bottom:1px solid #edf2f4; padding:12px 10px; background:white; text-align:left; }
.popover-item:last-child { border-bottom:0; }
.popover-item:hover { background:var(--teal-soft); }
.popover-item > span { color:var(--teal); font-size:10px; font-weight:800; }
.popover-item strong,.popover-item small { display:block; }
.popover-item strong { color:var(--ink); font-size:12px; line-height:1.5; }
.popover-item small { margin-top:4px; color:var(--muted); font-size:10px; line-height:1.45; }
.popover-item.high > span { color:var(--red); }
.user-chip {
  display: grid; grid-template-columns: 34px auto; grid-template-rows: 17px 15px; column-gap: 9px;
  min-width: 130px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left;
}
.user-chip > span { grid-row: 1/3; width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 9px; font-size: 12px; }
.user-chip b { font-size: 12px; color: var(--ink); }
.user-chip small { color: var(--muted); font-size: 10px; }
.center-nav {
  position: static; z-index: 9; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin: 0 30px; padding: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.center-nav-title { display:none; }
.center-nav-links { display: flex; gap: 6px; overflow-x: auto; padding: 2px; }
.center-link { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 15px; background: transparent; color: var(--muted); font-size: 13px; }
.center-link:hover { background: var(--teal-soft); color: var(--teal); }
.center-link.active { border-color: var(--teal); background: transparent; color: var(--ink); font-weight: 800; }
.content { padding: 20px 30px 50px; }

.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-chip, .select-compact { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 8px 11px; color: var(--muted); font-size: 12px; }
.filter-chip.active { color: var(--teal); border-color: #83cbbb; background: var(--teal-soft); font-weight: 800; }
.button { border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 800; }
.button.primary { color: white; background: var(--teal); box-shadow: 0 6px 14px rgba(8,127,107,.18); }
.button.primary:hover { background: #066b5b; }
.button.ghost { color: var(--navy); border-color: var(--line); background: white; }
.button.danger { color: var(--red); border-color: #efc6c2; background: var(--red-soft); }
.button.small { padding: 6px 9px; border-radius: 7px; font-size: 11px; }
.button.wide { width: 100%; }

.theme-control select { width:auto; min-width:126px; height:40px; padding:8px 30px 8px 10px; background:var(--surface); }
.top-action-button { height:40px; padding:8px 13px; white-space:nowrap; font-weight:600; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.truth-note { padding:12px 14px; border-left:4px solid var(--teal); border-radius:9px; color:var(--muted); background:var(--teal-soft); font-size:12px; line-height:1.65; }
.account-summary { display:flex; align-items:center; gap:13px; margin:8px 0 18px; padding:16px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.account-summary > span { width:46px; height:46px; display:grid; place-items:center; border-radius:12px; color:white; background:var(--navy); font-weight:900; }
.account-summary b,.account-summary small { display:block; }.account-summary small { margin-top:3px; color:var(--muted); }
.assistant-modal { width:min(760px,calc(100vw - 60px)); }
.assistant-layout { display:grid; gap:15px; padding:0 22px 22px; }
.assistant-layout label { display:grid; gap:7px; }
.assistant-result { min-height:170px; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.assistant-result h3 { margin:0 0 12px; color:var(--ink); }
.assistant-steps { margin:0 0 15px; padding-left:20px; }.assistant-steps li { margin:7px 0; }
.assistant-facts { display:grid; gap:8px; }.assistant-facts>div { display:grid; grid-template-columns:90px 1fr; gap:12px; padding:9px 0; border-top:1px solid var(--line); }
.assistant-facts dt { color:var(--muted); font-size:11px; font-weight:800; }.assistant-facts dd { margin:0; font-size:12px; line-height:1.6; }
.error-text { color:var(--red); font-weight:800; }

body[data-theme="bright"] {
  --navy:#15243a; --navy-2:#20354f; --teal:#2468d8; --teal-soft:#eaf1ff; --mint:#dce8ff;
  --ink:#152033; --muted:#637086; --line:#dce3ec; --bg:#f4f7fb; --surface:#fff; --sidebar:#15243a; --sidebar-text:#f7fbff;
}
body[data-theme="dark"] {
  --navy:#f3f6fa; --navy-2:#e0e6ef; --teal:#68b7ff; --teal-soft:#21364c; --mint:#29455f;
  --amber:#ffc069; --amber-soft:#3c3021; --red:#ff766c; --red-soft:#422522; --blue:#79a4ff; --blue-soft:#253757;
  --ink:#f3f6fa; --muted:#aeb9c8; --line:#344052; --bg:#0f1319; --surface:#181e27; --sidebar:#090c11; --sidebar-text:#f8fafc; --shadow:none;
  color-scheme:dark;
}
body[data-theme="glass"] {
  --navy:#253650; --navy-2:#344a6b; --teal:#356fe0; --teal-soft:#e8efffd1; --mint:#dbe7ff;
  --ink:#1e293b; --muted:#60708a; --line:#ffffffb8; --bg:#eaf2ff; --surface:#ffffffa6; --sidebar:#26354bd9; --sidebar-text:#f8fbff;
  --shadow:0 18px 45px rgba(86,128,184,.15);
  background:radial-gradient(circle at 75% 80%,#baf3ff,transparent 38%),radial-gradient(circle at 70% 10%,#e5d8ff,transparent 42%),#eef4ff;
}
body[data-theme="glass"] .topbar,body[data-theme="glass"] .panel,body[data-theme="glass"] .stat-card,body[data-theme="glass"] .modal,body[data-theme="glass"] .top-popover { backdrop-filter:blur(22px); }
body[data-theme="glass"] dialog::backdrop { backdrop-filter:blur(14px); background:rgba(23,31,45,.46); }
body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea,body[data-theme="dark"] .button.ghost,body[data-theme="dark"] .icon-button,body[data-theme="dark"] .user-chip { color:var(--ink); background:var(--surface); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  position: relative; overflow: hidden; min-height: 132px; padding: 19px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--surface);
}
.stat-card::after { content: ""; position: absolute; right: -16px; bottom: -34px; width: 100px; height: 100px; border-radius: 50%; background: var(--teal-soft); }
.stat-card.alert::after { background: var(--red-soft); }
.stat-card.warning::after { background: var(--amber-soft); }
.stat-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-label span:last-child { font-size: 18px; }
.stat-value { margin-top: 15px; color: var(--navy); font-size: 30px; font-weight: 900; letter-spacing: -.04em; }
.stat-note { margin-top: 7px; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; color: var(--navy); font-size: 14px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px; }
.trend-chart { display: flex; align-items: end; gap: 10px; height: 220px; padding: 14px 4px 0; }
.trend-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; gap: 5px; min-width: 38px; }
.trend-col b { display: block; height: var(--h); min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #25b598, #087f6b); }
.trend-col b.trend-unknown { background: repeating-linear-gradient(135deg, var(--line), var(--line) 4px, transparent 4px, transparent 8px); outline: 1px dashed var(--muted); }
.trend-col span { color: var(--muted); font-size: 9px; text-align: center; transform: rotate(-25deg); transform-origin: center; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--teal); }
.person-row { display: grid; grid-template-columns: 70px 1fr 42px; gap: 10px; align-items: center; margin: 15px 0; }
.person-row strong { font-size: 12px; }
.progress-track { height: 8px; border-radius: 999px; background: #edf2f4; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, #2f6fed, #23b49a); border-radius: inherit; }
.person-row span { color: var(--muted); font-size: 11px; text-align: right; }
.signal-list { display: grid; gap: 10px; }
.signal { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; background: #f7fafb; }
.signal i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.signal.warning i { background: var(--amber); }
.signal.danger i { background: var(--red); }
.signal b { font-size: 12px; }
.signal span { color: var(--muted); font-size: 11px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
.task-table-wrap { max-width: 100%; }
.task-table-wrap table { min-width: 960px; }
.task-table-wrap td { white-space: nowrap; }
.task-table-wrap .cell-title { min-width: 260px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; color: #557082; background: #f1f6f7; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 11px; }
td { padding: 11px 12px; border-bottom: 1px solid #edf2f4; vertical-align: top; max-width: 280px; line-height: 1.5; }
tbody tr:hover { background: #fbfdfd; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { color: var(--navy); font-weight: 800; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.product-title-layout { display:grid; grid-template-columns:64px minmax(170px,1fr); gap:10px; align-items:start; }
.product-title-layout b,.product-title-layout small { display:block; }
.product-title-layout small { margin-top:4px; color:var(--muted); font-weight:500; line-height:1.45; }
.product-thumb { width:64px; height:64px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.product-thumb img { width:100%; height:100%; object-fit:cover; }
.product-thumb i { padding:5px; color:var(--muted); font-size:10px; font-style:normal; text-align:center; }
.product-image-preview-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(72px,1fr)); gap:8px; margin:10px 0; }
.product-image-preview-grid span { aspect-ratio:1; display:grid; place-items:center; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:var(--bg); }
.product-image-preview-grid img { width:100%; height:100%; object-fit:cover; }
.product-image-preview-grid i { color:var(--muted); font-size:10px; font-style:normal; }
.actions { display: flex; gap: 6px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.good { color: #087a56; background: #e6f7f0; }
.badge.info { color: #2d64cf; background: #edf3ff; }
.badge.warn { color: #a66b0b; background: #fff5dc; }
.badge.bad { color: #b33d3d; background: #fff0ef; }
.badge.neutral { color: #617383; background: #eef3f5; }
.priority { display: inline-grid; place-items: center; min-width: 28px; padding: 4px 7px; border-radius: 7px; font-size: 10px; font-weight: 900; }
.priority.p0 { color: #a22f2f; background: #ffe8e5; }
.priority.p1 { color: #96620b; background: #fff0cd; }
.priority.p2 { color: #2c68ad; background: #e8f2ff; }
.empty-state { padding: 70px 30px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: 16px; }

.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.kanban-col { min-width: 0; min-height: 360px; max-height:max(360px,calc(100vh - 230px)); padding: 12px; overflow-y:auto; overscroll-behavior:contain; border-radius: 14px; background: #eaf0f2; }
.kanban-head { position:sticky; top:-12px; z-index:2; display: flex; justify-content: space-between; align-items: center; margin:-12px -12px 10px; padding:12px; color: var(--navy); background:#eaf0f2; font-size: 12px; font-weight: 900; }
.kanban-head span { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: white; color: var(--muted); }
.task-card { min-width: 0; overflow-wrap: anywhere; padding: 13px; margin-bottom: 10px; border: 1px solid #d6e2e6; border-radius: 11px; background: white; box-shadow: 0 5px 12px rgba(16,42,67,.04); }
.task-card h3 { margin: 9px 0 8px; color: var(--navy); font-size: 13px; line-height: 1.5; }
.task-card p { margin: 0 0 10px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.mini-avatar { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 7px; color: white; background: var(--navy); }
.team-task-switcher { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:10px; margin-bottom:12px; }
.team-task-switcher button { display:grid; gap:5px; padding:14px 16px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:white; text-align:left; }
.team-task-switcher button:hover { border-color:#8acbbe; background:#f7fcfb; }
.team-task-switcher button.active { border-color:#30ab92; background:var(--teal-soft); box-shadow:inset 0 0 0 1px #30ab92; }
.team-task-switcher span { color:var(--teal); font-size:10px; font-weight:900; }
.team-task-switcher strong { color:var(--navy); font-size:16px; }
.team-task-switcher small { color:var(--muted); font-size:9px; }
.task-view-note { display:flex; justify-content:space-between; gap:18px; margin-bottom:14px; padding:10px 13px; border-radius:10px; color:#496475; background:#edf4f6; font-size:10px; }
.task-view-note b { color:var(--navy); }
.task-toolbar { position:sticky; top:76px; z-index:8; padding:10px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--bg) 94%,transparent); box-shadow:0 8px 18px rgba(16,42,67,.08); backdrop-filter:blur(12px); }
.task-row-actions { min-width:250px; flex-wrap:wrap; white-space:normal; }
.task-table-wrap td:last-child { min-width:280px; }
.latest-work { margin:10px 0; padding:10px; border-left:3px solid var(--teal); border-radius:8px; background:#f2f8f7; }
.latest-work small,.latest-work b { display:block; }
.latest-work small { color:var(--muted); font-size:8px; }
.latest-work b { margin:4px 0; color:var(--navy); font-size:10px; }
.latest-work p { margin:0; color:#536b79; font-size:9px; }
.latest-work.empty { border-left-color:#a9b6be; background:#f6f8f9; }
.archive-missing { margin:9px 0; padding:9px 10px; border:1px solid #efcfc5; border-radius:9px; color:#a14337; background:#fff3f0; font-size:9px; line-height:1.5; }
.product-decision-line { display:flex; justify-content:space-between; gap:10px; margin:8px 0 11px; color:var(--muted); font-size:9px; }
.product-decision-line b { color:var(--navy); }
.step-guidance { margin:6px 0!important; padding:7px 9px; border-radius:7px; color:#476577!important; background:#eef5f7; }

.sop-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 13px; }
.sop-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.sop-card .sop-top { display: flex; align-items: center; justify-content: space-between; }
.sop-code { color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.sop-card h3 { margin: 11px 0 8px; color: var(--navy); font-size: 15px; }
.sop-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sop-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #edf2f4; }
.sop-meta small { display: block; color: #8393a0; font-size: 9px; }
.sop-meta strong { display: block; margin-top: 3px; font-size: 11px; }

.legacy-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; }
.sheet-list { max-height: calc(100vh - 170px); padding: 8px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
.sheet-button { width: 100%; border: 0; border-radius: 8px; padding: 9px 10px; color: var(--muted); background: transparent; text-align: left; font-size: 11px; }
.sheet-button:hover, .sheet-button.active { color: var(--teal); background: var(--teal-soft); font-weight: 800; }
.legacy-table td { min-width: 90px; max-width: 260px; font-size: 10px; }

.modal { width: min(920px, calc(100vw - 60px)); max-height: calc(100vh - 70px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgba(6,29,44,.28); }
.modal.compact { width: 480px; }
.modal::backdrop { background: rgba(7,27,40,.56); backdrop-filter: blur(3px); }
.modal header, .modal footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); background: white; }
.modal header h2 { margin: 0; color: var(--navy); font-size: 20px; }
.modal footer { justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); border-bottom: 0; }
#entity-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
#entity-form > header { flex: 0 0 auto; align-items: flex-start; gap: 12px; }
#entity-form > header > div { min-width: 0; }
#entity-form > header h2 { max-height: 25vh; overflow: auto; overflow-wrap: anywhere; }
#entity-form > header > button, #entity-form > footer { flex-shrink: 0; }
#entity-form > #form-fields { flex: 1 1 auto; min-height: 0; max-height: none; }
#ai-assistant-dialog > form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
#ai-assistant-dialog header, #ai-assistant-dialog footer { flex-shrink: 0; }
#ai-assistant-dialog header > div { min-width: 0; }
#ai-assistant-dialog header h2 { max-height: 25vh; overflow: auto; overflow-wrap: anywhere; }
#ai-assistant-dialog .assistant-layout { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; }
#ai-assistant-dialog .assistant-layout > *, #ai-assistant-dialog .assistant-layout label { min-width: 0; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; max-height: calc(100vh - 250px); padding: 22px; overflow-y: auto; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid .help { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.toast {
  position: fixed; z-index: 100; right: 24px; top: 22px; max-width: 360px;
  padding: 12px 16px; border-radius: 10px; color: white; background: var(--navy);
  box-shadow: var(--shadow); transform: translateY(-80px); opacity: 0; pointer-events: none; transition: .25s ease;
  font-size: 12px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #a83d3d; }
.loading { padding: 70px; color: var(--muted); text-align: center; }
.loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid #d7e5e4; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1250px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sop-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* V2 daily-work system */
a { color: inherit; }
.text-link { color: var(--blue); font-weight: 800; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.no-pad { padding: 0; }
.history-head { margin-top: 22px; }
.empty-state.compact { padding: 24px 14px; font-size: 11px; }
.actions.full { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.card-head, .card-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.progress-note { display: block; margin: 7px 0 10px; color: var(--muted); font-size: 10px; }
.blocker-line, .review-note {
  margin: 9px 0; padding: 8px 9px; border-radius: 8px; color: #9c3b3b; background: var(--red-soft);
  font-size: 10px; line-height: 1.55;
}
.approval-line { margin: 9px 0; color: var(--muted); font-size: 10px; }

.start-banner, .guide-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 18px; padding: 23px 26px;
  border-radius: 17px; color: white; background:
    radial-gradient(circle at 88% 20%, rgba(48,211,174,.26), transparent 30%),
    linear-gradient(120deg, #102a43, #164d5c);
  box-shadow: 0 14px 32px rgba(16,42,67,.14);
}
.start-banner span, .guide-hero > span { color: #63d5bd; font-size: 11px; font-weight: 800; }
.start-banner h2, .guide-hero h2 { margin: 5px 0 7px; font-size: 20px; letter-spacing: -.02em; }
.start-banner p, .guide-hero p { max-width: 820px; margin: 0; color: #bfd3de; font-size: 11px; line-height: 1.7; }
.quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 350px; }
.quick-actions .button.ghost { color: white; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.stat-card[data-go] { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card[data-go]:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(16,42,67,.10); }
.today-grid { align-items: start; }
.task-list-compact { display: grid; gap: 9px; }
.today-task {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfd;
}
.today-task strong { display: block; color: var(--navy); font-size: 12px; }
.today-task small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.punch-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.punch-card div { padding: 12px; border-radius: 10px; background: #f3f7f8; text-align: center; }
.punch-card small { display: block; color: var(--muted); font-size: 9px; }
.punch-card strong { display: block; margin-top: 4px; color: var(--navy); font-size: 13px; }

.guide-card {
  margin-bottom: 18px; border: 1px solid #c9dff3; border-radius: 14px; background: #f3f8ff; overflow: hidden;
}
.guide-card summary {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer;
  list-style: none; color: var(--navy);
}
.guide-card summary::-webkit-details-marker { display: none; }
.guide-card summary > span { padding: 5px 8px; border-radius: 7px; color: white; background: var(--blue); font-size: 10px; font-weight: 900; }
.guide-card summary b { font-size: 12px; }
.guide-card summary i { color: var(--blue); font-size: 10px; font-style: normal; }
.guide-card[open] summary { border-bottom: 1px solid #dce9f6; }
.guide-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 15px 16px 17px; }
.guide-body > div { padding: 11px 12px; border-radius: 9px; background: white; }
.guide-body > div.wide { grid-column: 1 / -1; }
.guide-body small { display: block; color: #6b8297; font-size: 9px; }
.guide-body strong { display: block; margin-top: 4px; font-size: 11px; line-height: 1.65; }
.guide-body ol { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0; padding: 0; counter-reset: usage; list-style: none; }
.guide-body li { position: relative; min-height: 58px; padding: 11px 11px 11px 35px; border-radius: 9px; background: white; color: #496174; font-size: 10px; line-height: 1.55; }
.guide-body li::before { counter-increment: usage; content: counter(usage); position: absolute; left: 10px; top: 11px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; color: white; background: var(--blue); font-weight: 900; }

.exchange-bar, .admin-note, .backup-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; padding: 16px 18px;
  border: 1px solid #b9ddd4; border-radius: 14px; background: var(--teal-soft);
}
.fx-panel { margin: 16px 0; }
.fx-status { align-self: flex-start; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fx-status.live { color: #087443; background: #e5f7ee; }
.fx-status.offline { color: #9b5a00; background: #fff3da; }
.fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 1.8fr; gap: 12px; align-items: stretch; }
.fx-rate { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.fx-rate small, .fx-meta small, .fx-meta span { display: block; color: var(--muted); font-size: 12px; }
.fx-rate strong { display: block; margin-top: 6px; color: var(--navy); font-size: 24px; letter-spacing: .3px; }
.fx-rate.primary { border-color: #8bd8c7; background: #f1fffb; }
.fx-rate.primary strong { color: #007c68; }
.fx-meta { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 4px 8px; }
@media (max-width: 900px) { .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-meta { grid-column: 1 / -1; } }
.exchange-bar small, .exchange-bar span, .admin-note span, .backup-hero span { display: block; color: var(--muted); font-size: 10px; }
.exchange-bar strong, .admin-note b, .backup-hero b { display: block; margin: 4px 0; color: var(--navy); font-size: 14px; }
.exchange-bar input { display: inline-block; width: 90px; padding: 7px 9px; margin: 0 4px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(420px, 1fr)); gap: 14px; }
.pricing-template-panel { margin-bottom: 18px; }
.template-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 10px; }
.template-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfdfd; }
.template-card > div:first-child { display: grid; gap: 5px; }
.template-card small,.template-card span { color: var(--muted); font-size: 12px; }
.template-card strong { color: var(--ink); font-size: 15px; }
.template-card .actions { margin-top: 12px; }
.pricing-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.pricing-card h3 { margin: 3px 0 0; color: var(--navy); font-size: 15px; }
.pricing-card .card-head small { color: var(--teal); font-size: 9px; font-weight: 900; }
.pricing-card .card-head > span { color: var(--muted); font-size: 10px; }
.price-baseline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.price-baseline div { padding: 10px; border-radius: 9px; background: #f3f7f8; }
.price-baseline small { display: block; color: var(--muted); font-size: 9px; }
.price-baseline strong { display: block; margin-top: 3px; color: var(--navy); font-size: 13px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.price-scenario { padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.price-scenario small, .price-scenario span { display: block; font-size: 9px; }
.price-scenario strong { display: block; margin: 4px 0; font-size: 12px; }
.price-scenario.profit { color: #087a56; border-color: #b9e6d5; background: #effaf6; }
.price-scenario.loss { color: #af3d3d; border-color: #f0c5c1; background: #fff4f3; }
.price-scenario.empty { color: var(--muted); background: #fafcfc; }
.pricing-card .actions { margin-top: 12px; }
.pricing-preview { grid-column: 1 / -1; padding: 15px; border: 1px solid #9fdacb; border-radius: 12px; background: #f2fbf8; }
.preview-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.preview-head b { color: var(--teal); font-size: 12px; }
.preview-head span { color: var(--muted); font-size: 10px; }

.example-strip, .legacy-map {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 10px;
}
.example-strip b, .legacy-map b { color: var(--navy); }
.example-strip span, .legacy-map span { padding: 5px 8px; border-radius: 999px; color: #6a5831; background: var(--amber-soft); }
.difference-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 17px; }
.difference-cards > div { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.difference-cards b { display: block; margin-bottom: 5px; color: var(--navy); font-size: 12px; }
.difference-cards span { color: var(--muted); font-size: 10px; line-height: 1.6; }
.daily-flow, .product-flow { display: flex; align-items: stretch; gap: 9px; margin-bottom: 17px; }
.daily-flow > div { flex: 1; position: relative; padding: 14px 14px 14px 46px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.daily-flow > div > span { position: absolute; left: 13px; top: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: white; background: var(--teal); font-size: 11px; font-weight: 900; }
.daily-flow b, .daily-flow small { display: block; }
.daily-flow b { color: var(--navy); font-size: 12px; }
.daily-flow small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.daily-flow > i, .product-flow > i { align-self: center; color: #83a3af; font-style: normal; }
.execution-check { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0 0 18px; padding:14px; border:1px solid #ead39e; border-radius:14px; background:var(--amber-soft); }
.execution-check>div { padding:10px; border-radius:10px; background:rgba(255,255,255,.72); }
.execution-check small,.execution-check strong { display:block; }
.execution-check small { color:var(--muted); font-size:10px; }
.execution-check strong { margin-top:5px; color:var(--navy); font-size:17px; }
.execution-check p { grid-column:1/-1; display:flex; gap:10px; margin:0; color:#76571c; font-size:11px; }
.execution-check.complete { border-color:#9dd8c8; background:var(--teal-soft); }
.execution-check.complete p { color:var(--teal); }
.punch-hero {
  display: grid; grid-template-columns: repeat(4, 1fr) auto auto; gap: 10px; align-items: center;
  margin-bottom: 18px; padding: 18px; border: 1px solid #b9ddd4; border-radius: 14px; background: var(--teal-soft);
}
.punch-hero div { padding-right: 10px; border-right: 1px solid #cce5df; }
.punch-hero small, .punch-hero strong { display: block; }
.punch-hero small { color: var(--muted); font-size: 9px; }
.punch-hero strong { margin-top: 4px; color: var(--navy); font-size: 13px; }

.active-runs { margin-bottom: 22px; }
.run-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.run-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; }
.run-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.run-card h3 { margin: 9px 0 6px; color: var(--navy); font-size: 13px; }
.run-card p { color: var(--muted); font-size: 10px; }
.run-card .button { margin-top: 11px; }
.run-hero { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; margin-bottom: 17px; }
.run-hero > div { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.run-hero small { color: var(--teal); font-size: 10px; font-weight: 800; }
.run-hero h2 { margin: 7px 0; color: var(--navy); font-size: 20px; }
.run-hero p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.stepper { display: grid; gap: 10px; }
.step-row {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; padding: 15px;
  border: 1px solid var(--line); border-left: 4px solid #aab9c2; border-radius: 12px; background: white;
}
.step-row.good { border-left-color: var(--teal); }
.step-row.info { border-left-color: var(--blue); }
.step-row.bad { border-left-color: var(--red); }
.step-no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: white; background: var(--navy); font-weight: 900; }
.step-main > div { display: flex; align-items: center; gap: 9px; }
.step-main h3 { margin: 0; color: var(--navy); font-size: 12px; }
.step-main p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.step-main p.issue { color: var(--red); }
.exception-panel { margin-top: 16px; }
.exception-panel p { margin-top: 0; color: var(--muted); font-size: 11px; }

.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 18px; }
.score-grid > div { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.score-grid small, .score-grid strong, .score-grid span { display: block; }
.score-grid small, .score-grid span { color: var(--muted); font-size: 9px; }
.score-grid strong { margin: 7px 0; color: var(--navy); font-size: 22px; }
.product-flow { align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.product-flow span { flex: 1; padding: 8px; border-radius: 8px; color: var(--navy); background: #f1f6f7; text-align: center; font-size: 10px; font-weight: 800; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(420px, 1fr)); gap: 12px; }
.candidate-card { display: grid; grid-template-columns: 75px minmax(0, 1fr); min-width: 0; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.candidate-main { min-width: 0; overflow-wrap: anywhere; }
.candidate-main .actions { flex-wrap: wrap; }
.score-ring { display: grid; place-items: center; align-content: center; width: 68px; height: 68px; border: 7px solid var(--mint); border-radius: 50%; color: var(--teal); font-size: 22px; font-weight: 900; }
.score-ring small { font-size: 9px; }
.candidate-main h3 { margin: 8px 0 5px; color: var(--navy); font-size: 14px; }
.candidate-main > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.score-mini { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.score-mini span { padding: 5px 7px; border-radius: 7px; color: #46606f; background: #f1f6f7; font-size: 9px; }
.product-library-head { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:24px; border-radius:18px; color:white; background:linear-gradient(135deg,#102a43,#164e63 64%,#0f766e); box-shadow:0 18px 40px rgba(16,42,67,.14); }
.product-library-head h2 { margin:4px 0 8px; font-size:24px; }
.product-library-head p { margin:0; max-width:760px; color:#cce2e8; font-size:11px; line-height:1.7; }
.product-library-head .eyebrow { color:#65e4cd; }
.product-summary-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; margin:12px 0; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--line); }
.product-summary-strip span { padding:13px 15px; color:var(--muted); background:white; font-size:10px; }
.product-summary-strip b { margin-right:5px; color:var(--navy); font-size:17px; }
.product-master-grid { display:grid; grid-template-columns:repeat(2,minmax(420px,1fr)); gap:12px; }
.product-master-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:white; box-shadow:0 8px 24px rgba(16,42,67,.04); }
.product-master-top { display:grid; grid-template-columns:58px 1fr auto; gap:12px; align-items:center; }
.product-master-top h3 { margin:3px 0; color:var(--navy); font-size:15px; }
.product-master-top small,.product-master-top p { margin:0; color:var(--muted); font-size:9px; }
.product-thumb { display:grid; place-items:center; width:58px; height:58px; overflow:hidden; border-radius:13px; color:var(--teal); background:var(--teal-soft); font-size:22px; font-weight:900; }
.product-thumb img { width:100%; height:100%; object-fit:cover; }
.product-health-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.product-health-row>div { padding:10px; border-radius:10px; background:#f5f8f9; }
.product-health-row small,.product-health-row strong { display:block; }
.product-health-row small { color:var(--muted); font-size:8px; }
.product-health-row strong { margin:4px 0 7px; color:var(--navy); font-size:11px; }
.product-link-counts { display:flex; flex-wrap:wrap; gap:6px; }
.product-link-counts span,.sku-chips span { padding:5px 7px; border-radius:7px; color:#4e6573; background:#edf3f5; font-size:8px; }
.product-link-counts b { color:var(--navy); }
.sku-chips { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.sku-chips span { color:#0c6f62; background:var(--teal-soft); }
.product-empty-line { margin:10px 0; color:var(--muted); font-size:9px; }
.product-master-note { display:grid; grid-template-columns:auto 1fr auto 1fr; gap:7px; align-items:center; margin:10px 0; padding:9px; border-radius:9px; background:#fbf8ef; }
.product-master-note small { color:#8a7953; font-size:8px; }
.product-master-note b { overflow:hidden; color:#625431; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.company-health { margin:12px 0 18px; padding:18px; border:1px solid var(--line); border-radius:17px; background:#fff; }
.section-title { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:12px; }
.section-title h2 { margin:2px 0 0; color:var(--navy); font-size:17px; }
.section-title>span { color:var(--muted); font-size:9px; }
.health-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.health-grid article { padding:11px 12px; border:1px solid var(--line); border-radius:11px; background:#f7f9fa; }
.health-grid article>div { display:grid; grid-template-columns:auto 1fr auto; gap:7px; align-items:center; }
.health-grid i { width:7px; height:7px; border-radius:50%; background:#98a7af; }
.health-grid small { color:var(--navy); font-size:9px; font-weight:800; }
.health-grid b { font-size:8px; }
.health-grid p { margin:7px 0 0; color:var(--muted); font-size:8px; line-height:1.5; }
.health-grid .good i{background:#16a071}.health-grid .good b{color:#087a56}
.health-grid .warning{background:#fffaf0}.health-grid .warning i{background:#d89a22}.health-grid .warning b{color:#9a6810}
.health-grid .danger{background:#fff5f4}.health-grid .danger i{background:#c84b45}.health-grid .danger b{color:#ad3832}
.health-grid .pending{background:#f4f6f8}.health-grid .pending b{color:#71818b}
.redline-panel { margin-top:10px; border-top:1px solid var(--line); }
.redline-panel summary { display:flex; justify-content:space-between; padding:12px 2px 2px; color:var(--navy); cursor:pointer; font-size:10px; }
.redline-panel summary span { color:var(--muted); font-weight:400; }
.redline-panel>div { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
.redline-panel article { display:grid; grid-template-columns:24px 1fr auto; gap:9px; align-items:center; padding:9px; border-radius:9px; background:#f6f8f9; }
.redline-panel article>span { display:grid; place-items:center; width:24px; height:24px; border-radius:8px; color:white; background:var(--navy); font-size:9px; font-weight:900; }
.redline-panel article b,.redline-panel article small { display:block; }
.redline-panel article b { color:var(--navy); font-size:9px; }
.redline-panel article small { margin-top:3px; color:var(--muted); font-size:8px; }
.redline-panel em { padding:4px 6px; border-radius:999px; color:#6b7d87; background:#e9eef0; font-size:8px; font-style:normal; }
.redline-panel em.active { color:#a13d37; background:#fee7e4; }

.live-grid { display: grid; grid-template-columns: repeat(2, minmax(400px,1fr)); gap: 12px; }
.live-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.live-card h3 { margin: 6px 0 0; color: var(--navy); font-size: 14px; }
.live-card > p { color: var(--muted); font-size: 10px; line-height: 1.6; }
.live-view-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:white; }
.live-view-toolbar .filters { display:flex; flex-wrap:wrap; gap:7px; }
.live-view-toolbar label { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:10px; white-space:nowrap; }
.live-view-toolbar select { min-width:130px; padding:7px 28px 7px 9px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--navy); }
.live-origin { display:inline-flex; margin-right:6px; padding:4px 7px; border-radius:999px; background:#eef2f4; color:#61727c; font-size:8px; font-weight:800; }
.live-origin.shop_operated { background:#dff5ec; color:#087b59; }
.live-origin.affiliate_or_unknown { background:#f2eef9; color:#6d5590; }
.live-origin.manual { background:#eef2f4; color:#61727c; }
.live-identity { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:10px 0; }
.live-identity span { min-width:0; padding:8px 9px; border-radius:8px; background:#f6f8f9; color:var(--navy); font-size:9px; overflow-wrap:anywhere; }
.live-identity b { display:block; margin-bottom:3px; color:var(--muted); font-size:8px; }
.live-completeness { display:flex; align-items:center; gap:8px; margin:9px 0; padding:8px 10px; border-radius:8px; background:#f2f5f6; color:#60717b; font-size:9px; }
.live-completeness b { flex:none; }
.live-completeness.success { background:#e1f5ed; color:#087a56; }
.live-completeness.warning { background:#fff4d9; color:#8c5d0c; }
.live-completeness.danger { background:#fee9e7; color:#a33d37; }
.live-shot-drop { grid-column: 1 / -1; padding: 20px; border: 2px dashed rgba(20,70,88,.28); border-radius: 15px; background: rgba(238,247,246,.72); text-align: center; cursor: pointer; transition: .18s ease; }
.live-shot-drop.dragging { border-color: var(--teal); background: rgba(222,244,240,.95); transform: translateY(-1px); }
.live-shot-drop b { display: block; color: var(--navy); font-size: 14px; }
.live-shot-drop span, .live-shot-drop p { display: block; margin: 6px 0 0; color: var(--muted); font-size: 10px; }
#live-shot-preview img { display: block; max-width: 100%; max-height: 280px; margin: 14px auto 0; border-radius: 12px; box-shadow: 0 8px 24px rgba(6,29,44,.16); }
.live-shot-evidence { display: grid; gap: 8px; margin-top: 14px; text-align: left; }
.live-shot-evidence article { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.live-shot-evidence article b { color: var(--text); font-size: 11px; }
.live-shot-evidence article span, .live-shot-evidence article small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.live-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 10px 0; }
.live-metrics span { padding: 7px; border-radius: 7px; background: #f1f6f7; color: #506a79; font-size: 9px; text-align: center; }
.creator-board { display: grid; grid-template-columns: repeat(6, minmax(220px,1fr)); gap: 10px; overflow-x: auto; align-items: start; }
.creator-lane { min-height: 370px; padding: 11px; border-radius: 13px; background: #eaf0f2; }
.creator-card { margin-bottom: 9px; padding: 12px; border: 1px solid #d5e1e6; border-radius: 10px; background: white; }
.creator-card > div:first-child { display: flex; justify-content: space-between; }
.creator-card h3 { margin: 9px 0 5px; color: var(--navy); font-size: 12px; }
.creator-card h3 small { color: var(--muted); font-weight: 400; }
.creator-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.creator-card > small { display: block; margin: 8px 0; color: var(--muted); font-size: 9px; }
.creator-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.creator-metrics span { padding: 4px 5px; border-radius: 5px; background: #f1f6f7; font-size: 8px; }
.due-dot { padding: 4px 6px; border-radius: 999px; color: #a03737; background: var(--red-soft); font-size: 8px; font-weight: 900; }

.script-grid { display: grid; grid-template-columns: repeat(3,minmax(300px,1fr)); gap: 12px; }
.script-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.script-card h3 { margin: 10px 0 6px; color: var(--navy); font-size: 14px; }
.script-card .keywords { margin: 0 0 10px; color: var(--teal); font-size: 9px; }
.customer-q, .jp-reply { padding: 10px; border-radius: 9px; background: #f4f7f8; }
.jp-reply { margin-top: 8px; background: var(--teal-soft); }
.customer-q small, .jp-reply small { color: var(--muted); font-size: 8px; }
.customer-q p, .jp-reply p { margin: 5px 0 0; color: var(--ink); font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.script-card details { margin: 9px 0; color: var(--muted); font-size: 9px; }
.script-card details p { line-height: 1.6; }
.script-card details p.issue { color: var(--red); }

.guide-hero { display: block; padding: 28px; }
.guide-hero > span { display: block; }
.guide-hero h2 { max-width: 800px; font-size: 24px; }
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.role-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.role-grid b { color: var(--navy); font-size: 13px; }
.role-grid p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.role-grid span { display: block; padding: 9px; border-radius: 8px; color: #176b5d; background: var(--teal-soft); font-size: 9px; line-height: 1.5; }
.work-loop { margin-bottom: 18px; padding: 20px; border-radius: 15px; color: white; background: var(--navy); }
.work-loop h2 { margin: 0 0 14px; font-size: 16px; }
.work-loop > div { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.work-loop article { padding: 13px; border-radius: 10px; background: rgba(255,255,255,.08); }
.work-loop span { color: #54d2b7; font-size: 9px; font-weight: 900; }
.work-loop b { display: block; margin: 5px 0; font-size: 11px; }
.work-loop p { margin: 0; color: #bed0dc; font-size: 9px; line-height: 1.6; }
.module-map { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.module-map button { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fbfb; text-align: left; }
.module-map b, .module-map span { display: block; }
.module-map b { color: var(--navy); font-size: 11px; }
.module-map span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.truth-note { margin-top: 18px; padding: 17px; border: 1px solid #efcc87; border-radius: 12px; background: var(--amber-soft); }
.truth-note b { color: #805512; font-size: 12px; }
.truth-note p { margin: 6px 0 0; color: #75613e; font-size: 10px; line-height: 1.7; }
.archive-block { margin-top: 18px; }
.archive-block summary { margin-bottom: 10px; color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }

.form-section { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding: 11px 12px; border-left: 4px solid var(--teal); border-radius: 8px; background: var(--teal-soft); }
.form-section strong { color: var(--navy); font-size: 12px; }
.form-section span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.field-help { color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.check-control { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 11px; font-weight: 400; }
.check-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
input[readonly] { color: #657a87; background: #edf2f4; }

@media (max-width: 1450px) {
  .script-grid { grid-template-columns: repeat(2,1fr); }
  .pricing-grid, .candidate-grid, .live-grid, .product-master-grid { grid-template-columns: 1fr; }
  .run-grid { grid-template-columns: repeat(2,1fr); }
  .kanban { display:flex; width:100%; max-width:100%; }
  .kanban-col { flex:0 0 280px; }
}
@media(max-width:900px){
  .app-shell{display:block}
  .sidebar{position:fixed;z-index:60;left:0;top:0;width:250px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:0 0 40px rgba(0,0,0,.24)}
  .sidebar.open{transform:translateX(0)}
  .menu-button{display:block}
  .topbar{height:76px;padding:0 16px;gap:10px}
  .center-nav{top:76px;padding:9px 14px}
  .center-nav-title{display:none}
  .center-nav-links{width:100%}
  .topbar-actions{margin-left:auto;min-width:0}
  .search-box{width:min(42vw,260px)}
  .search-results{left:auto;right:0;width:min(420px,calc(100vw - 24px))}
  .top-popover{width:min(390px,calc(100vw - 24px))}
  .content{padding:18px 14px 40px}
  .stats-grid{grid-template-columns:1fr 1fr}
  .kanban{display:flex}
  .kanban-col{flex-basis:min(280px,82vw)}
  .form-grid{grid-template-columns:1fr}
  .form-grid label.wide,.form-section{grid-column:1}
  .modal{width:calc(100vw - 20px);max-height:calc(100vh - 20px)}
  .legacy-layout{grid-template-columns:1fr}
  .sheet-list{display:flex;max-height:none;overflow-x:auto}
  .sheet-button{min-width:170px}
  .product-library-head{align-items:flex-start;flex-direction:column}
  .product-summary-strip{grid-template-columns:1fr 1fr}
  .product-master-grid{grid-template-columns:1fr}
  .product-master-top{grid-template-columns:52px 1fr}
  .product-master-top>.badge{grid-column:1/-1;justify-self:start}
  .product-health-row{grid-template-columns:1fr}
  .product-master-note{grid-template-columns:auto 1fr}
  .health-grid{grid-template-columns:1fr 1fr}
  .team-task-switcher{grid-template-columns:1fr 1fr}
  .redline-panel>div{grid-template-columns:1fr}
}

/* 任务工作台：采用成熟任务工具的紧凑层级、固定工具栏和上下文操作模式。 */
.task-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:16px}
.task-page-head h1{margin:2px 0 4px;color:var(--ink);font-size:28px;letter-spacing:-.04em}
.task-page-head p{margin:0;color:var(--muted);font-size:12px}
.task-eyebrow{color:var(--teal);font-size:10px;font-weight:900;letter-spacing:.08em}
.task-summary{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.task-summary span{display:flex;align-items:baseline;gap:5px;min-width:84px;padding:10px 14px;border-left:1px solid var(--line);color:var(--muted);font-size:10px}
.task-summary span:first-child{border-left:0}.task-summary b{color:var(--ink);font-size:17px}
.task-toolbar{top:74px;display:grid;gap:10px;margin-bottom:10px;padding:10px 12px;border-color:#d8e0e4;border-radius:13px;background:color-mix(in srgb,var(--surface) 96%,transparent);box-shadow:0 7px 22px rgba(24,39,52,.09)}
.task-toolbar-main,.task-toolbar-filters{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.task-toolbar-main .view-switch{flex:0 0 auto}.task-toolbar-main .task-create{margin-left:auto;white-space:nowrap}
.task-search{display:flex;align-items:center;gap:7px;flex:1;max-width:470px;height:36px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--muted)}
.task-search:focus-within{border-color:#69a99a;box-shadow:0 0 0 3px rgba(39,137,115,.1)}
.task-search input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:12px}
.task-toolbar-filters{padding-top:9px;border-top:1px solid var(--line)}
.task-toolbar-filters .filters{gap:5px}.task-selects{display:flex;gap:7px;margin-left:auto}.task-selects select{min-width:118px}
.task-results-line{display:flex;justify-content:space-between;align-items:center;min-height:28px;margin-bottom:7px;padding:0 3px;color:var(--muted);font-size:10px}.task-results-line b{color:var(--ink);font-size:11px}
.kanban{gap:10px;padding-bottom:4px}
.kanban-col{min-height:300px;max-height:max(340px,calc(100vh - 300px));padding:8px;border:1px solid #dae3e7;border-radius:12px;background:#eef2f4;scrollbar-width:thin}
.kanban-head{top:-8px;margin:-8px -8px 6px;padding:10px 9px;border-bottom:1px solid #dce4e7;background:#eef2f4;font-size:11px}
.task-card{padding:11px;margin-bottom:7px;border-color:#d9e1e5;border-radius:10px;box-shadow:0 2px 6px rgba(20,38,50,.04)}
.task-card:hover{border-color:#aebec6;box-shadow:0 5px 14px rgba(20,38,50,.08)}
.task-card.approval-blocked{border-left:3px solid #d89b30}
.task-card h3{margin:7px 0 8px;font-size:12px;line-height:1.4}
.task-card .badge{padding:3px 6px;font-size:8px}.task-card .priority{padding:3px 6px;font-size:9px}
.task-card .progress{height:5px;margin:7px 0 4px}.task-card .progress-note{display:block;color:var(--muted);font-size:9px;line-height:1.4}
.latest-work.compact{display:grid;grid-template-columns:auto auto;gap:2px 8px;margin:7px 0;padding:7px 8px;border-left-width:2px}
.latest-work.compact span{color:var(--muted);font-size:8px}.latest-work.compact b{margin:0;font-size:9px;text-align:right}
.latest-work.compact p{grid-column:1/-1;display:-webkit-box;margin:1px 0 0;overflow:hidden;font-size:9px;-webkit-box-orient:vertical;-webkit-line-clamp:1}
.latest-work.compact.empty{display:block;padding:6px 8px}
.task-card .truth-note{margin:7px 0;padding:7px 8px;border-radius:7px;color:#8c5d0c;background:#fff4d9;font-size:9px}
.task-card .approval-line{margin:7px 0;font-size:9px}.task-card .blocker-line{margin:7px 0;padding:7px 8px;font-size:9px}
.task-card>.actions{align-items:center;margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.task-action-menu{position:static;display:inline-block;margin-left:auto}
.task-action-menu>summary{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:10px;font-weight:800;cursor:pointer;list-style:none}
.task-action-menu>summary::-webkit-details-marker{display:none}.task-action-menu>summary::after{content:'···';margin-left:5px;letter-spacing:1px;color:var(--muted)}
.task-action-menu[open]>summary{border-color:#7aa99d;background:#eef8f5}
.task-action-menu>div{display:grid;min-width:175px;margin-top:5px;padding:5px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 8px 18px rgba(16,32,45,.12)}
.task-menu-item{width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:11px;text-align:left;cursor:pointer}
.task-menu-item:hover{background:var(--bg)}.task-menu-item.danger{color:#b33d3d}
.task-row-actions{align-items:center;min-width:190px;flex-wrap:nowrap}.task-table-wrap td:last-child{min-width:210px}
.task-table-wrap table{min-width:980px}.task-table-wrap thead th{position:sticky;top:0;z-index:1;background:var(--surface)}
.task-table-wrap tbody tr:hover{background:color-mix(in srgb,var(--teal-soft) 45%,transparent)}
.task-checklist-view{gap:5px}.task-checklist-view>article{grid-template-columns:30px minmax(210px,1fr) 100px minmax(190px,auto);gap:9px;padding:9px 11px;border-radius:9px}
.quadrant-grid{gap:10px}.quadrant-grid>article{padding:10px;border-radius:12px}.quadrant-grid>article>header{margin-bottom:8px;padding:3px 2px 8px}
body[data-theme="dark"] .task-search,body[data-theme="dark"] .task-summary,body[data-theme="dark"] .task-action-menu>summary,body[data-theme="dark"] .task-action-menu>div{background:var(--surface);color:var(--ink)}
body[data-theme="dark"] .kanban-col,body[data-theme="dark"] .kanban-head{background:color-mix(in srgb,var(--surface) 84%,var(--bg));border-color:var(--line)}
@media(max-width:900px){.task-page-head{align-items:flex-start}.task-summary{flex-wrap:wrap}.task-summary span{min-width:70px;padding:8px 10px}.task-toolbar{top:68px}.task-toolbar-main,.task-toolbar-filters{align-items:stretch;flex-wrap:wrap}.task-search{order:3;flex-basis:100%;max-width:none}.task-toolbar-filters .filters{overflow-x:auto;flex-wrap:nowrap}.task-selects{width:100%;margin:0}.task-selects select{flex:1}.kanban-col{max-height:calc(100vh - 330px)}}
@media(max-width:620px){.task-page-head{display:grid}.task-summary{width:100%}.task-summary span{flex:1}.task-create{padding-inline:10px}.task-checklist-view>article{grid-template-columns:28px minmax(0,1fr)}.task-checklist-view>article>span,.task-checklist-view>article>.task-row-actions{grid-column:2}}
@media(max-width:620px){
  .health-grid,.product-summary-strip,.stats-grid{grid-template-columns:1fr}
  .section-title{align-items:flex-start;flex-direction:column}
  .team-task-switcher{grid-template-columns:1fr}
  .task-view-note{align-items:flex-start;flex-direction:column}
  .topbar{padding:0 10px}
  .search-box{width:34vw;min-width:118px}
  .user-chip{min-width:42px;width:42px;padding:4px}
  .user-chip b,.user-chip small{display:none}
  .page-actions,.panel-head{align-items:flex-start;flex-direction:column}
  .execution-check{grid-template-columns:1fr 1fr}
  .daily-flow{display:grid;grid-template-columns:1fr}
  .daily-flow>i{display:none}
  .page-actions>.button,.page-actions>.actions{width:100%}
  .button{min-height:40px}
  .login-shell{grid-template-columns:1fr;background:linear-gradient(150deg,#0c253b 0 34%,#eff6f5 34%)}
  .login-brand{padding:35px 28px 26px}
  .login-brand .eyebrow{margin-top:22px}
  .login-brand h1{font-size:36px}
  .login-brand>p:not(.eyebrow),.login-features{display:none}
  .login-card{width:calc(100% - 28px);padding:26px;margin:0 auto 30px}
}
.shop-switcher{display:flex;gap:10px;overflow-x:auto;padding:2px 0 14px}
.shop-switcher button{min-width:150px;border:1px solid #d7e2e8;background:#fff;border-radius:14px;padding:12px 16px;text-align:left;color:#17324d;cursor:pointer}
.shop-switcher button b,.shop-switcher button span{display:block}
.shop-switcher button span{font-size:12px;color:#708399;margin-top:4px}
.shop-switcher button.active{border-color:#0aa78f;background:#e9faf6;box-shadow:0 0 0 2px rgba(10,167,143,.08)}
.shop-switcher button.active b{color:#087f70}
.operation-filter{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 12px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff}
.range-presets,.custom-range{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.range-presets .filter-chip{cursor:pointer}
.custom-range label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}
.custom-range input{border:1px solid var(--line);border-radius:8px;padding:7px 9px;color:var(--navy);background:#fff}
.metric-definition{margin:0 0 14px;padding:9px 12px;border-radius:9px;background:#eef6ff;color:#4e6c85;font-size:11px}
.operation-analysis{margin-bottom:18px}
.operation-analysis>.panel{margin:0}
.operation-trend{overflow-x:auto;min-width:0}
.operation-trend .trend-col{min-width:24px}
.operation-insights{display:grid;gap:10px}
.operation-insights>div{padding:12px;border-radius:10px;background:#f6f9fa}
.operation-insights small,.operation-insights strong{display:block}
.operation-insights small{margin-bottom:5px;color:var(--muted);font-size:11px}
.operation-insights strong{color:var(--navy);font-size:13px}
.good-text{color:#087a56!important}.bad-text{color:#b33d3d!important}
.shop-comparison{margin:0 0 18px}
@media(max-width:900px){.operation-filter{align-items:flex-start}.custom-range{width:100%}.operation-analysis{grid-template-columns:1fr}}
.integration-status{display:flex;justify-content:space-between;gap:18px;align-items:center;border-radius:18px;padding:20px 22px;margin-bottom:18px}
.integration-status>div:first-child b,.integration-status>div:first-child span{display:block}
.integration-status>div:first-child span{margin-top:6px;color:#60758a}
.integration-status.ready{background:#e9faf6;border:1px solid #bce8dd}
.integration-status.pending{background:#fff7df;border:1px solid #f0d996}
.shop-connect-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:16px}
.shop-connect-card{background:#fff;border:1px solid #dce6eb;border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(16,42,67,.05)}
.shop-connect-card h3{margin:4px 0 0;font-size:22px}
.shop-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}
.shop-facts div{background:#f5f8fa;border-radius:12px;padding:11px}
.shop-facts small,.shop-facts strong{display:block}
.shop-facts small{color:#788b9b;margin-bottom:5px}
.shop-error{background:#fff0ef;color:#b53a34;border-radius:10px;padding:10px 12px;margin-bottom:12px}
.domain-note{margin-top:18px;background:#eef5ff;border:1px solid #cfe0f5;border-radius:16px;padding:18px}
.domain-note b,.domain-note span{display:block}
.domain-note span{margin-top:6px;color:#5f7183;line-height:1.6}
.open-ended-progress {
  margin: 12px 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #e8f5f1;
  color: #087767;
  font-size: 12px;
  font-weight: 700;
}
.official-gmv-discovery{margin:16px 0}
.official-gmv-summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 16px;border:1px solid #b9d7d0;border-radius:14px;background:#f2fbf8}
.official-gmv-summary span{color:#5d6e79;flex:1;min-width:260px}
.official-gmv-list{display:grid;gap:14px;margin-top:14px}
.official-gmv-store{border:1px solid #d9e4ea;border-radius:14px;padding:16px;background:#fff}
.official-gmv-store-head,.official-campaign-row,.official-shop-map{display:flex;align-items:center;gap:12px;justify-content:space-between}
.official-gmv-store-head div,.official-campaign-row div{display:grid;gap:4px}
.official-gmv-store-head small,.official-campaign-row small{color:#6f7f89}
.official-shop-map{margin:14px 0;justify-content:flex-start}
.official-shop-map select{min-width:260px}
.official-campaign-list{display:grid;gap:8px}
.official-campaign-row{padding:11px 12px;border-radius:10px;background:#f5f8fa}
@media(max-width:720px){.official-gmv-store-head,.official-campaign-row,.official-shop-map{align-items:stretch;flex-direction:column}.official-shop-map select{min-width:0;width:100%}}

/* 第三期：同一份任务数据的个人工作台、多视图与工作日历 */
.workspace-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 26px;margin-bottom:16px;border-radius:20px;background:linear-gradient(135deg,#0d334d,#0b846f);color:#fff;box-shadow:0 14px 34px rgba(13,51,77,.16)}
.workspace-hero h2{margin:5px 0 7px;font-size:26px}.workspace-hero p{margin:0;color:#d9f1ec}.workspace-hero .eyebrow{color:#7ce2cf}.date-control{display:grid;gap:6px;font-size:12px;color:#d9f1ec}.date-control input{border:1px solid rgba(255,255,255,.3);border-radius:10px;background:rgba(255,255,255,.12);color:#fff;padding:10px 12px}
.workspace-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.workspace-facts .stat-card{min-height:120px}
.workspace-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:16px}.workspace-main,.workspace-side{display:grid;align-content:start;gap:16px}.workspace-side .panel{margin:0}.workspace-task-list{display:grid;gap:10px}.workspace-task-list>article{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fff}.workspace-task-list b,.workspace-task-list small{display:block}.workspace-task-list small{color:var(--muted);margin-top:5px}.workspace-task-list p{margin:6px 0 0;color:#456078}
.task-check{width:28px;height:28px;border-radius:8px;border:2px solid #b9c9d3;background:#fff;color:#fff;font-weight:800;cursor:pointer}.task-check.done{border-color:#0a9f86;background:#0a9f86}.schedule-strip{display:grid;gap:9px}.schedule-strip article{display:flex;align-items:center;gap:13px;padding:10px 12px;border-radius:11px;background:#f4f8fa}.schedule-strip time{font-weight:800;color:#087f70}.schedule-strip b,.schedule-strip small{display:block}.schedule-strip small{margin-top:3px;color:var(--muted)}
.brief-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.brief-item:last-child{border-bottom:0}.brief-item>span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#e7f7f2;color:#087f70;font-weight:800}.brief-item b{font-size:13px}.brief-item p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.view-switch{display:inline-flex;border:1px solid var(--line);border-radius:10px;background:#fff;padding:3px}.view-switch button{border:0;background:transparent;border-radius:7px;padding:7px 11px;color:var(--muted);cursor:pointer}.view-switch button.active{background:#0d334d;color:#fff}
.task-checklist-view{display:grid;gap:8px}.task-checklist-view>article{display:grid;grid-template-columns:34px minmax(0,1fr) 110px minmax(250px,auto);align-items:center;gap:12px;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:12px}.task-checklist-view b,.task-checklist-view small{display:block}.task-checklist-view small{margin-top:4px;color:var(--muted)}.task-checklist-view>article>span{font-size:12px;color:var(--muted)}
.quadrant-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.quadrant-grid>article{min-width:0;padding:14px;border-radius:16px;border:1px solid var(--line);background:#f8fafb}.quadrant-grid>article>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:5px 4px 10px;border-bottom:2px solid}.quadrant-grid>article>header span{padding:2px 8px;border-radius:10px;background:#fff}.quadrant-grid .q1>header{color:#ba3d3d}.quadrant-grid .q2>header{color:#b47815}.quadrant-grid .q3>header{color:#486ec3}.quadrant-grid .q4>header{color:#6f7f89}.quadrant-grid .task-card{margin-bottom:10px}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;padding:13px 15px;border:1px solid var(--line);border-radius:14px;background:#fff}.calendar-toolbar>div{display:flex;align-items:center;gap:8px}.calendar-grid{display:grid;grid-template-columns:repeat(var(--calendar-cols),minmax(0,1fr));gap:8px}.calendar-day{min-height:360px;border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}.calendar-day.today{box-shadow:0 0 0 2px rgba(10,167,143,.22);border-color:#0aa78f}.calendar-day>header{display:flex;align-items:center;gap:7px;padding:11px 10px;background:#f3f7f9}.calendar-day>header small{color:var(--muted)}.calendar-day>header b{font-size:14px}.calendar-day>header button{margin-left:auto;border:0;background:transparent;color:#087f70;font-size:18px;cursor:pointer}.calendar-day>div{display:grid;gap:6px;padding:8px}.calendar-event{display:grid;gap:3px;text-align:left;border:0;border-left:3px solid #0aa78f;border-radius:8px;background:#eaf8f4;padding:8px;color:#17324d;cursor:pointer}.calendar-event time,.calendar-event small{font-size:10px;color:#5f7282}.calendar-empty{padding:10px;color:#a0adb6;font-size:11px}.calendar-grid.mode-month .calendar-day{min-height:150px}.calendar-grid.mode-day .calendar-day{min-height:600px}
@media(max-width:1050px){.workspace-layout{grid-template-columns:1fr}.workspace-facts{grid-template-columns:1fr 1fr}.calendar-grid.mode-week{overflow-x:auto;grid-template-columns:repeat(7,180px)}}

/* 库存一期：多仓、在途、成本价值和不可删除流水 */
.inventory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:16px 0;flex-wrap:wrap}.inventory-toolbar .segmented{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:#fff}.inventory-toolbar .segmented button{border:0;border-radius:8px;background:transparent;padding:9px 13px;color:var(--muted);cursor:pointer}.inventory-toolbar .segmented button.active{background:#0b846f;color:#fff}.inventory-toolbar select{min-width:180px}.inventory-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.inventory-table{overflow:auto}.inventory-table table{min-width:1050px;width:100%;border-collapse:collapse}.inventory-table th,.inventory-table td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.inventory-table th{background:#f4f8fa;color:#5a6d7c;font-size:12px}.inventory-table td small{display:block;color:var(--muted);margin-top:4px}.warehouse-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.warehouse-card{display:grid;gap:10px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}.warehouse-card h3{margin:8px 0 0}.warehouse-card p,.warehouse-card small{margin:0;color:var(--muted)}.warehouse-card .button{justify-self:start}
@media(max-width:1050px){.inventory-kpis{grid-template-columns:1fr 1fr}.warehouse-grid{grid-template-columns:1fr}.inventory-toolbar{align-items:stretch;flex-direction:column}.inventory-toolbar .actions{width:100%;overflow:auto}}

/* 最终定稿视觉：直接映射“内部系统-最终验收原型”，不再维护第二套外壳 */
@media(min-width:901px){
  body:has(#app-view:not(.hidden)){padding:20px;background:#141414;overflow:hidden}
  .app-shell{grid-template-columns:218px 1fr;min-height:calc(100vh - 40px);height:calc(100vh - 40px);border-radius:22px;overflow:hidden;background:var(--bg)}
  .sidebar{height:calc(100vh - 40px);padding:24px 18px}
  .main{height:calc(100vh - 40px);overflow:auto}
}
.sidebar-brand{gap:10px;padding:0 6px 28px;border-bottom:0}
.sidebar-brand .brand-mark{width:36px;height:36px;border-radius:12px;margin:0;background:#fff;color:#18202a;font-size:16px}
.sidebar-brand strong{font-size:18px;white-space:nowrap}
#main-nav{gap:8px;padding:0;overflow:visible}
.nav-section,#main-nav [data-action="logout"]{display:none}
.nav-item{min-height:50px;padding:13px 15px;border-radius:12px;color:#d7d9df;font-size:16px;font-weight:500}
.nav-icon{width:20px;font-size:16px}
.nav-item:hover{background:rgba(255,255,255,.08)}
.nav-item.active{background:#f7f7f9;color:#17191d}
.sidebar-foot{padding:18px 6px 0;color:rgba(255,255,255,.72)}
.sidebar-foot small{color:rgba(255,255,255,.58)}
.topbar{height:76px;padding:14px 28px;background:var(--surface);backdrop-filter:blur(18px)}
.topbar-actions{width:100%;gap:10px}
.search-wrap{flex:1}
.search-box{width:100%;height:52px;padding:0 16px;border:0;background:#f1f2f4;border-radius:14px}
.search-box input{font-size:15px}
.icon-button,.theme-control select,.top-action-button{min-height:44px;border:1px solid #6f706f;border-radius:11px;background:var(--surface)}
.theme-control select{padding:10px 38px 10px 14px}
.top-action-button{padding:10px 16px}
.user-chip{min-width:auto;height:44px;display:flex;align-items:center;gap:8px;padding:6px 12px;border-color:#6f706f;border-radius:11px}
.user-chip>span{width:30px;height:30px}.user-chip small{display:none}
#refresh-button,#personal-settings-button{display:none}
.page-heading{padding:30px 28px 20px;max-width:1460px;margin:auto}
.page-heading>div{display:flex;flex-direction:column}
.page-heading h1{order:1;font-size:30px;font-weight:500;letter-spacing:-.035em}
.page-heading .eyebrow{order:2;margin:5px 0 0;color:var(--muted);font-size:14px;font-weight:400;letter-spacing:0;text-transform:none}
.page-heading>.button{align-self:flex-start;background:#2868ff;border-color:#2868ff;border-radius:11px;padding:12px 17px}
.center-nav{max-width:1460px;margin:0 auto;padding:0 28px;border:0}
.center-nav-links{width:100%;gap:5px;padding:0;border-bottom:1px solid #777}
.center-link{padding:11px 14px;font-size:15px;color:var(--ink)}
.center-link.active{border-color:#2d68ff;color:var(--ink)}
.content{max-width:1460px;margin:auto;padding:22px 28px 50px}
.perspective-band{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;padding:12px 14px;border-radius:12px;background:#f1f2f4;color:var(--muted);font-size:13px}
.perspective-band div{display:flex;gap:5px}.perspective-band button{border:0;border-radius:10px;padding:9px 13px;background:transparent;color:var(--ink)}.perspective-band button.active{background:#17191d;color:#fff}.perspective-band button:disabled{opacity:1}
.command-board{grid-template-columns:1.35fr 1fr .85fr;gap:14px}
.command-column,.panel,.stat-card{border:1px solid #777;background:var(--surface);border-radius:16px;box-shadow:none}
.command-column{min-height:315px}.command-head{padding:18px;border-color:var(--line)}.command-head h2{font-size:20px}
.stats-grid{grid-template-columns:repeat(4,1fr);gap:14px}.stat-card{min-height:145px;padding:18px}.stat-value{font-size:30px}
.panel{overflow:hidden}.panel-head{padding:18px}.panel-body{padding:18px}
.settings-list{display:grid}.settings-list article{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.settings-list article:last-child{border-bottom:0}.settings-list b,.settings-list small{display:block}.settings-list small{margin-top:5px;color:var(--muted)}
.system-focus-card{min-height:330px}
body[data-theme="warm"]{--bg:#f3ead8;--surface:#fffaf0;--line:#ddd5c6;--shadow:none}
body[data-theme="warm"] .content,body[data-theme="warm"] .page-heading,body[data-theme="warm"] .center-nav{background:transparent}
.guide-card{display:none}
.closure-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-bottom:28px;padding:12px;border:1px solid #777;border-radius:14px;background:var(--surface)}
.closure-strip>div{display:grid;place-items:center;gap:6px;min-height:74px;padding:10px;border-radius:10px;text-align:center}.closure-strip>div.active{background:#e9f3ef}.closure-strip b{font-size:13px}.closure-strip span{color:var(--muted);font-size:12px}
.team-task-switcher{display:none}
.task-view-note{display:none}
.view-switch{order:-1}
.view-switch button.active{background:#17191d;color:#fff}
@media(max-width:1100px){.closure-strip{grid-template-columns:repeat(3,1fr)}}
.store-scope{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.store-scope>div{display:flex;align-items:center;gap:8px}.store-scope button{border:1px solid #777;border-radius:10px;padding:10px 14px;background:var(--surface);color:var(--ink)}.store-scope button.active{background:#17191d;color:#fff}.store-scope .connection-pill{border-radius:999px;color:#247b59;background:#f7f0df}.store-product-panel{min-height:300px}.store-product-panel table{min-width:800px}.store-secondary-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.resource-overview{display:grid;grid-template-columns:1.9fr .9fr;gap:14px;margin-bottom:16px}.resource-overview>.panel{min-height:300px}@media(max-width:900px){.resource-overview{grid-template-columns:1fr}}

/* 最终旧版视觉基准：今日指挥台首屏 */
.command-board{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:14px;margin-bottom:16px}
.command-column{min-width:0;min-height:320px;border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden;box-shadow:var(--shadow)}
.command-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 18px 13px;border-bottom:1px solid var(--line)}
.command-head h2{margin:0;color:var(--ink);font-size:20px;letter-spacing:-.025em}.command-head p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.command-list{display:grid;padding:5px 18px 15px}.command-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:62px;padding:11px 0;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;color:var(--ink)}
.command-item:last-child{border-bottom:0}.command-item strong,.command-item small{display:block}.command-item strong{font-size:13px;line-height:1.45}.command-item small{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.45}
.task-tick{width:18px;height:18px;border:1.5px solid #9aa09f;border-radius:3px;background:transparent}.task-tick:hover{border-color:var(--teal);background:var(--teal-soft)}
.reminder-item,.schedule-item{cursor:pointer}.reminder-item:hover,.schedule-item:hover{background:var(--teal-soft)}
.reminder-dot{width:9px;height:9px;border-radius:50%;background:var(--amber)}.reminder-dot.high,.reminder-dot.danger{background:var(--red)}.reminder-dot.low{background:var(--teal)}
.schedule-item time{min-width:43px;color:var(--ink);font-size:13px;font-weight:900}.command-item .badge{justify-self:end}
.recent-records{margin-bottom:16px}.quick-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.quick-record{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--surface) 80%,var(--bg));text-align:left;color:var(--ink)}
.quick-record>span{display:grid;place-items:center;min-height:34px;border-radius:8px;background:var(--teal-soft);color:var(--teal);font-size:10px;font-weight:900}.quick-record b,.quick-record small{display:block}.quick-record b{font-size:12px}.quick-record small{margin-top:4px;color:var(--muted);font-size:10px}
.lower-dashboard{margin-top:16px}

/* 主题只换颜色与材质，不改变已确认的旧版结构 */
body[data-theme="dark"] .panel,body[data-theme="dark"] .live-card,body[data-theme="dark"] .creator-card,body[data-theme="dark"] .script-card,body[data-theme="dark"] .role-grid article,body[data-theme="dark"] .shop-switcher button,body[data-theme="dark"] .operation-filter,body[data-theme="dark"] .shop-connect-card,body[data-theme="dark"] .workspace-task-list>article,body[data-theme="dark"] .task-checklist-view>article,body[data-theme="dark"] .calendar-toolbar,body[data-theme="dark"] .calendar-day,body[data-theme="dark"] .warehouse-card,body[data-theme="dark"] .inventory-toolbar .segmented,body[data-theme="dark"] .top-popover,body[data-theme="dark"] .popover-item{background:var(--surface);color:var(--ink)}
body[data-theme="dark"] .popover-item{border-color:var(--line)}
body[data-theme="dark"] .panel,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .modal header,
body[data-theme="dark"] .modal footer,
body[data-theme="dark"] .sop-card,
body[data-theme="dark"] .task-card,
body[data-theme="dark"] .team-task-switcher button,
body[data-theme="dark"] .sheet-list,
body[data-theme="dark"] .guide-body>div,
body[data-theme="dark"] .guide-body li,
body[data-theme="dark"] .pricing-card,
body[data-theme="dark"] .difference-cards>div,
body[data-theme="dark"] .daily-flow>div,
body[data-theme="dark"] .run-hero>div,
body[data-theme="dark"] .score-grid>div,
body[data-theme="dark"] .product-flow,
body[data-theme="dark"] .candidate-card,
body[data-theme="dark"] .product-summary-strip span,
body[data-theme="dark"] .product-master-card,
body[data-theme="dark"] .company-health,
body[data-theme="dark"] .perspective-band,
body[data-theme="dark"] .check-control,
body[data-theme="dark"] .view-switch,
body[data-theme="dark"] .calendar-toolbar,
body[data-theme="dark"] .calendar-day,
body[data-theme="dark"] .warehouse-card,
body[data-theme="dark"] .inventory-toolbar .segmented,
body[data-theme="dark"] .operation-filter,
body[data-theme="dark"] .official-gmv-store,
body[data-theme="dark"] .shop-connect-card {background:var(--surface);color:var(--ink);border-color:var(--line)}
body[data-theme="dark"] .signal,
body[data-theme="dark"] .schedule-strip article,
body[data-theme="dark"] .calendar-day>header,
body[data-theme="dark"] .quadrant-grid>article,
body[data-theme="dark"] .inventory-table th,
body[data-theme="dark"] th {background:color-mix(in srgb,var(--surface) 76%,var(--bg));color:var(--muted)}
body[data-theme="dark"] td,
body[data-theme="dark"] tbody tr:hover,
body[data-theme="dark"] .calendar-event {border-color:var(--line);color:var(--ink);background:transparent}
body[data-theme="dark"] .calendar-event:hover,
body[data-theme="dark"] .quick-record:hover {background:var(--teal-soft)}
body[data-theme="dark"] .workspace-task-list>article,
body[data-theme="dark"] .task-checklist-view>article,
body[data-theme="dark"] .quick-record,
body[data-theme="dark"] .quick-inbox-list>article {background:var(--surface);color:var(--ink);border-color:var(--line)}
body[data-theme="dark"] .kanban-col {background:color-mix(in srgb,var(--surface) 82%,var(--bg));color:var(--ink)}
body[data-theme="dark"] .kanban-head span,
body[data-theme="dark"] .filter-chip,
body[data-theme="dark"] .select-compact,
body[data-theme="dark"] .quadrant-grid>article>header span {background:var(--surface);color:var(--muted);border-color:var(--line)}
body[data-theme="dark"] .latest-work,
body[data-theme="dark"] .latest-work.empty,
body[data-theme="dark"] .task-view-note,
body[data-theme="dark"] .product-health-row>div,
body[data-theme="dark"] .product-master-note,
body[data-theme="dark"] .health-grid article,
body[data-theme="dark"] .redline-panel article,
body[data-theme="dark"] .operation-insights>div,
body[data-theme="dark"] .shop-facts div,
body[data-theme="dark"] .official-gmv-summary,
body[data-theme="dark"] .official-campaign-row {background:color-mix(in srgb,var(--surface) 78%,var(--bg));color:var(--ink);border-color:var(--line)}
body[data-theme="dark"] .panel-head h2,
body[data-theme="dark"] .stat-value,
body[data-theme="dark"] .workspace-task-list b,
body[data-theme="dark"] .quick-inbox-list b {color:var(--ink)}
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {color:#8492a4}
body[data-theme="dark"] label,
body[data-theme="dark"] .field-help {color:var(--muted)}
body[data-theme="dark"] .closure-strip>div.active {
  background:var(--teal-soft);
  color:var(--ink);
}
body[data-theme="dark"] .closure-strip>div.active b {color:var(--ink)}
body[data-theme="dark"] .closure-strip>div.active span {color:var(--muted)}
body[data-theme="dark"] .button.primary {
  background:#2d68ff;
  color:#fff;
}
body[data-theme="dark"] .button.primary:hover {background:#2458d8}
body[data-theme="glass"] .command-column,body[data-theme="glass"] .recent-records,body[data-theme="glass"] .calendar-day,body[data-theme="glass"] .warehouse-card{background:var(--surface);backdrop-filter:blur(22px)}

.quick-inbox-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:14px}
.quick-inbox-grid>.panel{margin:0;min-width:0}
.quick-inbox-list{display:grid;gap:9px}
.quick-inbox-list>article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.quick-inbox-list b,.quick-inbox-list small{display:block}.quick-inbox-list b{color:var(--ink);font-size:12px;line-height:1.5}.quick-inbox-list small{margin-top:5px;color:var(--muted);font-size:10px}
@media(max-width:1050px){.quick-inbox-grid{grid-template-columns:1fr}.quick-inbox-list>article{grid-template-columns:1fr}}

@media(max-width:1180px){.command-board{grid-template-columns:1fr 1fr}.command-board>.command-column:first-child{grid-column:1/-1}.quick-record-grid{grid-template-columns:1fr 1fr}.theme-control,.top-action-button{display:none}}
@media(max-width:900px){.page-heading{padding:24px 14px 14px}.page-heading h1{font-size:25px}.center-nav{margin:0 14px;padding:0}.content{padding:18px 14px 40px}.command-board{grid-template-columns:1fr}.command-board>.command-column:first-child{grid-column:auto}.command-column{min-height:0}.quick-record-grid{grid-template-columns:1fr}.topbar{height:68px}.search-box{width:min(52vw,320px)}}

/* Contain intrinsic grid widths at browser zoom without clipping task actions. */
.main,.content,.kanban,.quadrant-grid,.task-checklist-view,.command-column{min-width:0;max-width:100%}
.kanban{width:100%;overscroll-behavior-x:contain}
.task-card .actions,.task-card footer,.perspective-band,.perspective-band>div{flex-wrap:wrap}
.task-card .button{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.task-advanced{grid-column:1/-1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px}
.task-advanced summary{cursor:pointer;color:var(--ink)}
.task-advanced>.form-grid{padding:16px 0 0}
.form-grid>label{min-width:0}
.form-grid>label[hidden]{display:none}
.modal input,.modal select,.modal textarea{min-width:0;max-width:100%}
.content [hidden]{display:none!important}
.layout-editor-body{padding:16px;max-height:65vh;overflow:auto;color:var(--ink)}
.layout-editor-body fieldset{border:1px solid var(--line);border-radius:10px;margin:12px 0;padding:10px;min-width:0}
.product-sku-list-row{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.product-sku-list-row>div{flex:1;min-width:0;overflow-wrap:anywhere}
.product-sku-list-row small{display:block;color:var(--muted);margin-top:5px}
.product-sku-list-row>.button{flex-shrink:0}
#product-sku-list-dialog header>div{min-width:0;overflow-wrap:anywhere}
.product-platform-summary{max-width:360px;min-width:160px;font-size:12px;font-weight:400;overflow-wrap:anywhere;white-space:normal;margin-top:8px}
.product-platform-summary summary{cursor:pointer;color:var(--muted)}
.product-platform-summary>div{padding:8px 0;border-bottom:1px solid var(--line)}
.product-platform-summary small{display:block;white-space:normal;overflow-wrap:anywhere}
.layout-editor-row{display:flex;gap:8px;align-items:center;padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:8px;margin:5px 0;cursor:grab}
.layout-editor-row label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow-wrap:anywhere}
.layout-editor-row input{width:auto}
.layout-editor-row .button{flex-shrink:0}
.stats-grid[data-layout-custom="true"]{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))}
.command-board[data-layout-custom="true"]{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr))}
.command-board[data-layout-custom="true"]>.command-column{grid-column:auto}
@media(max-width:700px){
  .quadrant-grid{grid-template-columns:minmax(0,1fr)}
  .task-checklist-view>article{grid-template-columns:34px minmax(0,1fr);align-items:start}
  .task-checklist-view>article>span,.task-checklist-view>article>.button{grid-column:2}
  .perspective-band{align-items:flex-start}
}
@media(max-width:620px){.page-heading{align-items:flex-start;flex-direction:column}.page-heading>.button{width:100%}.command-head{align-items:flex-start;flex-direction:column}.command-item{grid-template-columns:auto minmax(0,1fr)}.command-item>.button,.command-item>.badge{grid-column:2}.topbar-actions{gap:6px}.topbar .icon-button{display:none}.topbar .notice-button{display:block}}
/* Legacy breadcrumb hiding must not hide the current topbar action container. */
@media(max-width:900px){
  .topbar{padding:10px 12px;gap:8px;justify-content:flex-start}
  .topbar>.topbar-actions{display:flex;flex:1;width:auto;min-width:0;gap:6px}
  .topbar #menu-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
  .topbar .search-wrap{min-width:0;flex:1}
  .topbar .search-box{width:100%;padding:0 8px;height:44px}
  .topbar .search-box input{width:100%;min-width:0;font-size:12px}
  .topbar .notice-wrap,.topbar .user-chip{flex-shrink:0}
  .topbar .user-chip{padding:6px}
  .topbar .user-chip>span{display:grid}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat-card{min-width:0;padding:14px}
  .stat-value{overflow-wrap:anywhere;font-size:26px}
}
@media(max-width:380px){.stats-grid{grid-template-columns:minmax(0,1fr)}}
/* Keep the assistant reachable when browser zoom reduces the CSS viewport. */
@media(max-width:1180px){
  .topbar #ai-assistant-button{display:inline-flex;flex-shrink:0;white-space:nowrap;padding:9px 10px}
  .topbar .search-box{min-width:0}
}
.video-pipeline-panel{margin-bottom:18px}.video-pipeline-list{display:grid;gap:12px;margin-top:14px}.video-pipeline-card{display:grid;grid-template-columns:220px minmax(0,1.5fr) minmax(260px,.7fr);gap:18px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.video-pipeline-preview{width:220px;aspect-ratio:16/9;object-fit:cover;border-radius:10px;background:var(--soft)}.video-pipeline-preview.empty{display:grid;place-items:center;color:var(--muted);font-size:11px}.video-pipeline-card h3{margin:12px 0 3px;font-size:15px}.video-pipeline-card p{line-height:1.65}.video-pipeline-card details{margin-top:12px;padding:11px 12px;border-radius:10px;background:var(--soft)}.video-pipeline-card summary{cursor:pointer;font-weight:800}.video-pipeline-side{border-left:1px solid var(--line);padding-left:18px}.video-pipeline-side dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}.video-pipeline-side dl div{padding:9px;border-radius:9px;background:var(--soft)}.video-pipeline-side dt{color:var(--muted);font-size:10px}.video-pipeline-side dd{margin:4px 0 0;font-weight:800;font-size:12px}.manual-video-stats{margin-top:18px}
.video-pipeline-edit{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.video-pipeline-edit label{display:grid;gap:5px;color:var(--muted);font-size:10px}.video-pipeline-edit .wide{grid-column:1/-1}.video-pipeline-edit textarea{min-height:90px}.video-pipeline-edit .button{justify-self:start}
@media(max-width:1100px){.video-pipeline-card{grid-template-columns:180px 1fr}.video-pipeline-preview{width:180px}.video-pipeline-side{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:14px 0 0}}@media(max-width:700px){.video-pipeline-card{grid-template-columns:1fr}.video-pipeline-preview{width:100%}.video-pipeline-side{grid-column:auto}}
