/*
 * 立刻出发 · 手机优先的日常操作网页
 * 以 iPhone 竖屏（约 440px 宽）为基准设计，电脑宽屏时底部导航变成左侧边栏。
 * 颜色全部用下面的变量；深色模式跟随系统，只改变量。
 */

:root {
  /* 品牌：LOGO 的金色。金底配深色字（白字对比度不够） */
  --brand: #ecb64a;
  --on-brand: #0b0b0b;
  --brand-ink: #8a5a00;          /* 白底上的金褐色文字，对比度 5.8:1 */
  --brand-wash: #fbf1dc;

  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink-1: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6f6d68;
  --hairline: #e1e0d9;
  --border: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.08);
  --chip: #efeee9;
  --grid-line: #e1e0d9;
  --baseline: #c3c2b7;

  /* 渠道（图表系列）颜色：携程/飞猪/美团固定对应，已用配色校验工具验证 */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;

  /* 状态色：只表示状态，永远配文字 */
  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --info: #2a78d6;
  --good-ink: #006300;
  --critical-ink: #b42d2d;

  --radius: 16px;
  --tabbar-h: 56px;

  color-scheme: light dark;
  accent-color: var(--brand-ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #ecb64a;
    --brand-wash: #3a2e14;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink-1: #f0efec;
    --ink-2: #c3c2b7;
    --ink-3: #a3a29a;
    --hairline: #2c2c2a;
    --border: #45453f;
    --ring: rgba(255, 255, 255, 0.08);
    --chip: #2a2a27;
    --grid-line: #2c2c2a;
    --baseline: #45453f;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --info: #3987e5;
    --good-ink: #0ca30c;
    --critical-ink: #e66767;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-1);
  font: 16px/1.5 system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.neg { color: var(--critical-ink); }
.pos { color: var(--good-ink); }
.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: clip; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 外框：内容区 + 导航 ---------- */

.main {
  inline-size: 100%;
  max-inline-size: 980px;
  margin-inline: auto;
  padding-block: calc(env(safe-area-inset-top) + 8px) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

.nav {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-block-end: env(safe-area-inset-bottom);
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-block-start: 1px solid var(--hairline);
}

.nav .brand { display: none; }

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-block-size: var(--tabbar-h);
  font-size: 11px;
  color: var(--ink-3);
  text-decoration: none;
}

.tab svg { inline-size: 24px; block-size: 24px; }
.tab[aria-current="page"] { color: var(--brand-ink); font-weight: 600; }

@media (min-width: 900px) {
  /* 电脑：左侧深色菜单（参考携程 VBK），选中项金色 */
  .shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); }
  .nav {
    position: sticky;
    inset-block-start: 0;
    block-size: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 10px;
    background: #14213a;
    border-block-start: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav .brand { display: block; margin: 0 6px 18px; padding: 10px; border-radius: 10px; background: #fff; }
  .nav .brand img { inline-size: 64px; block-size: auto; margin-inline: auto; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; min-block-size: 44px; padding-inline: 14px;
         border-radius: 8px; font-size: 15px; color: #c5cbd6; }
  .tab svg { inline-size: 20px; block-size: 20px; }
  .tab:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
  .tab[aria-current="page"] { background: rgba(236, 182, 74, 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
  .main { padding-block: 24px 48px; padding-inline: 28px; max-inline-size: 1200px; }
}

/* ---------- 页面头部 ---------- */

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px 16px;
}

.topbar h1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
.topbar .sub { font-size: 14px; color: var(--ink-2); margin-block-start: 2px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-block-size: 44px;
  color: var(--brand-ink);
  text-decoration: none;
  font-size: 16px;
}

/* ---------- 卡片、分组、列表 ---------- */

.stack { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 0 0 1px var(--ring);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 24px 4px 8px;
  font-size: 15px;
  font-weight: 600;
}

.section-title a { font-size: 14px; font-weight: 400; color: var(--brand-ink); text-decoration: none; }

.list {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--ring);
  overflow: clip;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px 16px;
  min-block-size: 44px;
  text-decoration: none;
}

.row + .row { border-block-start: 1px solid var(--hairline); }
a.row:active { background: var(--chip); }

.row .title {
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}

.row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.row .side { text-align: end; font-size: 15px; }
.row .side .small { display: block; }

.empty { padding: 24px 16px; text-align: center; color: var(--ink-2); }

/* ---------- 徽章、筛选条 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-1);
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--tone, var(--ink-3));
}

.tone-good { --tone: var(--good); }
.tone-warn { --tone: var(--warn); }
.tone-serious { --tone: var(--serious); }
.tone-critical { --tone: var(--critical); }
.tone-info { --tone: var(--info); }
.tone-muted { --tone: var(--ink-3); }
.ch-1 { --tone: var(--series-1); }
.ch-2 { --tone: var(--series-2); }
.ch-3 { --tone: var(--series-3); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-inline: -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-block-size: 36px;
  padding-inline: 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.chip[aria-current="true"] { background: var(--brand); color: var(--on-brand); box-shadow: none; font-weight: 600; }

/* ---------- 表单、按钮 ---------- */

.search { display: flex; gap: 8px; margin-block-end: 10px; }

input, select, textarea {
  inline-size: 100%;
  min-block-size: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-1);
  font: inherit;
  font-size: 16px; /* 小于 16px 时 iPhone 会自动放大页面 */
}

input[type="file"] { padding: 8px; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible,
button:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

.field label, .field .label { display: block; margin-block-end: 4px; font-size: 13px; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-block-size: 44px;
  padding-inline: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--chip);
  color: var(--ink-1);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.danger { background: transparent; color: var(--critical-ink); box-shadow: inset 0 0 0 1px var(--border); }
.btn.block { inline-size: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > form { display: contents; }
.btn-row .btn { flex: 1 1 140px; }

details.more > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-block-size: 44px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "展开"; font-weight: 400; font-size: 14px; color: var(--brand-ink); }
details.more[open] > summary::after { content: "收起"; }

/* ---------- 键值、消息 ---------- */

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--ink-2); font-size: 14px; }
.kv dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.kv dd.num { font-variant-numeric: tabular-nums; }
.kv .total { font-weight: 700; font-size: 17px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }

.messages { display: grid; gap: 8px; margin-block-end: 12px; }
.msg {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
  border-inline-start: 4px solid var(--tone, var(--info));
}

.note {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--brand-wash);
  font-size: 14px;
}

/* ---------- 工作台磁贴、指标 ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
  text-decoration: none;
  min-block-size: 88px;
}

.tile .n { font-size: 26px; font-weight: 650; line-height: 1.2; }
.tile .l { font-size: 13px; color: var(--ink-2); }
.tile.zero .n { color: var(--ink-3); }
.tile.alert { box-shadow: 0 0 0 2px var(--brand); }

.hero { padding: 20px 16px; }
.hero .label { font-size: 14px; color: var(--ink-2); }
.hero .value { font-size: clamp(40px, 11vw, 56px); font-weight: 650; line-height: 1.1; margin-block: 4px; }
.hero .foot { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-2); }

.stat .label { font-size: 13px; color: var(--ink-2); }
.stat .value { font-size: 24px; font-weight: 650; line-height: 1.25; }
.stat .delta { font-size: 13px; }

.urgent-list .row { border-inline-start: 4px solid var(--tone, var(--warn)); }

/* ---------- 图表：按月分渠道利润（堆叠柱） ---------- */

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-block-end: 12px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { inline-size: 12px; block-size: 12px; border-radius: 3px; background: var(--tone); }

.chart { position: relative; margin-inline-start: 40px; margin-block-end: 28px; }
.plot { position: relative; block-size: 200px; }

.gridline { position: absolute; inset-inline: 0; inset-block-end: var(--y); border-block-start: 1px solid var(--grid-line); }
.gridline.base { border-color: var(--baseline); }
.gridline span {
  position: absolute;
  inset-inline-end: calc(100% + 6px);
  translate: 0 -50%;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cols { position: absolute; inset: 0; display: flex; }

.col {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.col:hover, .col.is-active { background: color-mix(in oklab, var(--ink-1) 5%, transparent); }

.seg { flex: none; inline-size: min(22px, 70%); block-size: var(--h); background: var(--tone); }
.seg + .seg { box-shadow: inset 0 -2px 0 var(--surface); } /* 段与段之间留 2px 底色缝 */
.seg:last-child { border-start-start-radius: 4px; border-start-end-radius: 4px; }

.xlab {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  font-size: 11px;
  color: var(--ink-3);
}

.tip {
  position: absolute;
  z-index: 30;
  min-inline-size: 150px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring), 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  pointer-events: none;
}

.tip .t { color: var(--ink-2); margin-block-end: 4px; }
.tip .r { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 8px; }
.tip .r i { block-size: 2px; background: var(--tone); border-radius: 1px; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .r span { color: var(--ink-2); }

/* 横条：产品利润排行（单一系列） */
.hbars { display: grid; gap: 12px; }
.hbar .name { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.hbar .name span:last-child { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbar .track { margin-block-start: 4px; block-size: 10px; }
.hbar .bar {
  block-size: 100%;
  inline-size: max(var(--w), 2px);
  background: var(--series-1);
  border-start-end-radius: 4px;
  border-end-end-radius: 4px;
}

/* 数据表（图表的文字版） */
.table-wrap { overflow-x: auto; margin-block-start: 8px; }
table { border-collapse: collapse; inline-size: 100%; font-size: 13px; }
th, td { padding: 6px 8px; text-align: end; border-block-end: 1px solid var(--hairline); white-space: nowrap; }
th:first-child, td:first-child { text-align: start; }
td { font-variant-numeric: tabular-nums; }
th { color: var(--ink-2); font-weight: 600; }

/* ---------- 登录页 ---------- */

.login {
  min-block-size: 100dvh;
  display: grid;
  grid-template-columns: min(380px, 100%);
  justify-content: center;
  align-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.login .card { padding: 28px 24px; }
.login .logo { inline-size: 140px; block-size: auto; margin: 0 auto 20px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .tab, a.row, a.orow, .count { transition: background-color 0.15s, color 0.15s; }
}

/* =====================================================================
 * 参考携程 VBK 的版面：面板 + 小标题、短名称数字格子、带数量的标签、彩色状态文字、一行一单
 * ===================================================================== */

:root {
  --warn-ink: #b45309;
  --info-ink: #1d5fb8;
  --serious-ink: #b4461a;
}

@media (prefers-color-scheme: dark) {
  :root { --warn-ink: #f5a524; --info-ink: #6aa8f0; --serious-ink: #f08a5d; }
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--ring);
}

.panel + .panel, .panel + .grid2, .grid2 + .panel { margin-block-start: 12px; }

.panel-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 0;
  font-size: 16px;
  font-weight: 600;
}

.panel-h::before {          /* 小标题前的金色竖条 */
  content: "";
  inline-size: 3px;
  block-size: 16px;
  border-radius: 2px;
  background: var(--brand);
}

.panel-h .aside { margin-inline-start: auto; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.panel-h a.aside { color: var(--brand-ink); text-decoration: none; }
.panel-b { padding: 12px 16px 16px; }
.panel-b.flush { padding: 8px 0 0; }

@media (min-width: 900px) {
  .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .grid2 > .panel + .panel { margin-block-start: 0; }
}

/* 数字格子：短名称 + 大数字；有待办时数字变金褐色，选中时金色描边 */
.counts {               /* 一行排开（同 VBK），放不下时左右滑 */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78px, 1fr);
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.counts::-webkit-scrollbar { display: none; }

.count {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-block-size: 64px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--page);
  text-decoration: none;
}

.count .n { font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.count .l { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.count.hot .n { color: var(--brand-ink); }
.count[aria-current="true"] { background: var(--brand-wash); box-shadow: inset 0 0 0 1.5px var(--brand); }

/* 指标（昨日数据）：名称、数值、较前一天 */
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.metric { padding: 10px 12px; border-radius: 8px; background: var(--page); }
.metric .l { font-size: 12px; color: var(--ink-2); }
.metric .v { font-size: 20px; font-weight: 700; line-height: 1.3; }
.metric .d { font-size: 12px; color: var(--ink-2); }

/* 顶部标签：待处理 76 / 已完成 / 已取消 / 全部 */
.tabs {
  display: flex;
  gap: 22px;
  margin-inline: -16px;
  padding-inline: 16px;
  border-block-end: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding-block: 10px;
  margin-block-end: -1px;
  border-block-end: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.tabs a[aria-current="page"] { color: var(--ink-1); font-weight: 600; border-color: var(--brand); }
.tabs .c { font-size: 12px; color: var(--brand-ink); font-weight: 600; }

/* 筛选行：搜索 + 渠道 + 快筛 */
.filters { display: grid; gap: 8px; margin-block: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.quick a {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
  color: var(--ink-1);
  text-decoration: none;
}
.quick a[aria-current="true"] { background: var(--brand); color: var(--on-brand); box-shadow: none; font-weight: 600; }

/* 状态文字（不用徽章，颜色 + 文字） */
.st { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.st.warn { color: var(--warn-ink); }
.st.info { color: var(--info-ink); }
.st.good { color: var(--good-ink); }
.st.serious { color: var(--serious-ink); }
.st.critical { color: var(--critical-ink); }
.st.muted { color: var(--ink-3); font-weight: 400; }
.st-sub { display: block; font-size: 12px; font-weight: 400; color: var(--warn-ink); }

/* 渠道标签：小方块 + 渠道名 */
.chan { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chan::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 2px; background: var(--tone); }

/* 票种/资源说明的浅底标签（同 VBK 产品名下面的淡黄底框） */
.sku { display: inline-block; margin-block-start: 4px; padding: 1px 6px; border-radius: 4px; background: var(--brand-wash);
       font-size: 12px; color: var(--ink-2); }

/* 订单行：手机是卡片，电脑自动排成表格的一行 */
.olist { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--ring); overflow: clip; }

.orow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "no   no  st"
    "prod prod prod"
    "date qty amt";
  gap: 4px 12px;
  align-items: start;
  padding: 12px 16px;
  text-decoration: none;
}

.orow + .orow { border-block-start: 1px solid var(--hairline); }
a.orow:active { background: var(--chip); }
.orow .c-no { grid-area: no; display: flex; gap: 8px; align-items: center; min-inline-size: 0; font-size: 13px; color: var(--ink-2); }
.orow .c-no .no { overflow: clip; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orow .c-st { grid-area: st; text-align: end; }
.orow .c-prod { grid-area: prod; min-inline-size: 0; }
.orow .c-prod .name {
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: clip;
}
.orow .c-date { grid-area: date; font-size: 13px; color: var(--ink-2); }
.orow .c-guest { display: none; }
.orow .c-qty { grid-area: qty; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.orow .c-amt { grid-area: amt; text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orow.head { display: none; }

@media (min-width: 900px) {
  .orow {
    grid-template-columns: 190px 120px minmax(0, 1fr) 96px 140px 48px 96px;
    grid-template-areas: "no st prod date guest qty amt";
    align-items: center;
    gap: 12px;
  }
  .orow .c-st { text-align: start; }
  .orow .c-prod .name { -webkit-line-clamp: 1; line-clamp: 1; font-weight: 500; }
  .orow .c-guest { display: block; grid-area: guest; overflow: clip; text-overflow: ellipsis; white-space: nowrap;
                   font-size: 13px; color: var(--ink-2); }
  .orow .c-date, .orow .c-qty { font-size: 14px; color: var(--ink-1); }
  .orow.head { display: grid; padding-block: 10px; background: var(--page); }
  .orow.head span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
  a.orow:hover { background: color-mix(in oklab, var(--brand) 6%, var(--surface)); }
}

/* 订单详情：顶部信息 + 跳转标签 + 待办卡片 */
.ohead { padding: 16px; }
.ohead .no { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; font-weight: 700;
             font-variant-numeric: tabular-nums; }
.ohead .copy { min-block-size: 30px; padding-inline: 10px; font-size: 13px; font-weight: 400; }
.ohead .line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-block-start: 8px;
               font-size: 14px; color: var(--ink-2); }
.ohead .contact { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.ohead .contact .btn { min-block-size: 36px; padding-inline: 12px; font-size: 14px; font-weight: 500; }

.anchors {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  display: flex;
  gap: 18px;
  margin: 12px -16px;
  padding: 0 16px;
  background: color-mix(in oklab, var(--page) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.anchors::-webkit-scrollbar { display: none; }
.anchors a { padding-block: 10px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: 14px; }
section[id] { scroll-margin-block-start: 56px; }

.todo-card { padding: 12px; border-radius: 10px; background: var(--page); }
.todo-card .top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.todo-card .countdown { margin-inline-start: auto; font-size: 13px; font-weight: 600; color: var(--warn-ink); }
.todo-card .res { margin-block: 10px; font-size: 14px; }
.todo-card .res .muted { font-size: 13px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--ink-3); color: #fff;
       font-size: 12px; font-weight: 600; }
.tag.warn { background: var(--warn-ink); }
.tag.info { background: var(--info-ink); }
.tag.serious { background: var(--serious-ink); }
.tag.critical { background: var(--critical-ink); }
@media (prefers-color-scheme: dark) { .tag { color: #0b0b0b; } }

/* 快捷入口 */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.shortcuts a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  padding: 8px;
  border-radius: 8px;
  background: var(--page);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}
.shortcuts a:hover { background: var(--brand-wash); }
