/* ================= 酒店经营看板 · 红黑主题 ================= */
:root {
  --bg: #0B0909;
  --bg-2: #100D0D;
  --card: #171413;
  --card-2: #1D1918;
  --line: #2A2422;
  --line-2: #221D1C;
  --ink: #F6F1EF;
  --ink-2: #D6CDCA;
  --muted: #948A86;
  --brand: #C8102E;
  --brand-2: #E23A44;
  --brand-soft: rgba(200, 16, 46, .14);
  --gold: #C9A227;
  --gold-soft: rgba(201, 162, 39, .14);
  --up: #E5484D;
  --down: #35A06A;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -24px rgba(0, 0, 0, .9);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(200, 16, 46, .10), transparent 70%),
    radial-gradient(700px 400px at 92% 0%, rgba(201, 162, 39, .05), transparent 70%);
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ---------------- 侧栏 ---------------- */
.sidebar {
  width: 232px; flex: 0 0 232px;
  background: linear-gradient(180deg, #120F0F 0%, #0D0B0B 100%);
  border-right: 1px solid var(--line);
  padding: 20px 14px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 20px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #D4142F, #7A0A18);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; letter-spacing: .02em;
  box-shadow: 0 6px 18px -8px rgba(200, 16, 46, .9);
}
.brand-name { font-size: 15px; font-weight: 650; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .16em; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group {
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: #6E6360;
  padding: 12px 10px 4px; user-select: none;
}
.nav-group:first-child { padding-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font-size: 13.5px; text-align: left;
  transition: background .15s, color .15s; position: relative;
}
.nav-item svg { width: 18px; height: 18px; opacity: .75; }
.nav-item:hover { background: rgba(255, 255, 255, .04); }
.nav-item.active { background: var(--brand-soft); color: #FF8189; font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2.5px;
  border-radius: 2px; background: var(--brand);
}
.nav-item.active svg { opacity: 1; }
.nav-sep { height: 1px; background: var(--line-2); margin: 8px 10px; }

.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line-2); display: grid; gap: 7px; }
.side-stat { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.side-stat b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------- 主区 ---------------- */
.main { flex: 1; min-width: 0; padding: 22px 26px 26px; max-width: 1600px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.title-wrap h1 { font-size: 21px; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.actions { display: flex; gap: 8px; align-items: center; }

.period-btn {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13px;
}
.period-btn:hover { border-color: #3A322F; }
.period-btn .ico { width: 15px; height: 15px; color: var(--muted); }
.period-btn .chev { width: 13px; height: 13px; }

.select, .input {
  height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--ink);
  font-size: 13px; padding: 0 10px; outline: none;
}
.select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23948A86' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; }
.input::placeholder { color: #6C6360; }
.input:focus, .select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(200, 16, 46, .16); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; transition: all .15s;
}
.btn .ico { width: 15px; height: 15px; }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: #3A322F; background: var(--card-2); }
.btn.primary { background: linear-gradient(140deg, #D4142F, #A50E24); color: #fff; box-shadow: 0 8px 20px -12px rgba(200,16,46,.9); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: #FF6B70; }
.btn.tiny { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 7px; background: rgba(255,255,255,.06); color: inherit; border: 1px solid rgba(255,255,255,.14); }
.btn.block { width: 100%; }
.link { border: 0; background: none; color: #E2686F; font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }

.banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(201, 162, 39, .10); border: 1px solid rgba(201, 162, 39, .28); color: #E3C36A;
  border-radius: 11px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px;
}
.banner .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: 0 0 6px; }

.scope-chip {
  height: 26px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: var(--brand-soft); color: #FF8189; display: inline-flex; align-items: center;
}
.scope-chip.own { background: var(--gold-soft); color: var(--gold); }

/* ---------------- 卡片与网格 ---------------- */
.view { display: none; flex-direction: column; gap: 14px; }
.view.active { display: flex; }
.grid { display: grid; gap: 14px; }
.g-2-1 { grid-template-columns: 1.75fr 1fr; }
.g-1-1 { grid-template-columns: 1fr 1fr; }
.g-3-2 { grid-template-columns: 1.55fr 1fr; }

.card {
  background: linear-gradient(180deg, #191514 0%, #151211 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px 14px;
  box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.card-head h3 { font-size: 14.5px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi {
  background: linear-gradient(180deg, #1A1615 0%, #141110 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px 12px; position: relative; overflow: hidden;
  min-height: 124px; display: flex; flex-direction: column;
}
.kpi .k-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi .k-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.kpi .k-value .unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi .k-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 7px; }
.kpi .k-sub { font-size: 11px; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.delta.up { color: #FF7A80; background: rgba(229, 72, 77, .14); }
.delta.down { color: #4FC489; background: rgba(53, 160, 106, .14); }
.delta.flat { color: var(--muted); background: rgba(255,255,255,.05); }

.kpi.hero {
  background: linear-gradient(150deg, #B3122B 0%, #6E0C1B 55%, #3A0810 100%);
  border-color: rgba(200,16,46,.5); color: #fff;
}
.kpi.hero .k-label { color: rgba(255, 255, 255, .72); }
.kpi.hero .k-value .unit { color: rgba(255, 255, 255, .66); }
.kpi.hero .k-sub { color: rgba(255, 255, 255, .6); }
.kpi.hero .delta.up, .kpi.hero .delta.down, .kpi.hero .delta.flat { background: rgba(255,255,255,.16); color: #fff; }
.kpi .spark { position: absolute; right: 0; bottom: 30px; opacity: .55; pointer-events: none; }

/* ---------------- 图表 ---------------- */
.chart { width: 100%; }
.legend-inline { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.legend-inline i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* ---------------- 洞察 ---------------- */
.insights { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; }
.insights li { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.8px; line-height: 1.62; color: var(--ink-2); }
.insights li:last-child { border-bottom: 0; }
.tag { flex: 0 0 auto; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; background: var(--brand-soft); color: #FF8189; }
.tag.key { background: var(--gold-soft); color: var(--gold); }
.tag.warn { background: rgba(229,72,77,.14); color: #FF7A80; }
.tag.info { background: rgba(255,255,255,.06); color: var(--ink-2); }

.note-card { background: rgba(255,255,255,.02); }
.note-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.note-card p { font-size: 11.8px; color: var(--muted); line-height: 1.75; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; margin: 2px -4px 0; max-height: 560px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.15); border-radius: 8px;
  border: 2px solid transparent; background-clip: padding-box;
}
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); background-clip: padding-box; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.tbl th {
  position: sticky; top: 0; z-index: 2;
  background: #1B1716; color: var(--muted); font-weight: 500; font-size: 11.5px;
  text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 10px; }
.tbl th.l, .tbl td.l { text-align: left; }
.tbl td {
  padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line-2);
  color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tbl tr:hover td { background: rgba(255,255,255,.025); }
.tbl tr.total td { background: #1B1716; font-weight: 650; color: var(--ink); border-top: 1px solid var(--line); }
/* 所有表格统一行距（含紧凑表），避免不同页面疏密不一 */
.tbl.compact td, .tbl.compact th { padding: 11px 12px; }
.tbl .name { font-weight: 550; color: var(--ink); }
.tbl.wrap td { white-space: normal; line-height: 1.6; }
.tbl.wrap td, .tbl.wrap th { vertical-align: top; }
.mini-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; display: block; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; background: rgba(255,255,255,.06); color: var(--ink-2); }

.seg { display: inline-flex; background: rgba(255,255,255,.04); border-radius: 8px; padding: 2px; gap: 2px; }
.seg-btn { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px 10px; border-radius: 6px; }
.seg-btn.active { background: rgba(200,16,46,.9); color: #fff; font-weight: 550; }
.seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll .seg-btn { flex: 0 0 auto; white-space: nowrap; }
#view-channel .card-head .actions { flex-wrap: wrap; justify-content: flex-end; }

/* ---------------- 明细 ---------------- */
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.filters .input { width: 260px; }
.spacer { flex: 1; }
.pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; padding-top: 10px; font-size: 12px; color: var(--muted); }
.pager button { height: 28px; min-width: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 12px; }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .35; cursor: default; }

/* ---------------- 导入 ---------------- */
.dropzone {
  border: 1.5px dashed #3A322F; border-radius: 12px; padding: 34px 20px;
  text-align: center; background: rgba(255,255,255,.02); transition: all .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand-2); background: var(--brand-soft); }
.dz-ico { width: 30px; height: 30px; color: #E2686F; margin-bottom: 8px; }
.dz-main { font-size: 13.5px; color: var(--ink-2); }
.dz-sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.upload-result { margin-top: 12px; display: grid; gap: 8px; }
.up-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); font-size: 12.5px; }
.up-item.ok { background: rgba(53,160,106,.08); border-color: rgba(53,160,106,.3); color: #6FD3A0; }
.up-item.err { background: rgba(229,72,77,.08); border-color: rgba(229,72,77,.3); color: #FF8A90; }
.inbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 13px; border: 1px dashed var(--line); border-radius: 10px;
  background: rgba(255,255,255,.02);
}
.inbox-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.inbox-main code {
  font-size: 11.5px; color: var(--gold); background: rgba(201,162,39,.12);
  padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace;
}
.inbox-bar .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- 设置 ---------------- */
.form { display: grid; gap: 14px; margin-top: 6px; }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.field .tip { font-size: 11.5px; color: var(--muted); font-style: normal; line-height: 1.6; }
.field.inline { grid-template-columns: 34px 1fr; align-items: center; gap: 8px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.form .field .input { max-width: 340px; }
#rtMapTable .input, #chMapTable .select { height: 30px; width: 100%; max-width: 260px; font-size: 12.5px; }
#rtMapTable td, #chMapTable td { vertical-align: middle; padding-top: 5px; padding-bottom: 5px; }
.rt-sum { font-size: 12px; color: var(--muted); }
.rt-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rt-sum .warn { color: #FF7A80; }

.foot { display: flex; justify-content: space-between; font-size: 11.5px; color: #6B615E; padding: 18px 4px 4px; }

/* ---------------- 弹层 ---------------- */
.pop { position: fixed; inset: 0; z-index: 60; display: none; }
.pop.open { display: block; }
.pop-panel {
  position: absolute; top: 76px; right: 220px; width: 430px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); display: flex; overflow: hidden;
}
.pop-presets { width: 150px; padding: 8px; border-right: 1px solid var(--line-2); display: grid; gap: 2px; align-content: start; background: rgba(255,255,255,.02); }
.pop-presets button { height: 32px; border: 0; background: transparent; border-radius: 8px; text-align: left; padding: 0 10px; font-size: 12.5px; color: var(--ink-2); }
.pop-presets button:hover { background: rgba(255,255,255,.05); }
.pop-presets button.on { background: var(--brand-soft); color: #FF8189; font-weight: 600; }
.pop-custom { flex: 1; padding: 14px; display: grid; gap: 10px; align-content: start; }
.pop-title { font-size: 12px; color: var(--muted); }

.modal { position: fixed; inset: 0; background: rgba(5, 3, 3, .72); backdrop-filter: blur(3px); z-index: 80; display: none; place-items: center; }
.modal.open { display: grid; }
.modal-card {
  width: min(620px, 92vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 40px 90px -30px #000; overflow: hidden;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 15px; }
.modal-head .x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); }
.modal-body { padding: 16px 18px; max-height: 68vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: rgba(255,255,255,.02); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: #2A2422; color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  opacity: 0; pointer-events: none; transition: all .22s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sum-item { background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.sum-item .s-l { font-size: 11.5px; color: var(--muted); }
.sum-item .s-v { font-size: 17px; font-weight: 650; margin-top: 3px; font-variant-numeric: tabular-nums; }
.warn-box { background: rgba(201,162,39,.08); border: 1px solid rgba(201,162,39,.28); color: #E3C36A; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; }
.err-box { background: rgba(229,72,77,.08); border: 1px solid rgba(229,72,77,.3); color: #FF8A90; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }

/* ---------------- 登录 ---------------- */
.login { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: 1.05fr .95fr; background: #080707; }
.login-left {
  background: linear-gradient(158deg, #7A0C1C 0%, #45060F 52%, #1D0307 100%);
  color: #fff; padding: 54px 56px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -170px; bottom: -220px; background: radial-gradient(circle, rgba(200,16,46,.5), transparent 68%);
}
.login-left::before {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  left: -150px; top: -140px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 66%);
}
.ll-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; margin-bottom: 44px; }
.logo.lg { width: 46px; height: 46px; border-radius: 14px; font-size: 20px; background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.ll-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.ll-sub { font-size: 11.5px; color: rgba(255,255,255,.6); margin-top: 3px; letter-spacing: .12em; }
.ll-title { font-size: 30px; line-height: 1.45; font-weight: 600; letter-spacing: -.02em; position: relative; z-index: 2; }
.ll-points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 18px; position: relative; z-index: 2; }
.ll-points li { padding-left: 16px; border-left: 2px solid rgba(255,255,255,.2); }
.ll-points b { display: block; font-size: 13.5px; font-weight: 600; }
.ll-points span { display: block; font-size: 12px; color: rgba(255,255,255,.58); margin-top: 4px; line-height: 1.6; }
.ll-foot { position: relative; z-index: 2; margin-top: 46px; font-size: 11.5px; color: rgba(255,255,255,.38); }
.login-right { display: grid; place-items: center; padding: 30px; }
.login-card {
  width: 356px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px 22px; box-shadow: 0 40px 80px -40px #000;
}
.login-card-head { margin-bottom: 22px; }
.login-card-head h3 { font-size: 19px; }
.login-card-head p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.login-form { display: grid; gap: 14px; }
.login-form .input { height: 40px; }
.login-err { min-height: 16px; font-size: 12px; color: #FF7A80; }
.login-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--muted); text-align: center; line-height: 1.7; }

/* ---------------- 侧栏用户 ---------------- */
.side-user { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px; background: var(--brand-soft); color: #FF8189; display: grid; place-items: center; font-size: 13px; font-weight: 650; }
.user-txt { min-width: 0; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.logout { border: 0; background: transparent; color: var(--muted); padding: 4px; border-radius: 7px; display: grid; place-items: center; }
.logout svg { width: 16px; height: 16px; }
.logout:hover { background: rgba(229,72,77,.14); color: #FF7A80; }

/* ---------------- 日报 ---------------- */
.modal-card.wide { width: min(1240px, 96vw); }
.field.inline.nowrap { grid-template-columns: auto 150px; align-items: center; margin: 0; }
.col-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.rep-block { margin-top: 16px; }
.rep-label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.rep-label em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.ta { height: auto; min-height: 58px; padding: 9px 11px; line-height: 1.65; resize: vertical; font-family: inherit; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin: 16px 0 0; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }
.rep-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }

.visit-list { display: grid; gap: 10px; margin-bottom: 10px; }
.visit { border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 10px; background: rgba(255,255,255,.02); }
.visit-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.visit input[type="text"] { height: 34px; }
.visit .ta { min-height: 46px; margin-top: 8px; }
.rep-block .ta, .visit .ta, .visit input[type="text"], .visit > .input { width: 100%; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.schip {
  border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 20px;
  padding: 4px 11px; font-size: 11.5px; color: var(--ink-2); transition: all .12s;
}
.schip:hover { border-color: #3A322F; }
.schip.on { font-weight: 600; }

.photo-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-add {
  width: 76px; height: 76px; border-radius: 10px; border: 1.5px dashed #3A322F;
  display: grid; place-items: center; color: var(--muted); cursor: pointer; font-size: 11px;
  background: rgba(255,255,255,.02); text-align: center; line-height: 1.4;
}
.photo-add:hover { border-color: var(--brand-2); color: #FF8189; }
.photo-item { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item button { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; padding: 0; }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; gap: 8px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.todo-list li:last-child { border-bottom: 0; }
.todo-list input { margin-top: 2px; accent-color: var(--brand); }
.todo-list .due { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ---------------- 导入核对表 ---------------- */
.rev-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.rev-bar .input { height: 32px; width: 150px; }
.rev-tbl td { padding: 3px 5px; }
.rev-tbl th { padding: 7px 5px; font-size: 11px; }
.rev-input {
  width: 100%; height: 28px; border: 1px solid transparent; border-radius: 6px;
  padding: 0 6px; font-size: 12px; background: transparent; color: var(--ink-2);
  font-family: inherit; font-variant-numeric: tabular-nums;
}
.rev-input:hover { border-color: var(--line); background: rgba(255,255,255,.03); }
.rev-input:focus { border-color: var(--brand-2); background: rgba(255,255,255,.05); outline: none; box-shadow: 0 0 0 2px rgba(200,16,46,.16); }
.rev-input.num { text-align: right; }
.rev-input.rt-sel { color-scheme: dark; cursor: pointer; padding: 0 2px; }
.rev-input.rt-sel option { background: #1B1716; color: #F6F1EF; }
.rev-del { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 5px; }
.rev-del:hover { background: rgba(229,72,77,.14); color: #FF7A80; }
.rev-tbl tr.changed td { background: rgba(201,162,39,.06); }
.rev-tbl tr.changed td:first-child { box-shadow: inset 2px 0 0 var(--gold); }

/* ---------------- 通用表单 ---------------- */
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-grid .full { grid-column: 1 / -1; }
.fm-grid .field > span { font-size: 12px; color: var(--muted); }
.fm-grid .input, .fm-grid .select { width: 100%; }
.fm-hint { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.fm-err { color: #FF7A80; font-size: 12px; min-height: 14px; }
.row-act { display: inline-flex; gap: 8px; }
.row-act .link.danger { color: #FF6B70; }
.emp-select { height: 26px; border-radius: 6px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); background: var(--card-2); padding: 0 6px; max-width: 96px; }
.emp-tag { font-size: 11.5px; color: var(--ink-2); }
.emp-tag.none { color: var(--muted); }

/* ================= 数据驾驶舱 ================= */
.cockpit {
  position: relative; margin: -22px -26px 0; padding: 20px 24px 18px;
  min-height: 100vh; display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(200,16,46,.20), transparent 62%),
    radial-gradient(800px 400px at 92% 110%, rgba(200,16,46,.09), transparent 60%),
    linear-gradient(180deg, #0A0808 0%, #0B0909 100%);
}
.cockpit::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 78%);
}
.ck-aurora-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ck-aurora {
  position: absolute; top: -26%; left: -8%; right: -8%; height: 62%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(200,16,46,.34), transparent 72%);
  filter: blur(34px); opacity: .8;
  animation: ckAurora 16s ease-in-out infinite alternate;
}
@keyframes ckAurora {
  from { transform: translate3d(-3%, -2%, 0) scale(1); opacity: .62; }
  to { transform: translate3d(3%, 2%, 0) scale(1.1); opacity: .95; }
}

.ck-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; }
.ck-brand { display: flex; align-items: center; gap: 12px; }
.ck-logo {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px; overflow: hidden;
  background: linear-gradient(150deg, rgba(200,16,46,.92), rgba(120,8,20,.9));
  display: grid; place-items: center; font-size: 19px; font-weight: 700; color: #fff;
  box-shadow: 0 0 24px rgba(200,16,46,.45);
}
.ck-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ck-title { font-size: 22px; font-weight: 700; letter-spacing: .02em; display: flex; align-items: baseline; gap: 10px; }
.ck-title span { font-size: 9.5px; font-weight: 400; color: rgba(255,255,255,.34); letter-spacing: .22em; }
.ck-range { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; margin-top: 3px; }
.ck-live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .16em;
  color: #FF8189; padding: 3px 9px; border-radius: 20px;
  background: rgba(200,16,46,.14); border: 1px solid rgba(200,16,46,.3);
}
.ck-live i { width: 6px; height: 6px; border-radius: 50%; background: #FF4D57; box-shadow: 0 0 0 0 rgba(255,77,87,.7); animation: ckPulse 1.8s infinite; }
@keyframes ckPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,87,.65); }
  70% { box-shadow: 0 0 0 7px rgba(255,77,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,87,0); }
}
.ck-tools { display: flex; align-items: center; gap: 10px; }
.ck-ico {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04); color: var(--ink-2); display: grid; place-items: center;
  transition: all .16s;
}
.ck-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ck-ico:hover { border-color: rgba(200,16,46,.5); color: #fff; background: rgba(200,16,46,.16); }
.ck-ico.paused { color: #FFC9CD; border-color: rgba(200,16,46,.45); background: rgba(200,16,46,.16); }
.ck-clock { text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.ck-clock b { display: block; font-size: 22px; color: var(--ink); font-weight: 650; letter-spacing: .03em; line-height: 1.1; }
.ck-seg .seg-btn { font-size: 11.5px; padding: 0 10px; height: 28px; }

.ck-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; position: relative; }
.ck-kpi {
  position: relative; overflow: hidden; padding: 13px 15px 12px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(200,16,46,.17) 0%, rgba(23,20,19,.94) 58%);
  border: 1px solid rgba(200,16,46,.24);
  animation: ckUp .55s cubic-bezier(.22,.8,.3,1) both;
}
.ck-kpi::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: .8;
}
.ck-kpi::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255,255,255,.07) 46%, transparent 58%);
  transform: translateX(-110%); animation: ckSheen 7s ease-in-out infinite;
}
@keyframes ckSheen { 0%, 55% { transform: translateX(-110%); } 88%, 100% { transform: translateX(110%); } }
@keyframes ckUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ck-kpi .l { font-size: 11.5px; color: rgba(255,255,255,.56); letter-spacing: .07em; display: flex; justify-content: space-between; gap: 6px; }
.ck-kpi .l em { font-style: normal; font-size: 10px; color: rgba(255,255,255,.32); }
.ck-kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin-top: 5px; font-variant-numeric: tabular-nums; line-height: 1.12; }
.ck-kpi .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.ck-kpi .d { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.ck-kpi .up { color: #FF7A80; }
.ck-kpi .down { color: #4FC489; }

.ck-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 11px; position: relative; align-content: start; }
.ck-card {
  background: rgba(20, 17, 16, .82); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 11px 14px 6px; backdrop-filter: blur(6px); min-width: 0;
  display: flex; flex-direction: column;
  animation: ckUp .6s cubic-bezier(.22,.8,.3,1) both;
}
.ck-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.ck-ch h3 { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; color: var(--ink-2); }
.ck-note { font-size: 10.5px; color: rgba(255,255,255,.34); white-space: nowrap; }
.ck-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 3px 0 5px; scrollbar-width: none; }
.ck-tabs::-webkit-scrollbar { display: none; }
.ck-tabs button {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.52); font-size: 10px; line-height: 1; padding: 4px 8px;
  border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.ck-tabs button:hover { color: rgba(255,255,255,.82); border-color: rgba(255,255,255,.22); }
.ck-tabs button.active {
  background: rgba(200,16,46,.3); border-color: rgba(200,16,46,.62);
  color: #FFA9AF; font-weight: 600;
}
.ck-chart { height: clamp(180px, 22vh, 290px); min-height: 180px; }
.ck-chart-sm { height: clamp(170px, 19vh, 250px); min-height: 170px; }
#ckGroup { height: clamp(224px, 26vh, 320px); min-height: 224px; }
.ck-mini-card { padding-bottom: 12px; }
.ck-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 6px 0 2px; }
.ck-mini .m {
  background: rgba(255,255,255,.032); border: 1px solid rgba(255,255,255,.06);
  border-radius: 11px; padding: 10px 12px;
}
.ck-mini .m .k { font-size: 11px; color: rgba(255,255,255,.46); }
.ck-mini .m .n { font-size: 21px; font-weight: 650; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ck-mini .m .s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ck-mini .m.hot .n { color: #FF8189; }

.ck-ticker {
  display: flex; align-items: center; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(200,16,46,.24); background: rgba(20,17,16,.8); min-height: 42px;
}
.ck-ticker-label {
  display: flex; align-items: center; gap: 7px; padding: 0 16px; height: 42px; flex: 0 0 auto;
  background: linear-gradient(90deg, rgba(200,16,46,.3), rgba(200,16,46,.04));
  font-size: 12px; letter-spacing: .12em; color: #FFC9CD; white-space: nowrap; font-weight: 600;
  border-right: 1px solid rgba(200,16,46,.18);
}
.ck-ticker-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: ckPulse 2.2s infinite; }
.ck-ticker-view { flex: 1; overflow: hidden; }
.ck-ticker-track { display: inline-flex; gap: 34px; white-space: nowrap; padding-left: 18px; animation: ckMarquee 60s linear infinite; }
.ck-ticker:hover .ck-ticker-track { animation-play-state: paused; }
@keyframes ckMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ck-tick-item { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.ck-tick-item b { font-weight: 600; color: #FFC9CD; font-size: 11.5px; padding: 2px 7px; border-radius: 5px; background: rgba(200,16,46,.16); }
.ck-tick-item.warn b { color: #FFB3A7; background: rgba(229,72,77,.18); }

body.ck-fs .sidebar, body.ck-fs .topbar, body.ck-fs .banner { display: none !important; }
body.ck-fs .main { padding: 0; max-width: none; }
body.ck-fs .cockpit { margin: 0; padding: 8px 16px 6px; height: 100vh; min-height: 0; gap: 6px; }
#cockpitRoot:fullscreen, #cockpitRoot:-webkit-full-screen { overflow-y: auto; overflow-x: hidden; }
/* 全屏铺满：两行图表按剩余空间自动伸展，底部不留下大片空白 */
body.ck-fs .ck-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(150px, 1fr) minmax(150px, 1fr) auto; }
body.ck-fs .ck-card { min-height: 0; }
body.ck-fs .ck-chart, body.ck-fs .ck-chart-sm, body.ck-fs #ckGroup {
  height: auto; flex: 1 1 0; min-height: 0;
}
body.ck-fs .ck-mini .m { padding: 8px 10px; }
body.ck-fs .ck-mini .m .n { font-size: 19px; }
body.ck-fs .ck-rt-wrap { min-height: 120px; }

/* ================= 个人 KPI ================= */
.score-rules { display: grid; gap: 11px; padding: 4px 0 12px; }
.sr-item { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid rgba(200,16,46,.35); }
.sr-item b { font-size: 12.5px; font-weight: 600; }
.sr-item span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.sr-note { font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; line-height: 1.7; }

/* ================= Logo ================= */
.brand .logo { overflow: hidden; padding: 0; }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-row { display: flex; gap: 18px; align-items: center; padding: 4px 0 10px; flex-wrap: wrap; }
.logo-preview {
  width: 76px; height: 76px; border-radius: 18px; flex: 0 0 76px; overflow: hidden;
  background: var(--brand-soft); display: grid; place-items: center;
  font-size: 30px; font-weight: 700; color: var(--brand); border: 1px solid var(--line);
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-ops { flex: 1; min-width: 220px; display: grid; gap: 8px; }

/* ================= 数据库切换 ================= */
.db-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.db-opt {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: grid; gap: 5px; cursor: pointer; transition: all .15s; background: #fff;
}
.db-opt:hover { border-color: #CBD3CE; }
.db-opt b { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.db-opt b::before { content: ''; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line); }
.db-opt.on { border-color: var(--brand-2); background: rgba(200,16,46,.04); }
.db-opt.on b::before { border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--brand); }
.db-opt span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.db-opt input { display: none; }

/* ================= 手机端 ================= */
/* ---------------- 手机端 ---------------- */
.hamburger { display: none; }
@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .g-2-1, .g-1-1, .g-3-2 { grid-template-columns: 1fr; }
  .pop-panel { right: 20px; }
  .ck-kpis { grid-template-columns: repeat(2, 1fr); }
  .ck-grid, .ck-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; width: 250px;
    transform: translateX(-100%); transition: transform .22s ease; height: 100vh;
    box-shadow: 20px 0 60px -30px #000;
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 14px 14px 40px; max-width: none; }
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--card); color: var(--ink); flex: 0 0 36px;
  }
  .hamburger svg { width: 18px; height: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .topbar .actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .title-wrap { display: flex; align-items: center; gap: 10px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sum-grid { grid-template-columns: 1fr 1fr; }
  .cockpit { margin: -14px -14px 0; padding: 16px 14px 20px; }
  .ck-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ck-kpi .v { font-size: 24px; }
  .ck-title { font-size: 18px; }
  .ck-clock b { font-size: 18px; }
  .login { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .modal-card, .modal-card.wide { width: 96vw; }
  .modal-body { max-height: 76vh; }
  .fm-grid { grid-template-columns: 1fr; }
  .filters .input { width: 100%; }
  .tbl td, .tbl th { padding: 8px 7px; font-size: 12px; }
  .rep-actions { position: static; padding: 12px 0 4px; }
  #viewSub { display: none; }
  .topbar .actions #compareSel, .topbar .actions #exportBtn { display: none; }
  .topbar .actions { gap: 6px; }
  .rep-block { margin-top: 14px; }
  .input, .select, .btn { height: 40px; }
  .schip { padding: 7px 12px; font-size: 12px; }
}
@media (max-width: 520px) {
  .ck-kpi .v { font-size: 21px; }
  .kpi .k-value { font-size: 22px; }
}

@media (max-width: 900px) {
  #view-reports .card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card-head .field.inline.nowrap { width: 100%; grid-template-columns: auto 1fr; }
  .card-head .field.inline.nowrap span { white-space: nowrap; }
  .card-head .field.inline.nowrap .input { width: 100%; }
}

.legend-inline { flex-wrap: wrap; }
.legend-inline span { white-space: nowrap; }

/* ================= 手机端：订单认领 ================= */
@media (max-width: 760px) {
  .claim-filters { gap: 8px; }
  .claim-filters .seg { order: -1; width: 100%; overflow-x: auto; }
  .claim-filters .input { width: 100% !important; }
  .claim-filters #claimQuery { width: 100%; }
  .claim-filters .spacer { display: none; }

  #claimTable, #claimListTable { border: 0; }
  #claimTable thead, #claimListTable thead { display: none; }
  #claimTable tbody, #claimListTable tbody { display: grid; gap: 10px; }
  #claimTable tr, #claimListTable tr {
    display: block; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; background: var(--card);
  }
  #claimTable td, #claimListTable td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 4px 0; border: 0 !important; text-align: right; font-size: 12.5px;
  }
  #claimTable td::before, #claimListTable td::before {
    content: attr(data-l); color: var(--muted); font-size: 11.5px;
    flex: 0 0 auto; text-align: left;
  }
  #claimTable td[data-l=""]::before, #claimListTable td[data-l=""]::before { content: none; }
  #claimTable td:last-child, #claimListTable td:last-child {
    justify-content: flex-end; margin-top: 6px; padding-top: 8px;
    border-top: 1px solid var(--line-2) !important;
  }
  #claimTable td[data-l="操作"] .link, #claimListTable td[data-l="操作"] .link {
    font-size: 13.5px; font-weight: 600; padding: 6px 2px;
  }
  #claimTable td[data-l="客人"] { font-weight: 600; }
  #claimListTable td[data-l="订单"] { font-weight: 600; }
  .ck-ticker { display: none; }
  .ck-grid { grid-template-columns: 1fr !important; }
  .ck-card { grid-column: 1 / -1 !important; }
  .ck-mini { grid-template-columns: 1fr 1fr; }
  .ck-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ck-tools { width: 100%; justify-content: space-between; }
  .ck-clock { text-align: left; }
}

.ck-mini .m.ck-mini-wide { grid-column: span 4; }
@media (max-width: 760px) {
  #ckChannel, #ckGroup { height: 236px; min-height: 236px; }
  .ck-rt .col-rp, .ck-rt .col-share { display: none; }
  .ck-mini .m.ck-mini-wide { grid-column: 1 / -1; gap: 14px !important; }
  .severity-none { display: none; }
  .card-head .seg { flex: 0 0 auto; max-width: 100%; overflow-x: auto; }
  .seg-btn { white-space: nowrap; flex: 0 0 auto; }
  #claimSeg { width: 100%; }
  #claimTable td[data-l="操作"]::before, #claimListTable td[data-l="操作"]::before { content: none; }
  #claimTable td[data-l="操作"], #claimListTable td[data-l="操作"] { border-top: 1px solid var(--line-2) !important; padding-top: 10px !important; }
  #view-claims .card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  #view-channel .card-head { flex-direction: column; align-items: stretch; gap: 8px; }
  #view-channel .card-head .actions { justify-content: flex-start; flex-wrap: wrap; width: 100%; }
  #view-channel .card-head .seg { width: 100%; overflow-x: auto; }
  #view-channel #chViewCat { width: 100% !important; }
}

/* ================= 房型设置表 ================= */
.rt-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 2px 2px; margin-top: 4px; border-top: 1px solid var(--line-2);
}
.rt-foot .btn { height: 32px; }
.rt-foot .spacer { flex: 1; }
#rtMapTable input.input { height: 30px; font-size: 12.5px; }
#rtMapTable input.rt-code { max-width: 104px; text-transform: uppercase; }
#rtMapTable .chip { font-size: 11.5px; letter-spacing: .04em; }
.rt-chk { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
#rtMapTable tbody tr:hover .rt-chk { outline: none; }

/* ================= 驾驶舱·房型统计 ================= */
.ck-rt-wrap {
  flex: 1 1 0; min-height: 168px;
  overflow-y: auto; overflow-x: auto; margin-top: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.ck-rt-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }
.ck-rt { width: 100%; border-collapse: collapse; font-size: 11px; }
.ck-rt th {
  position: sticky; top: 0; z-index: 2; background: #141110;
  color: rgba(255,255,255,.42); font-weight: 500; font-size: 10.5px;
  text-align: right; padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.09);
  white-space: nowrap;
}
.ck-rt th.l, .ck-rt td.l { text-align: left; }
.ck-rt td {
  padding: 6px 6px; text-align: right; color: var(--ink-2); line-height: 16px;
  border-bottom: 1px dashed rgba(255,255,255,.05);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ck-rt tbody tr:last-child td { border-bottom: 0; }
.ck-rt tbody tr:hover td { background: rgba(255,255,255,.03); }
.ck-rt tr.off td { opacity: .5; }
.ck-rt-name { font-weight: 550; color: var(--ink); font-size: 11.5px; }
.ck-rt em { font-style: normal; font-size: 10px; color: rgba(255,255,255,.28); margin-left: 6px; letter-spacing: .04em; }
.ck-rt-tag { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.08); color: var(--muted); margin-left: 6px; }
.ck-rt-bar {
  display: inline-block; width: 54px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.09); vertical-align: middle; margin-right: 6px; overflow: hidden;
}
.ck-rt-bar i { display: block; height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.22,.8,.3,1); }
.ck-rt-pct { font-size: 10.5px; font-weight: 600; }
.ck-mini.ck-mini-4 { grid-template-columns: 1fr 1fr; }

@media (max-width: 760px) {
  .ck-rt th.col-rp, .ck-rt td.col-rp,
  .ck-rt th.col-share, .ck-rt td.col-share { display: none; }
  .ck-rt { font-size: 10.5px; }
  .ck-rt td { padding: 2px 3px; }
  .ck-rt th { padding: 4px 3px; }
  .ck-rt-name { font-size: 11px; }
  .ck-rt em { display: none; }
  .ck-rt-bar { width: 34px; margin-right: 4px; }
  .ck-rt-wrap { max-height: none; }
}

#rtMapTable input.rt-name { max-width: 330px; }
.rt-lock {
  display: inline-block; font-size: 10.5px; letter-spacing: .06em;
  color: var(--muted); border: 1px dashed var(--line); border-radius: 5px;
  padding: 1px 6px; cursor: help;
}

@media (max-width: 760px) {
  #view-cockpit .ck-ch { align-items: flex-start; flex-wrap: wrap; }
  #view-cockpit .ck-note { white-space: normal; line-height: 1.35; text-align: left; }
  .ck-rt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ck-rt { min-width: 100%; }
}

/* ================= 设置页签 ================= */
.tabs {
  display: flex; gap: 4px; padding: 4px; overflow-x: auto;
  background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px;
}
.tab {
  border: 0; background: transparent; color: var(--muted); font-size: 13px;
  padding: 8px 16px; border-radius: 8px; white-space: nowrap; transition: all .15s;
}
.tab:hover { color: var(--ink-2); background: rgba(255,255,255,.05); }
.tab.active {
  background: linear-gradient(135deg, #C8102E, #8E1B24);
  color: #fff; font-weight: 600; box-shadow: 0 4px 14px -6px rgba(200,16,46,.85);
}
.tab-pane { display: none; flex-direction: column; gap: 14px; }
.tab-pane.active { display: flex; }

.sec-list { display: grid; gap: 9px; padding: 2px 0 14px; }
.sec-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02);
}
.sec-mark {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex: 0 0 18px; margin-top: 1px;
}
.sec-item.ok .sec-mark { background: rgba(47,163,107,.16); color: #4FC489; }
.sec-item.warn .sec-mark { background: rgba(229,72,77,.16); color: #FF8189; }
.sec-item b { display: block; font-size: 12.5px; }
.sec-item div > span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

#chMapTable select.select, #catTable input.input { height: 30px; font-size: 12.5px; }
#chMapTable td, #catTable td { vertical-align: middle; }
.rank-crumb { cursor: pointer; }
.cust-note { font-size: 11.5px; color: var(--muted); padding: 2px 2px 12px; line-height: 1.6; }

/* 渠道分组行 */
.tbl tr.grp td {
  background: rgba(200,16,46,.07); color: var(--ink); font-weight: 600;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2);
}
.tbl tr.grp td .muted { font-weight: 400; }
.tbl tr.grp:hover td { background: rgba(200,16,46,.10); }

/* 设置页在手机上的排版 */
@media (max-width: 760px) {
  #view-settings .card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  #view-settings .card-head .actions { width: 100%; flex-wrap: wrap; }
  #view-settings .card-head .actions .input,
  #view-settings .card-head .actions .select { flex: 1 1 140px; width: auto !important; min-width: 0; }
  #view-settings .card-head .hint { font-size: 11px; line-height: 1.5; }
  #view-settings .rt-sum { font-size: 11.5px; }
  #catTable { min-width: 520px; }
  #chMapTable { min-width: 560px; }
  #rtMapTable { min-width: 560px; }
  #view-settings .rt-foot { gap: 8px; }
  #view-settings .rt-foot .btn { flex: 1 1 auto; }
  #setTabs { position: sticky; top: 0; z-index: 5; }
  .tab { padding: 8px 12px; font-size: 12.5px; }
}

#chMapTable select.select { width: 150px; }
#chMapTable input.input { width: 150px; }
@media (max-width: 760px) {
  #chMapTable { min-width: 640px; }
  #chMapTable select.select { width: 120px; }
  #chMapTable input.input { width: 120px; }
}
