/* ==========================================================================
   TK星派魔方 · 科技简约设计系统 v4（HUD 质感）
   原则：深色表面 + 边缘光（edge-lit）细线 + 电光蓝→青渐变只用于关键数据与主操作；
         等宽数字、HUD 角标、分段进度、点阵网格；语义色只用于数据与状态。
   语义色：绿=成功/完成  黄=待处理/待审核  橙=提示/需修改  红=风险/紧急
           蓝=进行中     紫=辅助/筹备      青=数据高亮       灰=中性/未开始
   结构：1 令牌  2 基础  3 外壳  4 组件  5 驾驶舱  6 图表与排行
         7 周报  8 表格与列表  9 弹窗与表单  10 登录  11 响应式
   ========================================================================== */

/* ---------- 1 令牌 ---------- */
:root {
  color-scheme: dark;
  --font: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #04070f;
  --surface: #0a111d;
  --surface-2: #0f1828;
  --surface-3: #16223a;
  --field: #070c17;
  --line: rgba(140, 165, 210, .13);
  --line-2: rgba(140, 165, 210, .22);
  --line-3: rgba(140, 165, 210, .36);

  --text: #e8edf7;
  --text-2: #b6c0d4;
  --muted: #8b98b0;   /* 在 surface 上对比度 ≥ 5.5:1 */
  --faint: #77839b;   /* 仅用于次要说明，对比度 ≥ 4.5:1 */

  --accent: #3d8bff;
  --accent-2: #22d3ee;
  --grad: linear-gradient(90deg, #3d8bff, #22d3ee);
  --glow: 0 0 18px rgba(61, 139, 255, .45);
  /* 边缘光：左上蓝、右下青，其余保持细线 */
  --edge: linear-gradient(145deg, rgba(61, 139, 255, .6), rgba(140, 165, 210, .13) 30%, rgba(140, 165, 210, .09) 70%, rgba(34, 211, 238, .42));
  --blue: #5b94ff;
  --cyan: #3cd0e6;
  --purple: #a58bff;
  --pink: #f08fc8;
  --green: #3ddc97;
  --yellow: #f4c14d;
  --orange: #ff9f5b;
  --red: #ff6b7b;
  --gray: #8b98b0;

  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 12px;
  --ring: 0 0 0 3px rgba(77, 141, 255, .28);
  --ease: .15s ease;
  --side-w: 216px;
}

/* ---------- 2 基础 ---------- */
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-synthesis: none; color: var(--text);
  background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
/* 科技底纹：细网格 + 右上角蓝色光晕，向下渐隐，内容区保持干净 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(120, 160, 230, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 160, 230, .055) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 70% 0, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 70% 0, #000, transparent 75%);
}
body::after {
  content: ''; position: fixed; top: -180px; right: -120px; width: 720px; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(61, 139, 255, .16), transparent);
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 22px; line-height: 1.3; letter-spacing: -.2px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 14px; margin-bottom: 0; font-weight: 600; }
h3 { font-size: 14px; margin-bottom: 6px; font-weight: 600; }
small { font-size: 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .92em; color: var(--text); background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); font-size: 13px; }
.na { color: var(--faint); font-style: normal; }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.error { color: var(--red); font-size: 13px; min-height: 1.2em; margin: 6px 0; }
svg.i { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

button, input, select, textarea { font: inherit; }
button {
  cursor: pointer; color: var(--text); background: transparent;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 7px 13px; font-size: 13px; line-height: 1.35;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
button:hover { background: var(--surface-3); border-color: var(--line-3); }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); }
button.primary, .primary { color: #fff; font-weight: 600; background: var(--grad); border-color: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 4px 18px rgba(61, 139, 255, .35); }
button.primary:hover { background: linear-gradient(90deg, #5a9cff, #46dcf3); border-color: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 6px 24px rgba(61, 139, 255, .5); }
button.text, .text { background: none; border-color: transparent; padding: 5px 8px; color: var(--accent); font-size: 13px; }
button.text:hover { background: rgba(77, 141, 255, .1); border-color: transparent; }
button.wide, .wide { width: 100%; padding: 11px; font-size: 14.5px; }

input, select, textarea {
  min-width: 0; color: var(--text); background: var(--field);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 11px; font-size: 14px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring), 0 0 14px rgba(61, 139, 255, .18); }
input[type=date] { color-scheme: dark; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; padding: 0; }
select { max-width: 260px; cursor: pointer; }
textarea { resize: vertical; line-height: 1.6; }

/* 分段进度条：像仪表一样的刻度，填充为蓝→青渐变 */
progress { width: 100%; height: 6px; border: 0; appearance: none; display: block; margin-top: 9px; background: transparent;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); mask-image: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); }
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 2px; }
progress::-webkit-progress-value { background: var(--grad); border-radius: 2px; }
progress::-moz-progress-bar { background: var(--grad); border-radius: 2px; }

/* ---------- 3 外壳 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar-toggle { display: none; }
aside {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--side-w);
  display: flex; flex-direction: column; padding: 18px 12px 12px;
  background: linear-gradient(180deg, rgba(10, 17, 29, .9), var(--bg) 40%); border-right: 1px solid var(--line-2);
}
.brand { display: flex; gap: 10px; align-items: center; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .3px; padding: 0 8px 18px; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: #9cc4ff; background: rgba(61, 139, 255, .14); border: 1px solid rgba(61, 139, 255, .6); box-shadow: 0 0 16px rgba(61, 139, 255, .4), inset 0 0 8px rgba(61, 139, 255, .25); }
aside nav { display: grid; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; align-content: start; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
nav button {
  position: relative; display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-align: left;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--muted); padding: 8px 10px; font-size: 13.5px;
}
nav button .ni { display: grid; place-items: center; width: 18px; font-size: 16px; color: var(--faint); transition: color var(--ease); }
nav button:hover { background: rgba(140, 165, 210, .08); color: var(--text); }
nav button:hover .ni { color: var(--text-2); }
nav button.active { color: #fff; font-weight: 600; background: linear-gradient(90deg, rgba(61, 139, 255, .22), rgba(61, 139, 255, .02)); }
nav button.active .ni { color: var(--accent-2); filter: drop-shadow(0 0 6px rgba(34, 211, 238, .7)); }
nav button.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 12px var(--accent); }
.aside-bottom { margin-top: 10px; flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 13px; }
.profile > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 600; }
.profile small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.profile button { margin-left: auto; font-size: 12px; padding: 4px 8px; color: var(--muted); border-color: transparent; }
.profile button:hover { color: var(--text); border-color: var(--line-2); }

.main { margin-left: var(--side-w); flex: 1; min-width: 0; }
header {
  position: sticky; top: 0; z-index: 10; height: 46px; padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted);
  background: rgba(4, 7, 15, .8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
header span { margin: 0 6px; color: var(--faint); }
header b { color: var(--text); font-weight: 600; }
.header-right { display: flex; align-items: center; font-size: 12.5px; }
.header-right span { margin: 0 0 0 14px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 7px; margin: 0 !important; padding: 0 !important; color: var(--text-2) !important; font-family: var(--font) !important; font-size: 12.5px !important; background: none; border: 0; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.content { max-width: 1680px; margin: 0 auto; padding: 24px 28px 8px; display: flex; flex-direction: column; gap: 14px; }
/* 子元素间距统一由 gap 控制，避免面板相邻时贴在一起或间距翻倍 */
body .content > * { margin-block: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding-bottom: 2px; }
.page-heading p { color: var(--muted); font-size: 13px; margin: 0; max-width: 90ch; }
.page-heading .eyebrow { display: none; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 28px 24px; color: var(--faint); font-size: 12px; }

.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; background: transparent; color: var(--muted); white-space: nowrap; padding: 9px 13px; font-size: 13.5px; }
.tabs button:hover { color: var(--text); background: transparent; }
.tabs .selected { color: #fff; font-weight: 600; border-bottom-color: var(--accent-2); box-shadow: 0 2px 12px -4px var(--accent-2); }

/* ---------- 4 组件 ---------- */
.panel { position: relative; overflow: hidden; border: 1px solid transparent; border-radius: var(--r-lg);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box; }
/* 顶边“漏光”：一条居中渐隐的蓝色高光线 */
.panel::before, .cockpit-hero::before { content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(61, 139, 255, .9), rgba(34, 211, 238, .6), transparent); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-title h2 { position: relative; padding-left: 15px; letter-spacing: .1px; }
.panel-title h2::before { content: ''; position: absolute; left: 1px; top: 50%; width: 6px; height: 6px; margin-top: -3px; transform: rotate(45deg); background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.panel-title:has(.cockpit-caption) h2::before { top: 9px; margin-top: 0; }
.panel-title > span, .panel-title .muted { font-size: 12px; color: var(--muted); }
.panel-title p { margin: 3px 0 0; }
.panel .error { padding: 0 16px; }
.panel-note { font-size: 12.5px; line-height: 1.75; color: var(--muted); padding: 10px 16px; margin: 0; }
.recent { margin-top: 14px; }
.content > .recent, .command-layout > .recent { margin-top: 0; }
/* 说明文字：安静、可读、不再是大色块 */
.notice { padding: 0 0 0 12px; font-size: 12.5px; line-height: 1.75; color: var(--muted); border-left: 2px solid var(--line-3); max-width: 120ch; }
.notice a { color: var(--accent); }
.badge {
  --tone: var(--gray); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 1;
  padding: 4px 8px; border-radius: 6px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent);
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.badge.green { --tone: var(--green); } .badge.yellow, .badge.amber { --tone: var(--yellow); } .badge.orange { --tone: var(--orange); }
.badge.red { --tone: var(--red); } .badge.blue { --tone: var(--blue); } .badge.purple { --tone: var(--purple); } .badge.cyan { --tone: var(--cyan); }

/* 空状态：一行内联，不再占用大块虚线框 */
.empty { margin: 0; padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty::before { content: ''; display: block; width: 28px; height: 28px; margin: 0 auto 8px; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b98b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7l2-3h12l2 3v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M4 7h16M9 12h6'/%3E%3C/svg%3E") center/contain no-repeat; }

/* KPI */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
  --tone: var(--blue); position: relative; display: block; width: 100%; text-align: left; padding: 14px 16px 13px; color: var(--text);
  border: 1px solid transparent; border-radius: var(--r-md);
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 7%, var(--surface)), var(--surface) 60%) padding-box, var(--edge) border-box;
}
/* HUD：顶部发光色标 + 右下角角标 */
.stat::before { content: ''; position: absolute; top: -1px; left: 14px; width: 34px; height: 2px; border-radius: 2px; background: var(--tone); box-shadow: 0 0 12px var(--tone); }
.stat::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 7px; height: 7px; border-right: 1px solid color-mix(in srgb, var(--tone) 75%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--tone) 75%, transparent); pointer-events: none; }
button.stat:hover { background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 12%, var(--surface-2)), var(--surface-2) 60%) padding-box, var(--edge) border-box; }
.stat > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: .3px; }
.stat > div > span { display: grid; place-items: center; font-size: 16px; color: var(--tone); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--tone) 70%, transparent)); }
.stat strong { display: block; margin: 8px 0 4px; font-family: var(--mono); font-size: 27px; line-height: 1.15; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 22px color-mix(in srgb, var(--tone) 55%, transparent); }
.stat strong small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 5px; letter-spacing: 0; }
.stat p { font-size: 12px; color: var(--muted); margin: 0; }
.tone-blue { --tone: var(--blue); } .tone-cyan { --tone: var(--cyan); } .tone-purple { --tone: var(--purple); }
.tone-green { --tone: var(--green); } .tone-yellow { --tone: var(--yellow); } .tone-orange { --tone: var(--orange); }
.tone-red { --tone: var(--red); } .tone-pink { --tone: var(--pink); } .tone-gray { --tone: var(--gray); }
.stats .stat:nth-child(4n+2):not([class*="tone-"]) { --tone: var(--purple); }
.stats .stat:nth-child(4n+3):not([class*="tone-"]) { --tone: var(--cyan); }
.stats .stat:nth-child(4n+4):not([class*="tone-"]) { --tone: var(--orange); }

.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.currency-card { --tone: var(--blue); display: flex; gap: 22px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid transparent; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 9%, var(--surface)), var(--surface) 55%) padding-box, var(--edge) border-box; box-shadow: inset 2px 0 0 var(--tone); }
.currency-card[data-cur=USD] { --tone: var(--blue); } .currency-card[data-cur=JPY] { --tone: var(--pink); }
.currency-card[data-cur=THB] { --tone: var(--cyan); } .currency-card[data-cur=CNY] { --tone: var(--purple); }
.currency-card > b { font-family: var(--mono); font-size: 12px; letter-spacing: .8px; color: var(--tone); text-shadow: 0 0 10px var(--tone); }
.currency-card span { font-size: 12px; color: var(--muted); }
.currency-card strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 18px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- 5 驾驶舱 ---------- */
.cockpit-hero { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(61, 139, 255, .09), transparent 45%) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box; }
.cockpit-hero h2 { font-size: 14px; margin: 0; padding: 0; }
.cockpit-hero p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.cockpit-hero .eyebrow { display: none; }
.cockpit-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.cockpit-controls label { display: grid; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .6px; color: var(--muted); }
.cockpit-controls select, .cockpit-controls input { padding: 6px 9px; font-size: 13px; }
.cockpit-controls .text { border-color: var(--line-2); padding: 7px 11px; }
.cockpit-caption { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin: 0; max-width: 120ch; }
.cockpit-scope { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
.cockpit-scope strong { color: #fff; font-size: 13px; }
.cockpit-scope small { flex-basis: 100%; color: var(--faint); }
.panel > .cockpit-caption { padding: 0 16px 12px; }
.panel-title .cockpit-caption { margin: 3px 0 0; padding: 0; }
.cockpit-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.command-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.command-layout > *:not(.command-widget) { grid-column: 1 / -1; }
.inspection-panel { grid-column: 1 / -1; }
.inspection-panel .stats { padding: 14px 16px; }
.stat.is-zero strong { color: var(--muted); text-shadow: none; }
.stat.is-zero::before { opacity: .35; box-shadow: none; }

.production-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 14px 16px 16px; }
.production-stages button {
  --tone: var(--gray); display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 12px 9px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: inset 0 2px 0 color-mix(in srgb, var(--tone) 80%, transparent);
}
.production-stages button:hover { background: var(--surface-3); border-color: var(--line-3); }
.production-stages strong { font-family: var(--mono); font-size: 22px; line-height: 1.2; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.production-stages span { font-size: 12.5px; color: var(--muted); }

.task-ring { position: relative; width: 132px; height: 132px; margin: 22px auto 14px; }
.task-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.task-ring circle { fill: none; stroke-width: 7; }
.task-ring .rt { stroke: var(--surface-3); }
.task-ring .rv { stroke: url(#ring-g); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .55)); }
.task-ring::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed var(--line-3); pointer-events: none; }
#ring-g stop:first-child { stop-color: var(--green); } #ring-g stop:last-child { stop-color: var(--accent-2); }
.task-ring > div { position: absolute; inset: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.task-ring strong { font-family: var(--mono); font-size: 26px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(34, 211, 238, .5); }
.task-ring span { font-size: 12px; color: var(--muted); }
.completion { padding: 20px 16px 8px; text-align: center; }
.completion strong { display: block; font-family: var(--mono); font-size: 42px; line-height: 1.1; color: #fff; letter-spacing: -1px; }
.completion strong small { font-size: 18px; margin-left: 3px; color: var(--muted); }
.completion > span { color: var(--muted); font-size: 13px; }
.cockpit-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 14px; }
.cockpit-legend button { --tone: var(--gray); display: flex; align-items: center; text-align: left; font-size: 12.5px; color: var(--text-2); padding: 7px 10px; }
.cockpit-legend button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); margin-right: 8px; }
.cockpit-legend button > b { margin-left: auto; color: #fff; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.s-todo { --tone: var(--gray) !important; } .s-doing { --tone: var(--blue) !important; } .s-review { --tone: var(--yellow) !important; }
.s-fix { --tone: var(--orange) !important; } .s-done { --tone: var(--green) !important; } .s-pub { --tone: var(--purple) !important; }

.cockpit-alerts { max-height: 300px; overflow: auto; }
.alert-line { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 10px 16px; font-size: 13px; color: var(--text-2); }
.alert-line:last-child { border-bottom: 0; }
.alert-line:hover { background: rgba(140, 165, 210, .06); color: #fff; }
.cockpit-alerts .alert-line::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.cockpit-alerts .alert-line:nth-child(3n+2)::before { background: var(--orange); }
.cockpit-alerts .alert-line:nth-child(3n)::before { background: var(--red); }
.task-square, .task-icon { color: var(--muted); }
.command-widget .alert-line { justify-content: flex-start; }
.command-widget .alert-line .badge { margin-left: auto; }
.command-widget td, .command-widget th { padding: 9px 14px; }
.command-widget > .text { margin: 2px 8px 8px; }
.delivery-timeline { padding: 12px 16px 4px 20px; }
.delivery-timeline > div { position: relative; display: grid; grid-template-columns: 92px 1fr; column-gap: 8px; align-items: baseline; padding: 0 0 14px 14px; border-left: 1px solid var(--line-2); font-size: 13px; }
.delivery-timeline > div::before { content: ''; position: absolute; left: -3px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.delivery-timeline > div:nth-child(2n)::before { background: var(--cyan); }
.delivery-timeline time { color: var(--muted); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.delivery-timeline b { font-weight: 500; }
.delivery-timeline small { grid-column: 2; color: var(--muted); }

.project-card { margin: 12px 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.project-top { display: flex; align-items: center; gap: 12px; }
.project-top .badge { margin-left: auto; }
.project-top small { color: var(--muted); }
.project-symbol { font-family: var(--mono); color: var(--accent); background: rgba(77, 141, 255, .12); font-weight: 600; padding: 8px; border-radius: 8px; font-size: 12px; }
.project-numbers { display: flex; gap: 24px; margin: 14px 0; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.project-numbers b { font-family: var(--mono); font-size: 16px; color: #fff; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.status-list { padding: 4px 18px 8px; }
.status-list > div { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.status-list > div:last-child { border: 0; }
.status-list b { font-family: var(--mono); font-size: 14px; }
.note { margin: 4px 16px 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.task-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.task-line:last-child { border-bottom: 0; }
.task-line b { font-weight: 500; }
.task-line small { display: block; color: var(--muted); margin-top: 2px; }
.task-line time { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.task-line .badge { margin-left: 8px; }

/* ---------- 6 图表与排行 ---------- */
.gmv-chart { width: 100%; height: auto; display: block; padding: 6px 12px 2px; max-height: 300px; }
.gmv-chart text { fill: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.gmv-chart .grid { stroke: var(--line-2); stroke-dasharray: 2 5; }
.gmv-chart .gmv-line { fill: none; stroke: url(#gmv-stroke); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(61, 139, 255, .75)); }
.gmv-chart .order-line { fill: none; stroke: var(--purple); stroke-width: 1.75; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(165, 139, 255, .6)); }
.gmv-chart .gmv-halo { fill: rgba(34, 211, 238, .12); stroke: rgba(34, 211, 238, .55); stroke-width: 1; }
#gmv-stroke stop:first-child { stop-color: var(--accent); } #gmv-stroke stop:last-child { stop-color: var(--accent-2); }
.gmv-chart .gmv-dot { fill: var(--surface); stroke: var(--accent-2); stroke-width: 2; }
.gmv-chart .gmv-dot:hover, .gmv-chart .gmv-dot.last { fill: var(--accent-2); }
.gmv-chart .order-dot { fill: var(--surface); stroke: var(--purple); stroke-width: 1.75; }
.gmv-chart .tick-r { fill: var(--purple); }
.gmv-chart .tick-l { fill: var(--blue); }
#gmv-fill stop { stop-color: var(--accent); }
#order-fill stop { stop-color: var(--purple); }
#gmv-fill stop:first-child { stop-opacity: .3; } #order-fill stop:first-child { stop-opacity: .08; }
.chart-keys { display: flex; gap: 16px; padding: 10px 16px 0; font-size: 12px; color: var(--muted); }
.chart-keys span::before { content: ''; display: inline-block; width: 12px; height: 2px; margin-right: 7px; vertical-align: middle; background: var(--grad); box-shadow: 0 0 6px var(--accent); }
.chart-keys span:nth-child(2)::before { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.chart-details { margin: 0 16px 12px; font-size: 12.5px; color: var(--muted); }
.chart-details summary { cursor: pointer; color: var(--accent); padding: 4px 0; }
.chart-details p { margin: 7px 0; padding-left: 10px; border-left: 1px solid var(--line-2); }

.cockpit-bars { padding: 4px 16px 10px; }
.cockpit-bars > button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 11px 0; }
.cockpit-bars > button:last-child { border-bottom: 0; }
.cockpit-bars > button:hover { background: rgba(140, 165, 210, .05); }
.cockpit-bars > button > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
.cockpit-bars > button > span > b { color: #fff; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.cockpit-bars small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.cockpit-bars > button:nth-child(3n+2) progress::-webkit-progress-value { background: linear-gradient(90deg, #7a5cff, #d58bff); }
.cockpit-bars > button:nth-child(3n) progress::-webkit-progress-value { background: linear-gradient(90deg, #14b8a6, #3ddc97); }
.cockpit-bars > button:nth-child(3n+2) progress::-moz-progress-bar { background: linear-gradient(90deg, #7a5cff, #d58bff); }
.cockpit-bars > button:nth-child(3n) progress::-moz-progress-bar { background: linear-gradient(90deg, #14b8a6, #3ddc97); }
.rk-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
h3.rk-name { display: flex; align-items: center; gap: 10px; }
.rk { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; font-family: var(--mono); font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-3); }
.rk.r1 { color: var(--yellow); background: rgba(244, 193, 77, .14); }
.rk.r2 { color: #cbd6ea; background: rgba(203, 214, 234, .12); }
.rk.r3 { color: var(--orange); background: rgba(255, 159, 91, .14); }
.trend-body { padding: 14px 16px; }
.trend-body h3 { font-size: 13px; color: var(--accent); margin: 10px 0 4px; }
.trend-row { display: flex; gap: 12px; align-items: center; margin: 9px 0; font-size: 12.5px; }
.trend-row progress { flex: 1; margin: 0; }
.trend-row time { color: var(--muted); white-space: nowrap; font-family: var(--mono); }
.trend-row b { min-width: 64px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 7 周报 ---------- */
.week-visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.week-visual-body { padding: 14px 16px; }
.submission-stack { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.submission-stack svg { display: block; width: 100%; height: 100%; }
.week-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; font-size: 13px; }
.week-status-grid > div { display: flex; align-items: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.week-status-grid i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.week-status-grid .st-0 { background: #8b98b0; } .week-status-grid .st-1 { background: #5b94ff; } .week-status-grid .st-2 { background: #3ddc97; } .week-status-grid .st-3 { background: #ff9f5b; }
.week-status-grid b { margin-left: auto; font-family: var(--mono); font-size: 14px; }
.week-report-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 11px 0; }
.week-report-link:hover { background: rgba(140, 165, 210, .05); }
.week-report-link small, .week-history small { display: block; color: var(--muted); margin-top: 2px; }
.week-history { display: flex; align-items: center; gap: 12px; font-size: 13px; margin: 11px 0; }
.week-history > span { min-width: 92px; }
.week-history progress { flex: 1; margin: 0; }
.week-history b { min-width: 76px; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.week-channel { margin: 0 0 14px; }
.week-channel > span { display: flex; justify-content: space-between; font-size: 13.5px; }
.week-channel small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.week-channel:nth-child(2) progress::-webkit-progress-value { background: linear-gradient(90deg, #7a5cff, #d58bff); }
.week-channel:nth-child(3) progress::-webkit-progress-value { background: linear-gradient(90deg, #14b8a6, #3ddc97); }
.week-quality { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.week-quality > div { text-align: center; padding: 12px 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); box-shadow: inset 0 2px 0 rgba(255, 159, 91, .8); }
.week-quality > div.zero { box-shadow: none; }
.week-quality b { display: block; font-family: var(--mono); font-size: 22px; color: var(--orange); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.week-quality > div.zero b { color: var(--muted); }
.week-quality span { font-size: 12px; color: var(--muted); }
.weekly-note { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.weekly-note:last-child { border-bottom: 0; }
.weekly-note h3 { font-size: 14px; }
.weekly-note p { white-space: pre-wrap; line-height: 1.75; margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.weekly-note small { color: var(--muted); }
.weekly-note .actions { margin-top: 8px; }
/* 视频 TOP5 等带操作按钮的条目：操作按钮靠右，整行更紧凑 */
.weekly-note:has(> .actions) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
.weekly-note:has(> .actions) > h3, .weekly-note:has(> .actions) > p, .weekly-note:has(> .actions) > small { grid-column: 1; }
.weekly-note:has(> .actions) > h3 { margin-bottom: 0; }
.weekly-note:has(> .actions) > .actions { grid-column: 2; grid-row: 1 / span 3; margin: 0; flex-wrap: nowrap; }

/* ---------- 8 表格与列表 ---------- */
.list-toolbar { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.list-toolbar > div { margin-right: auto; }
.list-toolbar h2 { margin-bottom: 2px; }
.list-toolbar input { width: 280px; max-width: 100%; }
/* 横向滚动时两侧出现渐隐阴影，提示“还有更多列” */
.table-scroll {
  overflow: auto; max-width: 100%;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 28px 100% no-repeat local,
    linear-gradient(to right, rgba(0, 0, 0, .45), transparent) left / 10px 100% no-repeat scroll,
    linear-gradient(to left, rgba(0, 0, 0, .45), transparent) right / 10px 100% no-repeat scroll;
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--muted); font-weight: 500; font-size: 11.5px; letter-spacing: .6px; text-align: left; padding: 10px 16px; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
td { padding: 11px 16px; color: var(--text-2); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
td strong, td:first-child { color: var(--text); font-weight: 500; }
td small { color: var(--muted); }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: linear-gradient(90deg, rgba(61, 139, 255, .1), rgba(61, 139, 255, .02)); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent-2); }
tbody tr:last-child td { border-bottom: 0; }
td .text + .text { margin-left: 2px; }
.table-foot { padding: 10px 16px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }
.cargo-grid { max-height: 70vh; }
.cargo-grid td { min-width: 110px; white-space: normal; }
.cargo-grid .cargo-header { background: var(--surface-3); font-weight: 600; min-width: 140px; }
.cargo-formula { display: block; white-space: normal; overflow-wrap: anywhere; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 6px; }
#cargo-form .table-scroll { max-height: 60vh; }
#cargo-form input[type=number] { min-width: 120px; }

/* ---------- 9 弹窗与表单 ---------- */
dialog { width: calc(100% - 32px); max-width: 540px; max-height: 90vh; padding: 0; overflow: auto; color: var(--text); border: 1px solid transparent; border-radius: 14px; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--edge) border-box; box-shadow: 0 24px 80px rgba(0, 0, 0, .65), 0 0 60px rgba(61, 139, 255, .1); }
dialog:has(#module-form) { max-width: 780px; }
dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
dialog::backdrop { background: rgba(2, 4, 9, .78); backdrop-filter: blur(5px); }
dialog > .panel { margin: 0 18px 18px; }
.modal-title { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.modal-title h2 { font-size: 15px; padding-left: 0; }
.modal-title h2::before, .cockpit-hero h2::before, .login-side h2::before { display: none; }
.modal-title button { width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; border-color: transparent; color: var(--muted); }
.modal-title button:hover { color: var(--text); }
.form-fields { padding: 16px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
#edit-form .form-fields { grid-template-columns: 1fr; }
.field:has(textarea), .field:has(.checks) { grid-column: 1 / -1; }
.field > label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; color: var(--muted); }
.field > input, .field > select, .field > textarea { width: 100%; max-width: none; }
.form-section { grid-column: 1 / -1; margin: 8px 0 0; padding: 0 0 6px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .5px; color: var(--accent); border-bottom: 1px solid var(--line-2); }
.checks { display: flex; gap: 10px; flex-wrap: wrap; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--field); }
#module-form > .panel-note, #module-form > .muted, #module-form > button[type=button]:not(#close-module):not(#cancel-module) { margin-left: 20px; margin-right: 20px; }
#module-error, #form-error { padding: 0 20px; }
.modal-footer { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--line); }
.weekly-modal { max-width: 860px; }
.record-detail { padding: 14px 20px; margin: 0; display: grid; grid-template-columns: 140px 1fr; gap: 0 16px; font-size: 13px; }
.record-detail dt { color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.record-detail dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.pre { white-space: pre-wrap; line-height: 1.7; color: var(--text-2); }
.password-form { max-width: 520px; padding: 16px; }
.password-form label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.password-form input { display: block; width: 100%; margin-top: 6px; }
#toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: var(--r-md); font-size: 13.5px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line-3); box-shadow: inset 2px 0 0 var(--green), 0 12px 40px rgba(0, 0, 0, .5); transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 10 登录 ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 44px 60px; border-right: 1px solid var(--line-2);
  background: radial-gradient(520px 380px at 85% 18%, rgba(61, 139, 255, .22), transparent 70%), radial-gradient(560px 360px at 0 100%, rgba(34, 211, 238, .1), transparent 70%); }
.login-story::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(120, 160, 230, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 160, 230, .07) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: linear-gradient(135deg, #000, transparent 70%); mask-image: linear-gradient(135deg, #000, transparent 70%); }
.login-story > *:not(.login-cube) { position: relative; z-index: 1; }
/* 魔方线框：品牌「魔方」的等轴测 3×3 示意，三块彩色色块对应协作/运营/内容 */
.login-cube { position: absolute; z-index: 0; top: 9%; right: 7%; width: clamp(220px, 26vw, 360px); height: auto; pointer-events: none; filter: drop-shadow(0 0 22px rgba(61, 139, 255, .45)); }
.login-cube .cl path { stroke: #6aa8ff; stroke-width: 1.6; stroke-linejoin: round; }
.login-cube .cg path { stroke: rgba(106, 168, 255, .5); stroke-width: .8; }
.login-cube .c1 { fill: rgba(34, 211, 238, .38); } .login-cube .c2 { fill: rgba(165, 139, 255, .4); } .login-cube .c3 { fill: rgba(61, 220, 151, .34); }
.login-story h1 { font-size: 40px; line-height: 1.35; letter-spacing: -.5px; margin: 14px 0 16px; font-weight: 650; background: linear-gradient(90deg, #fff 30%, #8fc0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-story p { color: var(--muted); line-height: 2; font-size: 15px; }
.login-story > small { color: var(--faint); }
.login-stats { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.login-stats span { flex: 1; min-width: 120px; padding: 12px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-2); }
.login-stats span:nth-child(1) strong { color: var(--cyan); } .login-stats span:nth-child(2) strong { color: var(--purple); } .login-stats span:nth-child(3) strong { color: var(--green); }
.login-stats strong { display: block; font-size: 18px; margin-bottom: 3px; font-weight: 600; }
.login-side { display: grid; place-items: center; padding: 40px; }
.login-side form { position: relative; width: 100%; max-width: 380px; padding: 28px; border: 1px solid transparent; border-radius: 14px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box; box-shadow: 0 0 80px rgba(61, 139, 255, .08); }
.login-side form::before { content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; background: linear-gradient(90deg, transparent, rgba(61, 139, 255, .9), rgba(34, 211, 238, .6), transparent); }
.login-side h2 { font-size: 22px; margin: 8px 0 4px; font-weight: 650; }
.login-side .muted { margin-bottom: 18px; }
.login-side label { display: block; font-size: 12.5px; color: var(--muted); margin: 14px 0; }
.login-side input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font-size: 14.5px; }
.login-side .login-options { font-size: 13px; min-height: 1.2em; margin: 6px 0; }
.login-side .remember-login { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); margin: 0; font-size: 13px; line-height: 1.2; }
.login-side .remember-login input { flex: 0 0 14px; width: 14px; height: 14px; margin: 0; padding: 0; }
.login-side .login-options .error:empty { display: none; }

/* Staff setup uses the existing form and panel palette. */
#staff-assignment-form .form-fields { grid-template-columns: 1fr; }
#staff-assignment-form [hidden] { display: none !important; }
#staff-assignment-form .staff-options { max-height: 220px; overflow: auto; display: grid; gap: 8px; }
#staff-assignment-form .staff-options label { display: flex; align-items: start; gap: 10px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--field); }
#staff-assignment-form .staff-options input { flex: 0 0 15px; margin-top: 3px; }
#staff-assignment-form .staff-options small { display: block; color: var(--muted); overflow-wrap: anywhere; }
#staff-assignment-form #staff-error { padding: 0 20px; }
/* 注册入口：独立一行的次级按钮，不再夹在说明文字中间 */
.demo { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.demo b { color: var(--text); font-weight: 600; }
.demo p { margin: 0; }
.demo button { width: 100%; padding: 9px; }
.demo small { color: var(--faint); line-height: 1.6; }

/* ---------- 11 响应式 ---------- */
@media (min-width: 1700px) { .content { padding-left: 36px; padding-right: 36px; } }
@media (max-width: 1280px) {
  :root { --side-w: 196px; }
  .command-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-quality { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1280px) { .login-cube { display: none; } }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-grid, .dashboard-grid, .week-visual-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-side { min-height: 100vh; }
}
@media (max-width: 900px) {
  :root { --side-w: 176px; }
  aside { padding: 16px 8px 10px; }
  .brand { gap: 8px; padding: 0 4px 16px; font-size: 12px; }
  .brand small { display: none; }
  aside nav { overflow-x: hidden; }
  nav button { gap: 8px; padding: 9px 8px; font-size: 13px; }
  nav button.active::before { left: -8px; }
  .profile { flex-wrap: wrap; gap: 6px; padding: 0 4px; font-size: 12px; }
  .profile button { padding: 4px; }
  header { padding: 0 16px; }
  .content { padding: 16px 14px 8px; }
  .command-layout { grid-template-columns: 1fr; }
  footer { padding: 12px 16px 20px; }
  /* 窄屏：首列固定，横向滚动表格仍能看到是哪一行 */
  .content .table-scroll th:first-child, .content .table-scroll td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
}
@media (max-width: 640px) {
  :root { --side-w: 60px; }
  aside { padding: 10px 6px; background: var(--bg); }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; margin-bottom: 10px; padding: 8px; flex-shrink: 0; }
  .sidebar-toggle > span:first-child { width: 18px; font-size: 18px; }
  aside:not(.nav-expanded) .brand,
  aside:not(.nav-expanded) .nav-label,
  aside:not(.nav-expanded) .nav-group-label,
  aside:not(.nav-expanded) .profile > div { display: none; }
  aside:not(.nav-expanded) nav button { justify-content: center; padding: 11px 8px; min-height: 42px; }
  aside:not(.nav-expanded) .profile { justify-content: center; padding: 0; }
  aside:not(.nav-expanded) .profile button { margin: 0; font-size: 11px; }
  aside.nav-expanded { width: 216px; box-shadow: 12px 0 36px #0008; }
  aside.nav-expanded .sidebar-toggle { justify-content: flex-start; }
  aside.nav-expanded .brand { display: flex; padding: 0 8px 12px; font-size: 14px; }
  aside.nav-expanded .profile { flex-wrap: nowrap; }
  header { padding: 0 12px; font-size: 12px; }
  .header-right { display: none; }
  .content { padding: 14px 10px 8px; }
  html { font-size: 14.5px; }
  h1 { font-size: 20px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat strong { font-size: 21px; }
  .cockpit-controls { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .cockpit-controls select, .cockpit-controls input { max-width: none; width: 100%; }
  .gmv-chart text { font-size: 18px; }
  .production-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-quality { grid-template-columns: 1fr 1fr; }
  .week-history { flex-wrap: wrap; }
  .money-grid { grid-template-columns: 1fr; }
  .currency-card { flex-wrap: wrap; gap: 10px 18px; }
  .page-heading { align-items: stretch; }
  .page-heading .actions, .page-heading .actions select { width: 100%; max-width: none; }
  .list-toolbar input { width: 100%; }
  .form-fields { grid-template-columns: 1fr; }
  .record-detail { grid-template-columns: 1fr; }
  .record-detail dt { border: 0; padding-bottom: 0; }
  .task-line time { display: none; }
  .weekly-note:has(> .actions) { display: block; }
  .delivery-timeline > div { grid-template-columns: 1fr; }
  .delivery-timeline small { grid-column: 1; }
  footer span { display: none; }
  .login-side { padding: 16px; }
  .login-side form { padding: 20px; }
  dialog { max-height: 94vh; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Account review controls retain the supplied visual theme. */
.review-controls{flex-wrap:wrap;align-items:end}.review-controls label{display:grid;gap:6px}.review-controls select{max-width:260px}#snapshot-preview{max-height:48vh;overflow:auto}#snapshot-preview table{min-width:800px}#snapshot-status{white-space:pre-wrap}.review-controls input[type=date]{min-height:36px}@media(max-width:600px){.review-controls label{flex:1 1 140px;min-width:0}.review-controls select,.review-controls input{width:100%;max-width:100%}.review-controls button{flex:1 1 140px}}

/* Review-to-production linkage keeps the existing dark technology palette. */
.execution-panel{padding:18px;margin-top:16px;overflow-wrap:anywhere}
.execution-panel .panel-title{padding:0 0 14px;gap:12px;flex-wrap:wrap}
.execution-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.execution-links>div{border:1px solid var(--border,#243246);border-radius:8px;padding:14px;min-width:0}
.execution-links small,.execution-links b{display:block;margin-bottom:8px}
.execution-links button{margin:4px 6px 0 0}
.execution-panel form{display:grid;gap:12px;margin:16px 0}
.execution-panel form label{display:grid;gap:8px}
.execution-panel .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.execution-schedule{margin-top:20px}
@media(max-width:560px){.execution-links{grid-template-columns:1fr}.execution-panel{padding:12px}.execution-panel .stat strong{font-size:1.6rem}}

#modal.execution-modal{width:min(900px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
.content-inbox{margin-bottom:24px}
.content-inbox>.panel-title{align-items:center;flex-wrap:wrap;gap:16px}
.content-inbox .panel-title p{margin:6px 0 0}
.content-inbox .panel-title label{display:grid;gap:6px;font-size:14px}
.content-inbox .inbox-counts{padding:18px 18px 0;margin:0;gap:12px}
.content-inbox .stat{min-width:0;text-align:left;cursor:pointer}
.content-inbox .inbox-selected{outline:2px solid #26cee5;outline-offset:2px}
.inbox-toolbar{padding:18px;display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.inbox-toolbar>span{color:var(--muted);font-size:14px}
.inbox-list{padding:0 18px}
.inbox-item{display:flex;gap:20px;align-items:center;justify-content:space-between;border-top:1px solid var(--border,#243246);padding:18px 0;overflow-wrap:anywhere}
.inbox-item-body{min-width:0;flex:1}
.inbox-item-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.inbox-item h3{font-size:16px;margin:0;line-height:1.5}
.inbox-item p{margin:8px 0 0;font-size:14px;line-height:1.7}
.inbox-category{font-size:13px;color:#57a0ff;white-space:nowrap}
.inbox-data .inbox-category{color:#ffad67}.inbox-draft .inbox-category{color:#b496ff}.inbox-retest .inbox-category{color:#1ed4e6}
.inbox-overdue{font-size:13px;color:#ff6d88;background:#ff6d8815;border:1px solid #ff6d8840;border-radius:5px;padding:2px 7px;white-space:nowrap}
.inbox-item>.actions{flex-shrink:0;flex-wrap:wrap;max-width:260px}
.inbox-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 18px;border-top:1px solid var(--border,#243246);font-size:14px;color:var(--muted)}
@media(max-width:800px){.content-inbox .inbox-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.inbox-item{display:block}.inbox-item>.actions{margin-top:12px;max-width:100%}.content-inbox .panel-title>.actions{flex-wrap:wrap}.content-inbox .stat strong{font-size:26px}}
.content-review{display:grid;gap:18px}
.content-review .stats{margin:0;gap:12px}
.content-review-toolbar{padding:20px;display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:space-between}
.content-review-toolbar h2{margin:0 0 6px}
.content-review-toolbar p{margin:0;color:var(--muted)}
.content-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.content-review-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.content-review-heading h3{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere}
.content-review-heading b{white-space:nowrap;font-variant-numeric:tabular-nums}
.content-review .bar-track{height:6px;background:#192941;overflow:hidden;margin:10px 0}
.content-review .bar-track i{display:block;height:100%;background:linear-gradient(90deg,#3f7cff,#16d8e7)}
.content-review .weekly-note:nth-of-type(3n+2) .bar-track i{background:linear-gradient(90deg,#7b5cff,#c98aff)}
.content-review .weekly-note:nth-of-type(3n) .bar-track i{background:linear-gradient(90deg,#00b6b0,#35db9b)}
.content-review .panel-note,.content-review .notice{margin:0}
.content-review .weekly-note p{overflow-wrap:anywhere}
@media(max-width:800px){.content-review-grid{grid-template-columns:1fr}.content-review-toolbar{padding:16px}.content-review-toolbar .actions{width:100%}.content-review-toolbar label{flex:1;min-width:135px}.content-review-heading{align-items:flex-start}.content-review .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.content-review .stat strong{font-size:24px}}

/* Staff snapshot submission and management review, matching the existing theme. */
.submission-intro{padding:20px;display:flex;gap:20px;align-items:center;justify-content:space-between}.submission-intro p{color:var(--muted);margin:8px 0 0}.submission-intro button{flex-shrink:0}.submission-counts{grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0}.submission-counts .stat{text-align:left}.submission-counts [aria-pressed="true"]{outline:1px solid #20cddd;outline-offset:2px}.submission-search{padding:16px;display:flex;align-items:end;gap:16px}.submission-search input{min-width:220px}.submission-form{display:grid;gap:14px}.submission-form label{min-width:0}.submission-form select{width:100%;max-width:100%}.submission-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.submission-history{margin-top:20px}.submission-history article{padding:14px 0;border-bottom:1px solid #1e2c40;overflow-wrap:anywhere}.submission-history small{display:block;color:#8fa3bc}.submission-ack{display:flex;align-items:center;gap:8px;margin:12px 0}.submission-ack input{width:auto}.submission-form textarea,#submission-review-note{width:100%;box-sizing:border-box}
@media(max-width:600px){.submission-intro,.submission-search{align-items:stretch;flex-direction:column}.submission-counts{gap:8px}.submission-counts .stat{padding:12px 10px}.submission-counts .stat p{font-size:11px}.submission-counts .stat strong{font-size:24px}.submission-search input{min-width:0;width:100%}.submission-intro{padding:16px}}

/* Employee account registration and verified onboarding. */
.onboarding-panel .panel-title{flex-wrap:wrap;gap:14px}.onboarding-panel .panel-title h2{margin-bottom:6px}.onboarding-panel .actions{flex-wrap:wrap}
.onboarding-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px 16px 0}.onboarding-stats .stat{text-align:left;min-width:0}.onboarding-stats .stat strong{font-size:26px}
.onboarding-steps{display:flex;flex-wrap:wrap;gap:12px 24px;padding:16px;color:var(--muted,#93a4bf);font-size:14px}.onboarding-notice{margin:0 16px;padding:14px;border:1px solid #684623;background:#241c14;border-radius:8px}.onboarding-notice p{margin:8px 0 0}
#asset-review-form .record-detail dd{overflow-wrap:anywhere}#asset-review-note{width:100%;margin-top:8px}#asset-review-form select{width:100%}
@media(max-width:640px){.onboarding-stats{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 12px 0;gap:10px}.onboarding-panel .panel-title .actions{width:100%}.onboarding-panel .panel-title .actions button{flex:1}.onboarding-steps{display:grid;grid-template-columns:1fr;gap:8px;padding:12px}.onboarding-stats .stat{padding:14px}.onboarding-stats .stat strong{font-size:24px}}

/* 日报核对：延续科技感配色，缺失与零值分别呈现。 */
.quality-toolbar{padding:18px;margin-bottom:14px}.quality-toolbar h2{margin:0 0 8px}.quality-toolbar p,.quality-toolbar label{color:var(--muted,#8e9db3);font-size:12px}.quality-toolbar .actions{margin-top:16px;flex-wrap:wrap;align-items:end;gap:12px}.quality-toolbar label{display:grid;gap:6px}.quality-summary-body{display:flex;flex-wrap:wrap;align-items:center;gap:24px;padding:16px}.quality-summary-body>div{display:grid;gap:5px;min-width:80px}.quality-summary-body b{font-size:25px;color:#28d3e5;font-variant-numeric:tabular-nums}.quality-summary-body>div:first-child b{color:#ffab68}.quality-summary-body>div:nth-child(2) b{color:#c09aff}.quality-summary-body span,.quality-summary-body p{font-size:12px;color:#95a4bc;line-height:1.8}.quality-summary-body p{flex:1;min-width:230px;margin:0}.quality-legend{display:flex;flex-wrap:wrap;gap:18px;font-size:12px;margin:18px 0}.quality-shops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.quality-shops .panel{min-width:0}.quality-shops .panel-title{align-items:start;gap:10px}.quality-shops .panel-title p{font-size:12px;color:#95a4bc;margin:6px 0 0}.quality-shop-body{padding:16px}.quality-shop-body>p{font-size:12px;color:#95a4bc}.quality-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}.quality-calendar button{display:grid;gap:5px;text-align:center;padding:10px 2px;min-width:0;font-size:12px;border:1px solid}.quality-calendar small{font-size:10px}.q-complete{color:#35d6b0}.q-issue{color:#ffd05b}.q-missing{color:#ff9672}.quality-calendar .q-complete{background:#11302e;border-color:#285548}.quality-calendar .q-issue{background:#2b261a;border-color:#5d4c27}.quality-calendar .q-missing{background:#2d1e20;border-color:#643936}.quality-calendar button:hover,.quality-calendar button:focus-visible{outline:2px solid #20d0df;outline-offset:2px}.quality-day-record{padding:14px 0;border-bottom:1px solid #223047;margin-bottom:14px}.quality-day-record p{overflow-wrap:anywhere;line-height:1.8;color:#a7b4ca}.daily-help{margin:16px 0}.daily-help p{line-height:1.8;overflow-wrap:anywhere}.report-tools{margin:0 0 16px;flex-wrap:wrap}#daily-result td:last-child{min-width:220px;white-space:normal}#daily-result td{vertical-align:top}#daily-result{margin-top:20px}#daily-result h3{font-size:15px}.shop-quality-summary .panel-title,.quality-shops .panel-title{flex-wrap:wrap}
@media(max-width:1000px){.quality-shops{grid-template-columns:1fr}}@media(max-width:600px){.quality-toolbar .actions>*{flex:1 1 140px;min-width:0}.quality-toolbar select,.quality-toolbar input{width:100%}.quality-calendar{gap:5px}.quality-summary-body{gap:16px}.quality-calendar button{font-size:11px}.quality-summary-body>div{min-width:65px}.quality-summary-body>p{min-width:100%}}

/* 日报带入周报：独立核对与来源记录 */
.weekly-daily-panel{margin:16px 0}.weekly-daily-panel small,.weekly-daily-table small{display:block;margin-top:5px;color:var(--muted,#8c9bb2);font-size:12px}
.weekly-daily-controls{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:20px 0}.weekly-daily-controls label{display:grid;gap:7px;flex:1;min-width:150px}.weekly-daily-controls input,.weekly-daily-controls select{width:100%}.weekly-daily-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.weekly-daily-heading h3{margin-bottom:6px}
.daily-check-state{color:#37d4dc}.needs-check,.weekly-daily-panel small.needs-check,.weekly-daily-table small.needs-check{color:#ffb066}.weekly-daily-table table{min-width:760px}.weekly-daily-table td{vertical-align:top}.weekly-daily-table input[type=checkbox],.weekly-daily-confirm input[type=checkbox]{width:17px;height:17px;accent-color:#24cce4;vertical-align:middle}.weekly-daily-table details{max-width:280px}.weekly-daily-table li{margin:6px 0}
.weekly-daily-confirm{display:grid;gap:14px;padding:16px;margin:14px 0;background:#0d1726;border:1px solid #203047;border-radius:10px}.weekly-daily-confirm label{display:block}.weekly-daily-confirm textarea{display:block;width:100%;margin-top:8px}.weekly-daily-confirm p{margin:0}.weekly-daily-actions{justify-content:flex-end;flex-wrap:wrap;margin:16px 0}.weekly-source{border-top:1px solid #223146;padding:14px 0;margin-top:12px}.weekly-source summary{cursor:pointer;color:#32d2e6}.weekly-source table{min-width:680px}.weekly-source article{border-bottom:1px solid #223146;padding:12px 0}.weekly-source .table-scroll{margin-top:10px}
@media(max-width:600px){.weekly-daily-panel .panel-title{align-items:stretch;flex-direction:column;gap:12px}.weekly-daily-controls label{min-width:130px}.weekly-daily-controls button{width:100%}.weekly-daily-actions button{flex:1;min-width:140px}.weekly-daily-confirm{padding:12px}.weekly-daily-heading{align-items:flex-start}}
#wd-context{margin:20px 18px}#wd-result{padding:0 18px 18px}#wd-error{margin:0 18px}#wd-result .table-scroll{border:1px solid #223146;border-radius:8px}
@media(max-width:600px){#wd-context{margin:16px 12px}#wd-result{padding:0 12px 12px}.weekly-daily-controls label{min-width:140px}}


/* ==========================================================================
   v4.1 文案层级收敛 & TikTok 跨境经营增强样式
   ========================================================================== */
.nav-group-label {
  display: block;
  margin: 12px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--faint);
  text-transform: uppercase;
  user-select: none;
}
.nav-group-label:first-child { margin-top: 2px; }

.rule-tip {
  margin: 8px 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(15, 24, 40, .72);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}
.rule-tip summary {
  cursor: pointer;
  color: var(--cyan);
  font-weight: 500;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rule-tip summary::-webkit-details-marker { display: none; }
.rule-tip summary::before {
  content: "ⓘ";
  font-size: 13px;
  color: var(--accent-2);
}
.rule-tip[open] summary { margin-bottom: 6px; }
.rule-tip > div { color: var(--text-2); }

.notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}
.notice-bar b { color: var(--text); font-family: var(--mono); }

.cockpit-scope-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 14px;
  margin: 10px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.cockpit-scope-bar strong { color: var(--text); }
.cockpit-scope-bar .rule-tip {
  margin: 0 0 0 auto;
  padding: 4px 10px;
  background: rgba(61, 139, 255, .08);
}
.cockpit-scope-bar .rule-tip[open] {
  flex: 1 0 100%;
  margin: 4px 0 0;
  padding: 8px 12px;
}

.market-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--cyan);
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .28);
  vertical-align: middle;
}

.tk-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}
.tk-metrics-strip > div {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.tk-metrics-strip span { font-size: 12px; color: var(--muted); }
.tk-metrics-strip b {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  letter-spacing: -.01em;
}
.tk-metrics-strip small { font-size: 11.5px; color: var(--faint); }

.tk-channel-panel { padding: 14px 16px; margin-bottom: 14px; }
.tk-channel-panel h3 { margin: 0; font-size: 14px; }
.tk-channel-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
  margin: 10px 0;
}
.tk-channel-bar i { display: block; height: 100%; }
.tk-channel-bar .ch-video, .tk-channel-legend .ch-video { background: linear-gradient(90deg, #3d8bff, #22d3ee); }
.tk-channel-bar .ch-card, .tk-channel-legend .ch-card { background: linear-gradient(90deg, #a58bff, #f08fc8); }
.tk-channel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--text-2);
}
.tk-channel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tk-channel-legend em {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.tk-channel-legend b { font-family: var(--mono); color: var(--text); }

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
}
.quick-pills button {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 999px;
}

input::placeholder, textarea::placeholder {
  color: var(--faint);
  opacity: .9;
}

@media (max-width: 900px) {
  .tk-metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cockpit-scope-bar { padding: 10px 12px; }
  .cockpit-scope-bar .rule-tip { margin-left: 0; }
  .notice-bar { padding: 10px 12px; }
  .notice-bar button { width: 100%; }
  .tk-metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tk-metrics-strip > div { padding: 10px 12px; }
  .tk-metrics-strip b { font-size: 16px; }
  .quick-pills { gap: 6px; }
  .quick-pills button { padding: 6px 10px; }
}

/* Keep attribution amounts independent: they are not additive channel shares. */
.tk-channel-rows{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:16px}
.tk-channel-rows>div>span{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tk-channel-rows .tk-channel-bar{margin:10px 0 6px}
.tk-channel-rows small{color:var(--muted)}
@media(max-width:600px){.tk-channel-rows{grid-template-columns:1fr}}

/* Admin-only payroll workspace. */
#payroll-root{display:flex;flex-direction:column;gap:16px;min-width:0}
#payroll-root .cockpit-hero{flex-wrap:wrap;gap:18px}
#payroll-root .cockpit-hero p{margin:6px 0 0;color:var(--muted)}
#payroll-root .actions label{display:grid;gap:6px;font-size:12px}
#payroll-root .stats{margin:0}.payroll-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-width:0}
.payroll-stages{display:flex;flex-wrap:wrap;gap:12px;padding:18px}.payroll-stages>div{display:grid;gap:12px;min-width:72px}.payroll-stages strong{font-size:26px}
.payroll-trend{padding:18px;display:grid;gap:16px}.payroll-trend>div{display:grid;grid-template-columns:1fr auto;gap:4px}.payroll-trend progress{grid-column:1/-1}
.payroll-sub{display:block;color:var(--muted);margin-top:5px}.payroll-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.payroll-totals>div{background:var(--surface-2);border:1px solid var(--line-2);border-radius:8px;padding:14px;min-width:0}.payroll-totals small{color:var(--muted)}.payroll-totals strong{display:block;margin-top:6px;font-size:19px;overflow-wrap:anywhere}
#payroll-dialog{width:min(960px,94vw)}#payroll-dialog fieldset{border:0;padding:0;margin:0;min-width:0}#payroll-dialog label{display:grid;gap:6px;font-size:13px;color:var(--text-2)}
#payroll-dialog .payroll-wide{grid-column:1/-1}#payroll-dialog textarea{width:100%;min-height:70px}
#payroll-dialog input[type=checkbox]{width:16px;min-height:16px;accent-color:var(--accent)}
.payroll-staff{display:grid;grid-template-columns:1fr 1fr;gap:10px}.payroll-staff label,#payroll-dialog .payroll-check{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:8px}.payroll-staff small{display:block;color:var(--muted);margin-top:6px}
.payroll-edit-section{margin:20px 0;padding-top:14px;border-top:1px solid var(--line)}.payroll-source{padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:12px}.payroll-source>label{display:flex!important;align-items:center;gap:12px}.payroll-source .form-fields{margin-top:10px}
.payroll-custom-row{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:end;margin:12px 0}.payroll-custom-row>*{min-width:0}
#payroll-root .table-scroll table{min-width:830px}#payroll-dialog .modal-footer{flex-wrap:wrap;gap:8px}#payroll-dialog details{margin:14px 0}#payroll-dialog .error{white-space:pre-wrap}
@media(max-width:1000px){.payroll-grid{grid-template-columns:1fr}}
@media(max-width:640px){.payroll-totals{grid-template-columns:1fr 1fr;gap:8px}.payroll-totals>div{padding:10px}.payroll-totals strong{font-size:16px}.payroll-staff{grid-template-columns:1fr}.payroll-custom-row{grid-template-columns:1fr 1fr}.payroll-custom-row label:first-child{grid-column:1/-1}#payroll-root .cockpit-hero .actions{width:100%}#payroll-root .actions label{flex:1;min-width:120px}#payroll-root .actions input,#payroll-root .actions select{width:100%}}

/* Public website filing, shared by login and workspace. */
.site-compliance{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;padding:18px 20px;color:#94a3b8;font-size:12px;line-height:1.7;background:#070c16;border-top:1px solid #1c293e}.site-compliance a{color:#b3c8e5;text-decoration:none}.site-compliance a:hover{text-decoration:underline}.site-compliance a:focus-visible{outline:2px solid #22d3ee;outline-offset:4px}
