/* YMER BI 网页样式：浅色商务风；品牌红只用于 Logo、主按钮和选中的菜单 */
:root {
  --brand: #D80C0C;
  --brand-dark: #B00A0A;
  --ink: #1B2A47;          /* 登录页左侧 */
  --nav: #1C1F24;          /* 左侧菜单 */
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --line: #E4E7EC;
  --line-soft: #EEF0F3;
  --text: #1F2329;
  --muted: #5B6270;
  --good: #1E6B45;
  --good-bg: #E3F4EA;
  --warn: #8A4B0B;
  --warn-bg: #FDF1E3;
  --off-bg: #EEF0F3;
  --num: tabular-nums;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  --key-bg: #F6F8FB;       /* 表格重点列底色 */
  --pick: #FFD43B;          /* 切换按钮选中（黄底） */
  --pick-line: #E6B800;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand-dark); }
a:hover { color: #7A0606; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* ---------- 登录页 ---------- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-brand { flex: 1 1 520px; background: var(--ink); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 360px; }
.login-brand .logo { display: flex; align-items: center; gap: 14px; }
.login-brand .logo img { width: 72px; height: 72px; border-radius: 12px; display: block; }
.login-brand .logo b { font-size: 20px; letter-spacing: 1px; display: block; }
.login-brand .logo span { font-size: 13px; color: #C9D3E6; }
.login-brand h1 { margin: 0; font-size: 40px; line-height: 1.3; }
.login-brand p { margin: 0; font-size: 16px; line-height: 1.8; color: #C9D3E6; max-width: 520px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pills span { border: 1px solid #4A5E84; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #DCE3F0; }
.login-brand footer { font-size: 12px; color: #9FB0CE; }
.login-brand footer a { color: inherit; text-decoration: none; }
.login-brand footer a:hover { color: #fff; text-decoration: underline; }
.login-form-wrap { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-form { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 40px 36px; display: flex; flex-direction: column; gap: 20px; }
.login-form h2 { margin: 0; font-size: 24px; }
.login-form .sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input { height: 44px; border: 1px solid #D0D5DD; border-radius: 8px; padding: 0 14px; font-size: 15px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; }
.btn-primary { height: 46px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 500; cursor: pointer; }
.btn-primary:hover { background: var(--brand-dark); }
.hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- 主界面框架 ---------- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.nav { flex: 1 0 232px; max-width: 100%; background: var(--nav); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; }
.nav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 12px; color: #fff; text-decoration: none; font-weight: 700; }
.nav .brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > span { font-size: 12px; color: #A3A9B3; padding: 0 12px 6px; }
.nav-group a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; color: #C9CDD4; }
.nav-group a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-group a.active { background: var(--brand); color: #fff; font-weight: 500; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters select, .filters input[type=date] { height: 36px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; background: #fff; font-size: 14px; color: var(--text); max-width: 260px; }
.crumb { font-size: 14px; color: var(--muted); }
.me { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #FCE8E8; color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; }
.who { display: flex; align-items: center; gap: 8px; color: var(--text); }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 4px; font-size: 13px; }
.link-btn:hover { color: var(--brand-dark); }
.content { padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.card .label { font-size: 13px; color: var(--muted); }
.card .value { font-variant-numeric: var(--num); font-size: 26px; font-weight: 500; }
.card .value.pending { font-family: inherit; font-size: 16px; color: var(--muted); font-weight: 400; }
.card .src { font-size: 12px; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font-size: 16px; }
.panel .sub { font-size: 13px; color: var(--muted); }
.panels { display: flex; flex-wrap: wrap; gap: 14px; }
.panels > .panel { flex: 1 1 320px; }
.panels > .panel.wide { flex: 2 1 520px; }

.bars { height: 220px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line); padding-top: 8px; }
.bars .bar { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { background: var(--brand-dark); }
.bar-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts div { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: #F7F8FA; border-radius: 8px; font-size: 14px; }
.alerts small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.dot.warn { background: #B54708; }
.dot.ok { background: #1E8E5A; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; font-weight: 500; background: #F7F8FA; color: var(--muted); font-size: 13px; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th.num, td.num { text-align: right; font-variant-numeric: var(--num); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: var(--off-bg); color: var(--text); white-space: nowrap; }
.tag.p-天猫, .tag.p-淘宝 { background: #FDECEC; color: #A1271B; }
.tag.p-京东 { background: #FDEDEB; color: #9E2A2B; }
.tag.p-拼多多 { background: #FEF0E6; color: #9A3F0B; }
.t-good { color: var(--good); }
.t-mid { color: var(--warn); }
.t-none { color: var(--muted); }

.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sources .card { gap: 10px; }
.sources .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.sources .what { font-size: 13px; color: var(--muted); }
.sources .foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 10px; }
.sources .err { font-size: 12px; color: #8F1414; word-break: break-all; }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); margin: 0 0 8px; font-size: 18px; }
.empty p { margin: 0 auto; max-width: 520px; line-height: 1.8; }

@media (max-width: 700px) {
  .login-brand { padding: 32px 24px; }
  .login-brand h1 { font-size: 30px; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .nav-group { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav-group > span { display: none; }
}

/* ---------- 表单（用户与权限、修改密码） ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid #D0D5DD; border-radius: 8px; background: #fff; color: var(--text); font-size: 14px; text-decoration: none; }
.btn-secondary:hover { color: var(--text); background: #F7F8FA; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--brand-dark); }
.form-panels { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.field select { height: 44px; border: 1px solid #D0D5DD; border-radius: 8px; padding: 0 10px; font-size: 15px; background: #fff; }
.field input:disabled { background: #F7F8FA; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.check { font-size: 14px; color: var(--text); }
.shop-group { border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px 14px; margin: 0; }
.shop-group legend { padding: 0 6px; font-weight: 500; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 6px; }
.form-actions { display: flex; gap: 10px; }
.panel.narrow { max-width: 440px; gap: 16px; }

/* 数据上传 */
.upload-form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.upload-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.upload-form .drop { width: 100%; box-sizing: border-box; border: 2px dashed var(--line); border-radius: 10px; padding: 22px; align-items: center; text-align: center; cursor: pointer; }
.upload-form .drop:hover { border-color: var(--brand); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.6; }
.steps code { font-size: 12px; background: #F2F4F7; padding: 1px 5px; border-radius: 4px; }

/* ---------- 日毛利表 ---------- */
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); gap: 6px; }
.btn-ghost:hover { background: #F7F8FA; color: var(--text); border-color: #CDD2DA; }
.dp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dp-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 12px; }
.dp-title h1 { margin: 0; font-size: 22px; }
.dp-date { font-size: 15px; color: var(--muted); font-variant-numeric: var(--num); }

.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.15; }
.kpi-value.neg { color: var(--bad); }
.kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; min-height: 18px; }
.kpi-sub { color: var(--muted); }
.kpi-sub-r { margin-left: auto; }
.delta { font-weight: 500; white-space: nowrap; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.delta.flat { color: var(--muted); }
.spark { display: block; width: 100%; height: 34px; margin-top: 6px; overflow: visible; }
.spark polyline { fill: none; stroke: #A3AAB6; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .now { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.spark .hit { fill: transparent; }
.spark .hit:hover { fill: rgba(31, 35, 41, .12); }

.dp-table-panel { padding: 0; gap: 0; overflow: hidden; }
.dp-table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px 12px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--brand); }
.dp-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
.dp-table { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.dp-table th, .dp-table td { padding: 8px 12px; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.dp-table thead th { position: sticky; background: #F7F8FA; color: var(--muted); font-weight: 500; z-index: 2; }
.dp-table thead tr.grp th { top: 0; height: 34px; font-size: 12px; color: #8A909B; text-align: left; border-bottom: 1px solid var(--line); }
.dp-table thead tr:not(.grp) th { top: 34px; border-bottom: 1px solid var(--line); }
.dp-table thead tr.grp th.solo { text-align: right; vertical-align: bottom; font-size: 13px; color: var(--muted); }   /* 不分组的列：表头上下两行合并 */
.dp-table thead tr.grp th.solo.key { color: var(--text); }
.dp-table th.num, .dp-table td.num { text-align: right; font-variant-numeric: var(--num); }
.dp-table .grp-start { border-left: 1px solid var(--line); }
.dp-table .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 188px; border-right: 1px solid var(--line); text-align: left; }
.dp-table thead .sticky-col { z-index: 3; top: 0; background: #F7F8FA; vertical-align: bottom; }
.dp-table td.key { background-color: var(--key-bg); font-weight: 600; color: var(--text); }
.dp-table th.key { color: var(--text); }
.dp-table td.neg { color: var(--bad); }
.dp-table .zero { color: #C3C8D0; }
.dp-table tbody tr:hover td { background-color: #FAFBFC; }
.dp-table tbody tr:hover td.key { background-color: #EEF2F7; }
.dp-table tr.total td { font-weight: 600; background: #FBFBFC; border-bottom: 1px solid var(--line); }
.dp-table tr.total td.key { background: #EEF2F7; }
.dp-table tr.empty td { color: var(--muted); }
.shop-name { display: block; font-weight: 500; color: var(--text); }
.shop-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 400; }
.dp-table tr.total .shop-meta { display: block; }
.shop-meta .tag { padding: 0 6px; font-size: 11px; line-height: 18px; }
.dp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.seg { display: inline-flex; padding: 2px; background: #F0F2F5; border-radius: 8px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px rgba(16, 24, 40, .04); }
.dp-table.view-core .extra { display: none; }
/* 发货金额列底部的细条：占合计的比例 */
.dp-table td[style*="--bar"] { background-image: linear-gradient(#C9D3E3, #C9D3E3); background-size: var(--bar) 2px; background-position: right bottom 5px; background-repeat: no-repeat; }
.dp-hint { margin: 0; padding: 10px 20px 14px; font-size: 12px; color: var(--muted); }

.dp-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; scroll-margin-top: 16px; }
.dp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-text { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.dp-muted { font-size: 12px; color: var(--muted); }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.src-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.src-icon { flex: 0 0 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.src-list li.ok .src-icon { background: var(--good-bg); color: var(--good); }
.src-list li.miss .src-icon { background: var(--bad-bg); color: var(--bad); }
.src-name { flex: 1; min-width: 0; color: var(--text); }
.src-from { margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #F0F2F5; color: var(--muted); font-size: 11px; line-height: 18px; display: inline-block; }
.src-val { color: var(--muted); font-variant-numeric: var(--num); white-space: nowrap; }
.src-list li.miss .src-val { color: var(--bad); }
.dp-foot { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }

@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dp-bottom { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 22px; }
  .dp-table .sticky-col { min-width: 150px; }
}

/* ---------- 全站统一（2026-10 视觉升级，与日毛利表同一套规则） ---------- */
/* 左侧菜单：选中项用浅底 + 左侧品牌红细条，图标统一线条风格 */
.nav { gap: 18px; }
.nav-group a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; position: relative; }
.nav-group a.active { background: rgba(255, 255, 255, .10); color: #fff; font-weight: 500; }
.nav-group a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-group > span { font-size: 11px; letter-spacing: .5px; color: #8B929C; }

/* 页头：标题 + 副标题/状态 + 右侧操作 */
.page-head { align-items: center; }
.page-head h1 { font-size: 22px; letter-spacing: -.2px; }
.page-head > div > p { margin-top: 6px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 卡片区块标题行：标题 + 右侧说明/操作 */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head .sub { font-size: 13px; color: var(--muted); }
.panel.flush { padding: 0; gap: 0; overflow: hidden; }
.panel.flush > .panel-head { padding: 16px 20px 12px; }
.panel.flush > .table-wrap { border-top: 1px solid var(--line); }

/* 表格：发丝线、表头浅灰、悬停浅底，数字等宽 */
table { font-size: 13px; }
th { padding: 10px 14px; font-size: 12px; font-weight: 500; color: var(--muted); background: #F7F8FA; border-bottom: 1px solid var(--line); }
td { padding: 11px 14px; }
tbody tr:hover td { background-color: #FAFBFC; }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { display: block; font-weight: 500; color: var(--text); }
.cell-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.btn-secondary { gap: 6px; border-color: var(--line); }
.btn-secondary:hover { border-color: #CDD2DA; }
.btn svg, .btn-secondary svg { flex: 0 0 auto; }

/* 空状态（建设中等） */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.empty-state .icon { width: 48px; height: 48px; border-radius: 12px; background: #F0F2F5; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.empty-state .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin: 6px 0 0; font-size: 17px; }
.empty-state p { margin: 0; max-width: 520px; font-size: 14px; line-height: 1.8; color: var(--muted); }

/* 头像（用户列表） */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; background: #EEF1F6; color: #3A4A66; flex: 0 0 28px; }
.user-cell { display: flex; align-items: center; gap: 10px; }

/* 数据源卡片 */
.sources .card { padding: 16px 18px; }
.sources .head { font-size: 14px; }

/* ---------- 经营总览 ---------- */
:root { --series-1: #2a78d6; --series-neg: #e34948; }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ov-grid-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .base { stroke: #CDD2DA; stroke-width: 1; }
.chart .tick { font-size: 11px; fill: var(--muted); font-variant-numeric: var(--num); }
.chart .bar { fill: var(--series-1); opacity: .45; transition: opacity .12s; }
.chart .bar.neg { fill: var(--series-neg); }
.chart .bar-g.now .bar { opacity: 1; }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .bar { opacity: 1; }
.chart .bar-g:hover .hit { fill: rgba(31, 35, 41, .04); }

.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(80px, 2fr) 92px 56px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.rank li:last-child { border-bottom: 0; }
.rank-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .tag { font-size: 11px; padding: 0 6px; line-height: 18px; }
.rank-track { height: 8px; background: #F0F2F5; border-radius: 4px; overflow: hidden; }
.rank-bar { display: block; height: 100%; min-width: 2px; background: var(--series-1); border-radius: 4px; }
.rank-bar.neg { background: var(--series-neg); }
.rank-val { text-align: right; font-weight: 600; font-variant-numeric: var(--num); }
.rank-val.neg { color: var(--bad); }
.rank-rate { text-align: right; color: var(--muted); font-variant-numeric: var(--num); }

.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attention li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #F7F8FA; font-size: 14px; }
.attention li > span:nth-child(2) { flex: 1; min-width: 0; }
.attention small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.attention a { font-size: 13px; white-space: nowrap; }
.att-icon { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.attention li.warn .att-icon { background: var(--warn-bg); color: var(--warn); }
.attention li.bad .att-icon { background: var(--bad-bg); color: var(--bad); }
.attention li.ok .att-icon { background: var(--good-bg); color: var(--good); }

@media (max-width: 1000px) { .ov-grid, .ov-grid-wide { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .rank li { grid-template-columns: minmax(0, 1fr) 84px 52px; } .rank-track { display: none; } }

/* ---------- 数据上传 ---------- */
.up-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.upload-form { align-items: stretch; }
.upload-form .drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 20px; border: 1.5px dashed #CDD2DA; border-radius: 12px; background: #FAFBFC; transition: border-color .12s, background .12s; }
.upload-form .drop:hover, .upload-form .drop.over { border-color: var(--series-1); background: #F3F7FD; }
.upload-form .drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--series-1); }
.drop-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--text); }
.drop-sub { font-size: 12px; color: var(--muted); }
.drop-files { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--text); text-align: left; }
.drop-files li { padding: 2px 0; }
.src-list.single { grid-template-columns: 1fr; }
.howto summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.howto[open] summary { margin-bottom: 8px; }
.howto .steps { font-size: 13px; }
.howto .sub { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
td.wrap { white-space: normal; min-width: 280px; line-height: 1.6; }
.up-act { text-align: right; width: 1%; }
.up-act .link-btn { color: var(--bad); }
.up-undone td { color: var(--muted); }
.up-undone .cell-main { text-decoration: line-through; }
.up-day-head th { background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; padding-top: 16px; border-top: 1px solid var(--line); }
.up-day-head a { color: inherit; text-decoration: none; }
.up-day-head a:hover { color: var(--brand-dark); text-decoration: underline; }
.up-day-n { margin: 0 8px; font-weight: 400; color: var(--muted); font-size: 13px; }
.up-day.cur .up-day-head th { background: var(--key-bg); }
@media (max-width: 900px) { .up-grid { grid-template-columns: 1fr; } }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.tag-admin { background: #EEF1F6; color: #3A4A66; }
.form-panels .panel h2 { font-size: 16px; }
.btn { gap: 6px; }
.sources { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rank-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 顶部栏：日期切换、店铺选择弹层、用户菜单 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; padding: 10px 28px; min-height: 60px; transition: box-shadow .15s; }
.topbar.scrolled { box-shadow: 0 1px 0 var(--line), 0 4px 12px rgba(16, 24, 40, .06); }
.topbar-left { display: flex; align-items: center; min-width: 0; flex: 1; }
.filters { gap: 8px; }
.filters-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.topbar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.date-ctl { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.icon-btn { width: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; }
.icon-btn:hover { background: #F5F6F8; color: var(--text); }
.icon-btn.disabled { color: #D0D5DD; pointer-events: none; }
.date-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: pointer; font-size: 14px; color: var(--text); white-space: nowrap; }
.date-btn:hover { background: #F5F6F8; }
.date-btn svg { color: var(--muted); }
.date-main { font-weight: 500; font-variant-numeric: var(--num); }
.date-week { color: var(--muted); }
.date-rel { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #EEF3FC; color: #1F5FAF; }
.date-input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; border: 0; }
.date-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; color: var(--muted); background: #F0F2F5; text-decoration: none; white-space: nowrap; }
.chip:hover { color: var(--text); background: #E7EAEE; }
.chip svg { width: 12px; height: 12px; }

.pop { position: relative; }
.scope-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 340px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; color: var(--text); cursor: pointer; }
.scope-btn:hover, .scope-btn[aria-expanded="true"] { border-color: #CDD2DA; background: #FAFBFC; }
.scope-btn > svg:first-child { color: var(--muted); }
.scope-btn .tag { font-size: 11px; padding: 0 6px; line-height: 18px; }
.scope-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.scope-count { font-size: 12px; color: var(--muted); background: #F0F2F5; border-radius: 999px; padding: 0 7px; line-height: 18px; font-variant-numeric: var(--num); }
.caret { color: var(--muted); transition: transform .15s; }
[aria-expanded="true"] .caret { transform: rotate(180deg); }

.pop-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06); overflow: hidden; animation: pop-in .12s ease-out; }
.pop-panel.pop-right { left: auto; right: 0; width: 240px; }
@keyframes pop-in { from { transform: translateY(-4px); } to { transform: none; } }
.pop-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.pop-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 14px; color: var(--text); background: transparent; }
.pop-search kbd { font: inherit; font-size: 11px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.pop-list { max-height: min(60vh, 420px); overflow: auto; padding: 6px; }
.pop-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px; background: none; font-size: 14px; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.pop-item:hover, .pop-item.kb { background: #F3F5F8; color: var(--text); }
.pop-item.on { color: #1F5FAF; font-weight: 500; }
.pop-item .tag { font-size: 11px; padding: 0 6px; line-height: 18px; }
.pop-item-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.pop-shop { padding-left: 22px; }
.pop-shop.off .pop-item-main { color: var(--muted); }
.pop-group-head .pop-item-main { color: var(--muted); font-size: 13px; }
.pop-group-head.on .pop-item-main { color: #1F5FAF; }
.pop-item .check { width: 16px; height: 16px; color: #1F5FAF; }
.pop-empty { margin: 0; padding: 18px; text-align: center; font-size: 13px; color: var(--muted); }

.me-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer; }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: #F5F6F8; border-color: var(--line); }
.me-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.me-text b { font-size: 13px; font-weight: 500; color: var(--text); }
.me-text small { font-size: 11px; color: var(--muted); }
.me-head { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; }
.me-head b { font-size: 14px; }
.me-head small { font-size: 12px; color: var(--muted); }
.me-menu .pop-panel .pop-item { border-radius: 0; padding: 10px 14px; }
.me-menu form { margin: 0; }

@media (max-width: 700px) {
  .topbar { position: relative; padding: 10px 16px; }
  .me-text { display: none; }
  .filters-sep { display: none; }
  .scope-btn { max-width: 100%; }
}
.pop-panel[hidden], .pop-item[hidden], .pop-group[hidden], .pop-empty[hidden] { display: none; }
@media (max-width: 700px) { .nav-group a.active::before { display: none; } }

/* ---------- 部门权限 ---------- */
.perm-table td, .perm-table th { white-space: nowrap; }
.perm-item { min-width: 160px; }
.perm-col { text-align: center; width: 110px; }
.perm-table th.perm-col { vertical-align: bottom; }
.perm-dept { border: 0; background: none; padding: 2px 6px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.perm-dept:hover { background: #EEF1F6; }
.perm-count { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.perm-group td { background: #FAFBFC; font-size: 12px; color: var(--muted); padding: 6px 14px; }
.perm-check { display: inline-flex; position: relative; width: 20px; height: 20px; cursor: pointer; }
.perm-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.perm-check span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #CDD2DA; background: var(--surface); transition: background .1s, border-color .1s; }
.perm-check input:checked + span { background: var(--series-1); border-color: var(--series-1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.5 3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 14px; background-position: center; background-repeat: no-repeat; }
.perm-check input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* 数据体检 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.t-bad { color: var(--bad); }
.t-warn { color: var(--warn); }
.t-ok { color: var(--good); }
.hc-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ① 结论：体检分圆环 + 一句话 + 计数 */
.hc-hero { display: flex; align-items: center; gap: 22px; padding: 20px 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); --ring: var(--good); }
.hc-hero.bad { --ring: var(--bad); background: linear-gradient(90deg, var(--bad-bg), var(--surface) 70%); border-color: #F5C2BD; }
.hc-hero.warn { --ring: #C46A0C; background: linear-gradient(90deg, var(--warn-bg), var(--surface) 70%); border-color: #F3D5B0; }
.hc-hero.ok { background: linear-gradient(90deg, var(--good-bg), var(--surface) 70%); border-color: #B9E0C8; }
.hc-ring { position: relative; flex: 0 0 96px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hc-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hc-ring circle { fill: none; stroke-width: 7; }
.hc-ring-bg { stroke: rgba(0, 0, 0, .07); }
.hc-ring-val { stroke: var(--ring); stroke-linecap: round; }
.hc-ring b { font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: var(--num); color: var(--ring); }
.hc-ring span { margin-top: 4px; font-size: 11px; color: var(--muted); }
.hc-hero-text { flex: 1; min-width: 0; }
.hc-hero-text h2 { margin: 0; font-size: 19px; }
.hc-hero-text p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.hc-facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.hc-facts b { margin-right: 2px; font-size: 16px; font-weight: 600; color: var(--text); font-variant-numeric: var(--num); }
.hc-facts b.t-bad { color: var(--bad); }
.hc-facts b.t-warn { color: var(--warn); }
.hc-facts b.t-ok { color: var(--good); }
.hc-facts .hc-time { margin-left: auto; font-size: 12px; align-self: center; }

/* ② 检查项一览 */
.hc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.hc-step { position: relative; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.hc-step:hover { color: var(--text); border-color: #CDD2DA; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.hc-step .att-icon { grid-row: 1 / 3; }
.hc-step-name { font-size: 14px; font-weight: 500; }
.hc-step-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hc-step.bad { border-color: #F5C2BD; }
.hc-step.bad .hc-step-state { color: var(--bad); }
.hc-step.warn .hc-step-state { color: var(--warn); }
.hc-step.bad .att-icon { background: var(--bad-bg); color: var(--bad); }
.hc-step.warn .att-icon { background: var(--warn-bg); color: var(--warn); }
.hc-step.info .att-icon { background: var(--off-bg); color: var(--muted); }
.hc-step.ok .att-icon, .hc-passed .att-icon { background: var(--good-bg); color: var(--good); }

/* ③⑤ 问题卡片 */
.hc-section { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 -4px; font-size: 15px; }
.hc-section span { font-size: 13px; font-weight: 500; color: var(--muted); }
.hc-section small { font-size: 12px; font-weight: 400; color: var(--muted); }
.hc-list { display: flex; flex-direction: column; gap: 12px; }
.hc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; scroll-margin-top: 80px; }
.hc-card.bad { box-shadow: inset 4px 0 0 var(--bad); }
.hc-card.warn { box-shadow: inset 4px 0 0 #E0A35C; }
.hc-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 20px 10px 22px; }
summary.hc-card-head { padding-bottom: 16px; cursor: pointer; list-style: none; }
summary.hc-card-head::-webkit-details-marker { display: none; }
details[open] > summary.hc-card-head { padding-bottom: 10px; }
.hc-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; flex: 1 1 360px; }
.hc-card-title h3 { flex: 1 0 100%; margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.hc-name { font-size: 13px; color: var(--muted); }
.hc-card-side { display: flex; align-items: center; gap: 12px; }
.hc-owner { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #F3F4F6; font-size: 12px; color: var(--text); white-space: nowrap; }
.hc-owner svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; }
.hc-toggle { font-size: 13px; color: var(--brand-dark); white-space: nowrap; }
.hc-toggle::after { content: " ›"; }
details[open] .hc-toggle::after { content: " ⌄"; }
.hc-meta { margin: 0; padding: 0 20px 14px 22px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; line-height: 1.7; }
.hc-meta div { display: contents; }
.hc-meta dt { color: var(--muted); }
.hc-meta dd { margin: 0; }
.hc-meta .hc-rule dt, .hc-meta .hc-rule dd { color: var(--muted); font-size: 12px; }
.hc-search { padding: 0 20px 10px 22px; }
.hc-search input { width: 100%; max-width: 320px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.hc-table { border-top: 1px solid var(--line); }
.hc-table td.wrap { white-space: normal; min-width: 140px; max-width: 420px; line-height: 1.6; }
.hc-table tbody tr:hover td { background: #FAFBFC; }
.hc-act { width: 1%; text-align: right; }
.hc-ign { margin: 0; }
.hc-ign-btn { border: 1px solid transparent; background: none; border-radius: 6px; padding: 3px 8px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.hc-ign-btn:hover { border-color: var(--line); color: var(--text); background: var(--surface); }
.hc-nomatch { margin: 0; padding: 16px 22px; font-size: 13px; color: var(--muted); }
.hc-expand { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line-soft); background: #FAFBFC; color: var(--brand-dark); font-size: 13px; cursor: pointer; }
.hc-expand:hover { background: #F3F4F6; }
.hc-expand[hidden] { display: none; }
.hc-ignored { border-top: 1px solid var(--line-soft); font-size: 13px; }
.hc-ignored summary { padding: 10px 22px; color: var(--muted); cursor: pointer; }
.hc-ignored ul { list-style: none; margin: 0; padding: 0 22px 10px; }
.hc-ignored li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 8px 0; border-top: 1px dashed var(--line-soft); }
.hc-ignored-item { flex: 0 1 260px; font-weight: 500; }
.hc-ignored-why { flex: 1 1 240px; color: var(--muted); }
.hc-ignored small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.hc-ignored form { margin: 0; }

/* ④ 近 14 天体检记录 */
.hc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.hc-legend .hc-dot { margin-right: -6px; }
.hc-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; background: #E9ECF0; }
.hc-dot.bad { background: var(--bad); }
.hc-dot.warn { background: #E8A045; }
.hc-dot.info { background: #C5CBD5; }
.hc-dot.ok { background: #3A9B6A; }
.hc-dot.legacy { background: repeating-linear-gradient(45deg, #E9ECF0 0 3px, #F7F8FA 3px 6px); }
.hc-dot.none { background: transparent; border: 1px dashed #CDD2DA; }
.hc-matrix { width: auto; font-size: 12px; }
.hc-matrix thead th:not(.hc-matrix-name):not(.hc-legacy-col) { width: 56px; }
.hc-matrix th, .hc-matrix td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.hc-matrix thead th { background: #F7F8FA; }
.hc-matrix th a { color: var(--muted); text-decoration: none; display: block; line-height: 1.3; font-variant-numeric: var(--num); }
.hc-matrix th a:hover { color: var(--brand-dark); }
.hc-matrix th small { display: block; font-size: 11px; }
.hc-matrix .hc-matrix-name { position: sticky; left: 0; z-index: 1; text-align: left; padding-left: 20px; min-width: 104px; background: var(--surface); font-weight: 500; color: var(--text); font-size: 13px; }
.hc-matrix thead .hc-matrix-name { background: #F7F8FA; color: var(--muted); font-size: 12px; }
.hc-matrix .cur { background: #FFF6F5; }
.hc-matrix thead .cur a { color: var(--brand-dark); font-weight: 600; }
.hc-matrix .hc-legacy-col { width: 110px; color: var(--muted); font-size: 12px; background: repeating-linear-gradient(45deg, #F7F8FA 0 6px, #FFFFFF 6px 12px); border-right: 1px solid var(--line-soft); }
.hc-matrix thead .hc-legacy-col small { display: block; font-size: 11px; }
.hc-score-cell { display: inline-block; min-width: 28px; padding: 1px 4px; border-radius: 4px; font-weight: 600; font-variant-numeric: var(--num); }
.hc-score-cell.bad { color: var(--bad); background: var(--bad-bg); }
.hc-score-cell.warn { color: var(--warn); background: var(--warn-bg); }
.hc-score-cell.ok { color: var(--good); background: var(--good-bg); }

.hc-dot-link { display: inline-block; line-height: 0; border-radius: 5px; }
.hc-dot-link:hover .hc-dot { outline: 2px solid rgba(0, 0, 0, .18); outline-offset: 1px; }

/* 忽略对话框（外框用 .ob-dlg） */
.hc-dlg-body { display: flex; flex-direction: column; gap: 12px; }
.hc-dlg-body h2 { margin: 0; }
.hc-dlg-body p { margin: 0; }
.hc-dlg-item { margin: 0; padding: 10px 12px; border-radius: 8px; background: #F7F8FA; font-size: 13px; }
.hc-dlg-item span { display: block; font-size: 12px; color: var(--muted); }
.hc-dlg-item b { font-weight: 500; word-break: break-all; }
.hc-dlg-scope { margin: 0; font-size: 13px; color: var(--muted); }
.hc-dlg-label { font-size: 13px; font-weight: 500; }
.hc-dlg-label small { font-weight: 400; color: var(--muted); }
.ob-dlg textarea { width: 100%; padding: 8px 10px; border: 1px solid #D0D5DD; border-radius: 8px; font: inherit; font-size: 14px; resize: vertical; }
.hc-dlg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-dlg-chips button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; color: var(--muted); cursor: pointer; }
.hc-dlg-chips button:hover { color: var(--text); border-color: #CDD2DA; }

/* ⑥ 已通过 */
.hc-passed { list-style: none; margin: 0; padding: 4px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.hc-passed > li { border-bottom: 1px dashed var(--line-soft); scroll-margin-top: 80px; }
.hc-passed > li:last-child { border-bottom: 0; }
.hc-passed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; font-size: 14px; }
.hc-passed b { font-weight: 500; min-width: 84px; }
.hc-passed-row > span:last-child { color: var(--muted); font-size: 13px; }
.hc-passed .hc-ignored { border-top: 0; }
.hc-passed .hc-ignored summary { padding: 0 0 10px 32px; }
.hc-passed .hc-ignored ul { padding: 0 0 10px 32px; }

@media (max-width: 700px) {
  .hc-hero { flex-wrap: wrap; padding: 16px; gap: 14px; }
  .hc-ring { flex-basis: 76px; height: 76px; }
  .hc-ring b { font-size: 22px; }
  .hc-facts .hc-time { margin-left: 0; }
  .hc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-card-head { padding: 14px 16px 8px 18px; }
  .hc-meta { padding: 0 16px 12px 18px; grid-template-columns: 1fr; gap: 0; }
  .hc-meta dd { margin-bottom: 6px; }
}

/* 左侧菜单上的数字提醒 */
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }

/* 日毛利参数 */
.gp-errors { display: block; }
.gp-errors ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.8; }
.gp-facts { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--muted); line-height: 1.7; }
.gp-facts li::before { content: "·"; margin-right: 6px; }
.gp-facts li.warn { color: var(--warn); font-weight: 500; }
.gp-form { display: flex; flex-direction: column; gap: 14px; }
.gp-group + .gp-group { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line-soft); }
.gp-group h3 { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.gp-general { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; max-width: 760px; }
.gp-field { display: flex; flex-direction: column; gap: 6px; }
.gp-label { font-size: 13px; font-weight: 500; }
.gp-field small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.gp-num { display: inline-flex; align-items: center; height: 34px; border: 1px solid #D0D5DD; border-radius: 8px; background: var(--surface); overflow: hidden; }
.gp-num input { width: 100%; min-width: 0; height: 100%; border: 0; padding: 0 10px; font-size: 14px; font-variant-numeric: var(--num); text-align: right; background: transparent; }
.gp-num input:focus { outline: none; }
.gp-num i { flex: 0 0 auto; padding: 0 10px 0 2px; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gp-num-lg { height: 38px; }
.gp-table td { vertical-align: middle; }
.gp-table input[type=text]:not(.gp-num input), .gp-table select { height: 34px; padding: 0 10px; border: 1px solid #D0D5DD; border-radius: 8px; background: var(--surface); font-size: 14px; }
.gp-table .gp-num { width: 118px; }
.gp-table .gp-num.gp-return_coef { width: 80px; }
.gp-table .gp-num.gp-tax_rate { width: 90px; }
.gp-table select { width: 92px; }
.gp-table td.num .gp-num { width: 180px; }
.gp-team { width: 132px; }
.gp-table th, .gp-table td { padding-left: 10px; padding-right: 10px; }
.gp-order { white-space: nowrap; color: var(--muted); }
.gp-idx { display: inline-block; min-width: 18px; font-variant-numeric: var(--num); }
.gp-shop-name span { font-weight: 500; }
.gp-new-row { background: #F5FBF7; }
.gp-del { width: 1%; text-align: right; }
.gp-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.gp-add select { height: 32px; min-width: 260px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.gp-old { color: var(--muted); text-decoration: line-through; }
.gp-new { font-weight: 500; }
.gp-empty { margin: 0; padding: 16px 20px 20px; font-size: 13px; color: var(--muted); }

/* 用户与权限 */
.ua-issued { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 18px 22px; border: 1px solid #B9E0C8; border-radius: 12px; background: var(--good-bg); }
.ua-issued-head { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 320px; }
.ua-issued h2 { margin: 0; font-size: 16px; }
.ua-issued p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.ua-key { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--good); display: inline-flex; align-items: center; justify-content: center; }
.ua-key svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.ua-cred { margin: 0; display: flex; gap: 24px; }
.ua-cred dt { font-size: 12px; color: var(--muted); }
.ua-cred dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; letter-spacing: .5px; }
.ua-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ua-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.ua-stat:hover { border-color: #CDD2DA; }
.ua-stat b { font-size: 22px; font-weight: 600; font-variant-numeric: var(--num); }
.ua-stat span { font-size: 12px; color: var(--muted); }
.ua-stat.warn b { color: var(--warn); }
.ua-stat.bad b { color: var(--bad); }
.ua-toolbar h2 .sub { margin-left: 6px; font-weight: 400; }
.ua-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ua-filters input, .ua-filters select { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface); }
.ua-filters input { width: 180px; }
.ua-ops-h { text-align: right; }
.ua-ops { display: flex; align-items: center; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.ua-ops form { margin: 0; }
.ua-off td { color: var(--muted); }
.ua-off .avatar-sm { opacity: .5; }
.ua-empty { margin: 0; padding: 24px; text-align: center; font-size: 13px; color: var(--muted); }
.ua-pending { border-color: #F3D5B0; }
.ua-pending-n { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; line-height: 20px; text-align: center; vertical-align: middle; }
.ua-apply { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ua-apply li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.ua-apply li:last-child { border-bottom: 0; }
.ua-apply .user-cell { flex: 0 0 200px; }
.ua-apply-info { flex: 1 1 260px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.ua-apply-note { color: var(--muted); }
.uf-review { padding: 16px 20px; border-radius: 12px; border: 1px solid #F3D5B0; background: var(--warn-bg); }
.uf-review.rejected { border-color: var(--line); background: #F7F8FA; }
.uf-review h2 { margin: 0 0 6px; font-size: 16px; }
.uf-review p { margin: 2px 0; font-size: 14px; }
.uf-pw { display: flex; gap: 8px; }
.uf-pw input { flex: 1; min-width: 0; font-family: "SF Mono", Menlo, Consolas, monospace; }
.uf-pw .btn-sm { height: 44px; }
.uf-roles { gap: 12px; }
.uf-role { flex: 1 1 260px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.uf-role:has(input:checked) { border-color: #9AA3B2; background: #F7F8FA; }
.uf-role input { margin-top: 3px; }
.uf-role b { display: block; font-weight: 500; }
.uf-role small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.uf-shop-tools { display: flex; gap: 4px; }
.uf-disabled fieldset { opacity: .45; pointer-events: none; }
.uf-reject { margin: -4px 0 0; }
.uf-reject-btn { color: var(--bad); padding-left: 0; }
.uf-log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.uf-log li { display: grid; grid-template-columns: 140px 90px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 20px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.uf-log li:last-child { border-bottom: 0; }
.uf-log-time { color: var(--muted); font-variant-numeric: var(--num); }
.uf-log-act { font-weight: 500; }
.uf-log-detail { color: var(--text); }
.uf-log-by { color: var(--muted); }
@media (max-width: 700px) {
  .uf-log li { grid-template-columns: 1fr; gap: 2px; }
  .ua-filters input { width: 100%; }
}
/* 申请开通账号 */
.reg-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; }
.reg-steps li { counter-increment: s; padding: 6px 14px; border: 1px solid #4A5E84; border-radius: 999px; font-size: 13px; color: #DCE3F0; }
.reg-steps li::before { content: counter(s) " · "; color: #9FB0CE; }
.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reg-optional { font-weight: 400; color: var(--muted); font-size: 12px; }
.reg-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-done { align-items: center; text-align: center; }
.reg-done-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--good-bg); color: var(--good); font-size: 26px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.reg-back { display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; }

/* ---------- 全站推广加预算 ---------- */
/* 页头：标题 + 模式标签，次要操作靠右 */
.ob-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.ob-head-main p { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 720px; }
.ob-title { display: flex; align-items: center; gap: 10px; }
.ob-title h1 { margin: 0; font-size: 22px; }
.ob-head-actions { display: flex; gap: 8px; }
/* 自动 / 手动切换（运营 10-30 要求）：选中的一半是凸起的黄色按钮，没选中的一半是凹下去的白色；自动时前面加绿点表示正在自动改 */
.ob-head-actions:has(.ob-mode) { align-items: center; gap: 10px; }
.ob-mode-label { font-size: 13px; color: var(--muted); }
.seg.ob-mode { gap: 4px; padding: 3px; background: #E9ECF0; border: 1px solid var(--line); }
.seg.ob-mode button { padding: 6px 14px; font-size: 14px; }
.seg.ob-mode button[aria-pressed="false"] { background: var(--surface); color: var(--muted);
  box-shadow: inset 0 2px 3px rgba(16, 24, 40, .18), inset 0 0 0 1px rgba(16, 24, 40, .06); }
.seg.ob-mode button[aria-pressed="false"]:hover { color: var(--text); }
.seg.ob-mode button[aria-pressed="true"] { background: var(--pick); color: var(--text); font-weight: 600; cursor: default;
  box-shadow: 0 2px 0 var(--pick-line), 0 3px 6px rgba(16, 24, 40, .22); transform: translateY(-1px); }
.seg.ob-mode.is-auto button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 50%; background: var(--good); vertical-align: 2px; }
.ob-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; margin-left: 6px; padding: 0 6px;
  border-radius: 9px; background: var(--off-bg); color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: var(--num); }
.ob-count.warn { background: var(--warn-bg); color: var(--warn); }

/* 标签：结果状态、模式、核对结果，颜色全页统一 */
.ob-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.ob-tag.ok { background: var(--good-bg); color: var(--good); border-color: #BFE3CD; }
.ob-tag.warn { background: var(--warn-bg); color: var(--warn); border-color: #F4D3AE; }
.ob-tag.bad { background: var(--bad-bg); color: var(--bad); border-color: #F6C3BE; }
.ob-tag.info { background: #EAF1FE; color: #1D4ED8; border-color: #C7D8FB; }
.ob-tag.off { background: var(--off-bg); color: var(--muted); border-color: var(--line); }

/* 提示条：必须处理 / 请注意 / 说明 */
.ob-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ob-alerts:empty, .ob-alerts:not(:has(.ob-alert)) { display: none; }
.ob-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; border: 1px solid; font-size: 14px; line-height: 1.55; margin-bottom: 8px; }
.ob-alerts .ob-alert { margin-bottom: 0; }
.ob-alert b { font-weight: 600; margin-right: 8px; }
.ob-alert span:not(.ob-alert-icon) { color: var(--text); opacity: .85; }
.ob-alert-icon { flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; }
.ob-alert.bad { background: var(--bad-bg); border-color: #F6C3BE; } .ob-alert.bad .ob-alert-icon { background: var(--bad); }
.ob-alert.warn { background: var(--warn-bg); border-color: #F4D3AE; } .ob-alert.warn .ob-alert-icon { background: #D97706; }
.ob-alert.info { background: #EAF1FE; border-color: #C7D8FB; } .ob-alert.info .ob-alert-icon { background: #2563EB; }
.ob-fresh { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px;
  padding: 10px 14px; border-radius: 8px; background: #EAF1FE; border: 1px solid #C7D8FB; color: #1D3F8F; font-size: 14px; box-shadow: 0 4px 12px rgba(16, 24, 40, .08); }
.ob-fresh[hidden], .ob-err[hidden] { display: none; }

/* 数据状态条 */
.ob-meta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 20px; margin-bottom: 12px; }
.ob-meta-list { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.ob-meta-list div { display: flex; flex-direction: column; gap: 2px; }
.ob-meta-list dt { font-size: 12px; color: var(--muted); }
.ob-meta-list dd { margin: 0; font-size: 14px; font-weight: 500; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-height: 22px; white-space: nowrap; }
.ob-meta-list dd.warn { color: var(--warn); }
.ob-meta-list small { font-size: 12px; font-weight: 400; color: var(--muted); }
.ob-period { display: flex; align-items: center; gap: 10px; }
.ob-period-label { font-size: 12px; color: var(--muted); }
.seg a { padding: 5px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px rgba(16, 24, 40, .04); }

/* 汇总卡片 */
.ob-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ob-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ob-kpi.warn { border-color: #F4D3AE; background: linear-gradient(0deg, var(--surface), var(--surface)), var(--warn-bg); }
.ob-kpi.warn .ob-kpi-value { color: var(--warn); }
.ob-kpi-label { font-size: 13px; color: var(--muted); }
.ob-kpi-value { font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: var(--num); letter-spacing: -.3px; }
.ob-kpi-value small { margin-left: 3px; font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ob-kpi-sub { font-size: 12px; color: var(--muted); }

/* 卡片头 */
.ob-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 20px 12px; }
.ob-card-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ob-card-head .sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* 修改结果 */
.ob-result { margin-bottom: 12px; }
.ob-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 0 20px 14px; }
.ob-stat { display: flex; align-items: center; gap: 10px; }
.ob-stat-value { font-size: 22px; font-weight: 600; font-variant-numeric: var(--num); }
.ob-result-detail { border-top: 1px solid var(--line); }
.ob-result-detail > summary { padding: 12px 20px; cursor: pointer; font-size: 14px; color: var(--muted); }
.ob-result-detail > summary:hover { color: var(--text); }

/* 列表卡片：标签页 + 工具 */
.ob-main { margin-bottom: 12px; overflow: visible; }
.ob-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.ob-tablist { display: flex; gap: 4px; }
.ob-tablist [role="tab"] { position: relative; display: inline-flex; align-items: center; height: 48px; padding: 0 12px; border: 0; background: none;
  font-size: 14px; color: var(--muted); cursor: pointer; }
.ob-tablist [role="tab"]:hover { color: var(--text); }
.ob-tablist [role="tab"][aria-selected="true"] { color: var(--text); font-weight: 600; }
.ob-tablist [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.ob-search { height: 32px; width: 240px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.ob-pane-note { margin: 0; padding: 10px 20px; font-size: 13px; color: var(--muted); background: #FAFBFC; border-bottom: 1px solid var(--line-soft); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.ob-chip { height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 13px; color: var(--muted); cursor: pointer; }
.ob-chip:hover { color: var(--text); border-color: #CDD2DA; }
.ob-chip.on { border-color: var(--text); color: var(--text); font-weight: 500; }

/* 表格 */
.ob-grid { width: 100%; border-collapse: collapse; }
.ob-grid th { position: sticky; top: 0; z-index: 1; background: #F7F8FA; font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ob-grid td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; white-space: nowrap; }
.ob-grid th.num, .ob-grid td.num { text-align: right; font-variant-numeric: var(--num); }
.ob-grid td.wrap { white-space: normal; min-width: 220px; }
.ob-grid th:first-child, .ob-grid td:first-child { padding-left: 20px; }
.ob-grid th:last-child, .ob-grid td:last-child { padding-right: 20px; }
.ob-table td { vertical-align: middle; }
.ob-table tbody tr { cursor: pointer; }
.ob-table tbody tr:hover td { background: #FAFBFC; }
.ob-table tr.off td { opacity: .45; }
.ob-check { width: 44px; text-align: center; }
.ob-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.ob-m { display: none; }
.ob-amt { width: 100px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-variant-numeric: var(--num); }
.ob-amt:hover { border-color: #CDD2DA; }
.ob-amt.changed { border-color: #D97706; background: var(--warn-bg); }
.ob-amt.bad { border-color: var(--bad); background: var(--bad-bg); }
.ob-err { display: block; margin-top: 2px; font-size: 12px; color: var(--bad); white-space: nowrap; }
.ob-plus { color: var(--good); }
.ob-empty { margin: 0; padding: 20px; color: var(--muted); font-size: 14px; text-align: center; }
.ob-empty-card { align-items: center; text-align: center; padding: 40px 24px; }
.ob-empty-card p { max-width: 560px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.ob-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--off-bg); color: var(--muted); display: flex; align-items: center; justify-content: center; }

/* 底部操作栏（固定在屏幕底部） */
.ob-action { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 -4px 12px rgba(16, 24, 40, .06); }
.ob-action[hidden] { display: none; }
.ob-action-text { font-size: 14px; }
.ob-action-text b { font-size: 16px; font-variant-numeric: var(--num); }
.ob-action-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ob-action-btns { display: flex; gap: 8px; }
.ob-action .btn:not(.btn-ghost) { min-width: 120px; }
.ob-action .btn:disabled { background: #C9CDD4; cursor: not-allowed; }

/* 对话框 */
.ob-dlg { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; background: var(--surface); border-radius: 12px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); color: var(--text); }
.ob-dlg::backdrop { background: rgba(16, 24, 40, .45); }
.ob-dlg-body { padding: 22px 24px 8px; }
.ob-dlg-body h2 { margin: 0 0 14px; font-size: 17px; }
.ob-dlg-body p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; }
.ob-dlg-facts { margin: 0; padding: 12px 14px; border-radius: 8px; background: #F7F8FA; display: flex; flex-direction: column; gap: 8px; }
.ob-dlg-facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.ob-dlg-facts dt { color: var(--muted); }
.ob-dlg-facts dd { margin: 0; font-weight: 600; font-variant-numeric: var(--num); }
.ob-dlg-note { color: var(--warn); }
.ob-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; }

/* 页面内标签：今日建议 / 档位设置 / 修改记录 */
.ob-views { display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line); }
.ob-views a { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.ob-views a:hover { color: var(--text); }
.ob-views a[aria-current="page"] { color: var(--text); font-weight: 600; }
.ob-views a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.ob-alert.ok { background: var(--good-bg); border-color: #BFE3CD; } .ob-alert.ok .ob-alert-icon { background: var(--good); }
.ob-err-line { display: block; }
.ob-muted { color: var(--muted); font-size: 13px; margin: 0; }

/* 档位设置：左边编辑，右边预览 + 历史 */
.ob-settings { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.ob-settings-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ob-settings-main .panel h2, .ob-settings-side h2 { margin: 0; font-size: 16px; }
.ob-settings-main .panel .sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.ob-settings-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ob-matrix td { padding-top: 6px; padding-bottom: 6px; }
.ob-matrix input { width: 76px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  text-align: right; font-size: 14px; font-variant-numeric: var(--num); color: var(--text); transition: border-color .12s, background .12s; }
.ob-matrix input:hover { border-color: var(--line); background: var(--surface); }
.ob-matrix input:focus { border-color: var(--brand-dark); background: var(--surface); outline: none; box-shadow: 0 0 0 3px rgba(216, 12, 12, .12); }
.ob-matrix input[readonly] { pointer-events: none; }
.ob-matrix input.changed { border-color: #D97706; background: var(--warn-bg); }
.ob-matrix input.bad, .ob-field input.bad { border-color: var(--bad); background: var(--bad-bg); }
.ob-heat { background: rgba(216, 12, 12, calc(var(--h, 0) * .16)); }
.ob-range { font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 96px; }
.ob-range.bad { color: var(--bad); font-weight: 500; }
.ob-matrix tfoot td { padding-top: 10px; padding-bottom: 10px; border-bottom: 0; font-size: 13px; color: var(--muted); }
.ob-matrix tr.ob-new td { background: #FAFBFC; }
.ob-del-col { width: 44px; text-align: center; }
.ob-icon-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; opacity: .55; }
tr:hover .ob-icon-btn, .ob-icon-btn:focus-visible { opacity: 1; }
.ob-icon-btn:hover { background: var(--bad-bg); color: var(--bad); }
.ob-rule-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 20px 12px; font-size: 14px; }
.ob-rule-sentence input { width: 64px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-variant-numeric: var(--num); }
.ob-rule-sentence input.changed { border-color: #D97706; background: var(--warn-bg); }
.ob-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.ob-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ob-field > span:first-child { font-weight: 500; }
.ob-field input { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; color: var(--text); width: 100%; }
.ob-field input:focus { border-color: var(--brand-dark); outline: none; box-shadow: 0 0 0 3px rgba(216, 12, 12, .12); }
.ob-field input.changed { border-color: #D97706; background: var(--warn-bg); }
.ob-field input[readonly] { background: #F7F8FA; }
.ob-field small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ob-input-unit { position: relative; display: block; }
.ob-input-unit input { padding-right: 30px; text-align: right; font-variant-numeric: var(--num); }
.ob-input-unit i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); }
.ob-savebar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 12px rgba(16, 24, 40, .06); }
.ob-savebar-text b { font-size: 14px; }
.ob-savebar .btn:disabled { background: #C9CDD4; cursor: not-allowed; }
.ob-savebar a[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* 改动预览 */
.ob-preview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ob-preview .sub { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ob-pv-seg button { padding: 4px 8px; font-size: 12px; }
.ob-pv-stats { margin: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 8px; background: #F7F8FA; }
.ob-pv-stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ob-pv-stats dt { font-size: 13px; color: var(--muted); }
.ob-pv-stats dd { margin: 0; display: flex; align-items: baseline; gap: 6px; font-variant-numeric: var(--num); }
.ob-pv-stats dd span { color: var(--muted); font-size: 14px; }
.ob-pv-stats dd b { font-size: 18px; }
.ob-pv-stats .ob-arrow { color: #A0A6B1; font-size: 12px; }
.ob-pv-stats em { font-style: normal; font-size: 12px; min-width: 40px; text-align: right; }
.ob-pv-stats em { color: #1D4ED8; font-weight: 500; }   /* 增减只表示变化，不分好坏 */
.ob-pv-sub { margin: 4px 0 0; font-size: 13px; display: flex; align-items: center; }
.ob-pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 320px; overflow: auto; }
.ob-pv-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.ob-pv-name { font-weight: 500; word-break: break-all; }
.ob-pv-change { color: var(--muted); font-size: 12px; }

/* 修改历史时间线 */
.ob-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.ob-timeline > li { position: relative; }
.ob-timeline > li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid #A0A6B1; }
.ob-timeline > li:first-child::before { border-color: var(--brand); }
.ob-tl-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.ob-tl-head time { color: var(--muted); font-size: 12px; }
.ob-timeline ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-timeline ul li { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.ob-timeline .ob-tag { height: 18px; padding: 0 5px; font-size: 11px; }
.ob-diff s { color: #A0A6B1; } .ob-diff b { color: var(--text); font-weight: 600; }
.ob-chips-inline { padding: 0; border: 0; }

@media (max-width: 1100px) { .ob-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ob-settings { grid-template-columns: 1fr; } .ob-settings-side { position: static; } }
@media (max-width: 760px) {
  .ob-meta { flex-direction: column; align-items: stretch; padding: 12px 16px; }
  .ob-meta-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  .ob-period { flex-direction: column; align-items: flex-start; gap: 6px; }
  .seg { flex-wrap: wrap; }
  .ob-kpi { padding: 12px 14px; } .ob-kpi-value { font-size: 22px; }
  .ob-tabs { padding: 0 8px 10px; } .ob-tablist { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ob-tablist::-webkit-scrollbar { display: none; }
  .ob-tablist [role="tab"][aria-selected="true"]::after { bottom: 0; }
  .ob-tablist [role="tab"] { height: 44px; padding: 0 10px; white-space: nowrap; }
  .ob-search { width: 100%; }
  .ob-pane-note { padding: 10px 12px; }
  /* 手机：建议表改成一行一张卡片，只留勾选、计划、新预算 */
  .ob-table thead { display: none; }
  .ob-table, .ob-table tbody { display: block; }
  .ob-table tbody tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 0 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  .ob-table tbody tr[hidden] { display: none; }
  .ob-table td { display: block; padding: 0 !important; border: 0; }
  .ob-table td.ob-hm { display: none; }
  .ob-table td.ob-name { white-space: normal; min-width: 0; }
  .ob-table .cell-main { white-space: normal; word-break: break-all; }
  .ob-table .cell-sub { display: none; }
  .ob-m { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: normal; }
  .ob-m b { color: var(--text); }
  .ob-amt { width: 84px; }
  .ob-err { white-space: normal; max-width: 84px; text-align: right; }
  .ob-action { padding: 10px 12px; flex-wrap: wrap; }
  .ob-action-sub { display: none; }
  .ob-action-btns { flex: 1; justify-content: flex-end; }
  .ob-form-grid { grid-template-columns: 1fr; }
  .ob-views { overflow-x: auto; scrollbar-width: none; } .ob-views a { white-space: nowrap; padding: 0 10px; }
  .ob-savebar { flex-wrap: wrap; padding: 10px 12px; } .ob-savebar .ob-action-sub { display: none; }
  .ob-savebar-text { width: 100%; } .ob-savebar .ob-action-btns { width: 100%; }
  .ob-savebar .btn { flex: 1; padding: 0 8px; white-space: nowrap; font-size: 13px; }
  .ob-matrix .ob-range, .ob-matrix .ob-range-h { display: none; }
  .ob-rule-sentence { padding: 0 16px 12px; }
  .ob-matrix input { width: 56px; }
}

/* 全站统一补充（2026-10-30，见 docs/界面规范.md） */
a.ob-tag { text-decoration: none; }
a.ob-tag:hover { filter: brightness(.97); text-decoration: underline; }
.page-head .ob-tag, .dp-title .ob-tag { align-self: center; }
#ob-ask-body { white-space: pre-line; }
#ob-ask-body[hidden] { display: none; }
.ob-savebar { margin-top: 4px; }
.ob-savebar.dirty { border-color: #F4D3AE; background: #FFFBF4; }
.ob-savebar.dirty .ob-savebar-text b { color: var(--warn); }
.content > .ob-alert, .login-form .ob-alert, .reg-form .ob-alert { margin-bottom: 0; }
.ob-savebar .btn, .ob-action .btn { white-space: nowrap; }
/* 编辑类表格（要填数、要勾选）：按内容宽度排，名称后面紧跟要填的框，不撑满整行 */
/* 末尾补一个空白格吃掉多余宽度：表头灰条和分隔线照样铺满整张卡片，数据列紧凑靠左 */
table.fit, .ob-grid.fit { width: 100%; }
table.fit tr::after { content: ""; display: table-cell; width: 100%; }
table.fit thead tr::after { background: #F7F8FA; border-bottom: 1px solid var(--line); }
table.fit tbody tr::after { border-bottom: 1px solid var(--line-soft); }
table.fit tbody tr:last-child::after { border-bottom: 0; }
table.fit tbody tr:hover::after { background: #FAFBFC; }
table.fit tr.perm-group::after { background: #FAFBFC; }
.date-btn select.date-input { appearance: none; -webkit-appearance: none; font-size: 14px; }

/* 卡片头：说明放在标题下面，右边留给操作 */
.panel-head > div > .sub { display: block; margin-top: 4px; line-height: 1.6; }

/* 日毛利参数：通用参数 + 战队工资并排 */
/* 左右等宽、等高 */
.gp-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.gp-top .gp-general { max-width: none; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }   /* 够宽一行 3 个，窄了自动 2 个，数字不被截断 */
.gp-top .gp-num-lg { width: 100%; }
.gp-salary-list { width: 100%; }
.gp-salary-list td:first-child input { width: 100%; min-width: 120px; }
.gp-salary-list .gp-num, .gp-table.gp-salary-list td.num .gp-num { width: 160px; }
.gp-salary-list th.gp-del, .gp-salary-list td.gp-del { width: 44px; text-align: center; padding-left: 4px; }
.gp-salary-list tfoot td { padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--line); border-bottom: 0; font-weight: 500; }
.gp-salary-list tfoot td.num b { font-size: 15px; font-variant-numeric: var(--num); }
.gp-salary-list tfoot small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.gp-add-wide { padding: 0 20px 16px; }
.gp-dashed { width: 100%; height: 36px; border: 1px dashed #CDD2DA; border-radius: 8px; background: var(--surface); font-size: 14px; color: var(--muted); cursor: pointer; }
.gp-dashed:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
@media (max-width: 1100px) { .gp-top { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .gp-top .gp-general { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .gp-salary-list .gp-num, .gp-table.gp-salary-list td.num .gp-num { width: 116px; }
  .gp-salary-list td:first-child input { min-width: 0; }
  .gp-add-wide { padding: 0 12px 12px; }
}
/* 表格里给读屏用的隐藏文字是绝对定位的：让它留在可横向滚动的表格框里，免得手机上整页被撑宽 */
.table-wrap { position: relative; }

/* ---------- 表单控件统一（2026-10-30，见 docs/界面规范.md「表单控件」） ----------
   用 :where() 写成零优先级：各页面自己定的宽高照样生效，只统一边框、圆角、悬停、聚焦和下拉箭头 */
:root { --ctl-border: #D0D5DD; --ctl-hover: #A9B0BC; --ctl-focus-ring: 0 0 0 3px rgba(216, 12, 12, .12); }
:where(input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=tel], select, textarea) {
  border: 1px solid var(--ctl-border); border-radius: 8px; background-color: var(--surface); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
:where(input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=tel], select, textarea):hover { border-color: var(--ctl-hover); }
:where(input[type=text], input[type=search], input[type=password], input[type=number], input[type=email], input[type=tel], select, textarea):focus {
  outline: none; border-color: var(--brand-dark); box-shadow: var(--ctl-focus-ring);
}
:where(input, select, textarea):disabled { background-color: #F7F8FA; color: var(--muted); cursor: not-allowed; }
::placeholder { color: #A0A6B1; }
/* 下拉框：去掉浏览器自带的灰箭头，换成统一的细线箭头 */
select:not(.date-input):not([multiple]) {
  -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235B6270' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
/* 勾选框、单选：品牌色 */
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
/* 外框自己画边框的输入（数字框、搜索弹层、矩阵）不再叠一圈 */
.gp-num input:focus, .gp-num input:hover, .pop-search input:focus, .date-input:focus { box-shadow: none; }
.gp-num:hover { border-color: var(--ctl-hover); }
.gp-num:focus-within { border-color: var(--brand-dark); box-shadow: var(--ctl-focus-ring); }
.gp-table input.gp-changed, .gp-table select.gp-changed, .gp-num:has(input.gp-changed) { border-color: #D97706; background-color: var(--warn-bg); }

/* 行内文字按钮（撤回、全选、重新审核…）：浅底悬停，像按钮而不是光秃秃的字 */
.link-btn { border-radius: 6px; padding: 4px 8px; transition: background .12s, color .12s; }
.link-btn:hover { background: #F0F2F5; }
a.link-btn { text-decoration: none; display: inline-block; }

/* 表格里的排序按钮：上移 / 下移 */
.ob-move { display: inline-flex; flex-direction: column; vertical-align: middle; margin-left: 6px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.ob-move button { width: 22px; height: 15px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.ob-move button + button { border-top: 1px solid var(--line); }
.ob-move button:hover { background: #F0F2F5; color: var(--text); }
.ob-move svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
tr:first-child .ob-move [data-up], tr:last-child .ob-move [data-down] { opacity: .35; pointer-events: none; }

/* ---------- 采购 / 补货建议（.rp-*，其余沿用 ob- 组件） ---------- */
.rp-table tbody tr { cursor: default; }
.rp-split { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-lookup label, .rp-fields label, .rp-note { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.rp-row { display: flex; gap: 8px; }
.rp-row input { flex: 1; min-width: 0; }
.rp-ref { margin: 14px 0; }
.rp-ref dd small { display: block; color: var(--muted); }
.rp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-fields label:last-child { grid-column: 1 / -1; }
.rp-fields .gp-num { width: 160px; }
.rp-note { margin-top: 12px; }
.rp-submit { margin-top: 16px; display: flex; justify-content: flex-end; }
@media (max-width: 1180px) { .rp-split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .rp-table tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
}
.rp-prov .cell-main { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 补货建议第二版：采购单草稿、在途跟踪 */
.rp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.rp-toolbar .ob-search { width: 320px; max-width: 100%; }
.rp-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.rp-toggle input { accent-color: var(--brand); }
.rp-sup { margin-bottom: 14px; }
.rp-sup .ob-card-head .sub b { color: var(--text); font-variant-numeric: var(--num); }
.rp-otable tr.rp-addon td { background: #FCFCFD; }
.rp-otable .ob-name .ob-tag { margin-left: 4px; }
.rp-boxcell { white-space: nowrap; color: var(--muted); font-size: 13px; }
.rp-table .ob-name .ob-tag { margin-left: 4px; }
.rp-norule summary { cursor: pointer; margin-top: 4px; font-size: 13px; }
.rp-norule ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; columns: 2; column-gap: 24px; }
.t-muted { color: var(--muted); }
@media (max-width: 760px) {
  .rp-otable tbody tr { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .rp-norule ul { columns: 1; }
  .rp-toolbar .ob-search { width: 100%; }
}
/* 货品与供应商（沿用 .rp-* 和 ob- 组件） */
.ct-foot { margin: 8px 4px 0; font-size: 13px; }

/* ---------- 日毛利表：统计区间（单日 / 过去 7 天 / 过去 15 天 / 自定义） ---------- */
.period-seg { align-items: center; }
.period-seg .pop { display: inline-flex; }
.seg .seg-pop-btn { display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px 5px 12px; white-space: nowrap; }
.seg .seg-pop-btn:hover { color: var(--text); }
.seg .seg-pop-btn.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px rgba(16, 24, 40, .04); }
.seg .seg-pop-btn .caret { width: 14px; height: 14px; }
.range-btn { cursor: default; }
.range-btn:hover { background: transparent; }
.range-panel { left: auto; right: 0; width: 330px; padding: 14px; }
.range-fields { display: flex; align-items: flex-end; gap: 8px; font-size: 13px; color: var(--muted); }
.range-fields > span { padding-bottom: 8px; }
.range-fields label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.range-fields input { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--text); background: var(--surface); min-width: 0; }
.range-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.range-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.seg .range-panel .btn { height: 34px; padding: 0 18px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; box-shadow: none; }
.seg .range-panel .btn:hover { background: var(--brand-dark); }
.period-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.period-days a { display: inline-flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--text); text-decoration: none; font-variant-numeric: var(--num); }
.period-days a:hover { background: #F5F6F8; }
.period-days small { font-size: 11px; color: var(--muted); }
.period-days .live small { color: #B54708; }
.period-days .err small { color: #B42318; }
@media (max-width: 700px) {
  .range-panel { position: fixed; top: 110px; left: 16px; right: 16px; width: auto; }
}
