:root {
  --bg: #f5f6f7;
  --card: #ffffff;
  --ink: #1f2329;
  --muted: #8f959e;
  --line: #dee0e3;
  --line-2: #fff;
  --primary: #3370ff;
  --primary-hover: #245bdb;
  --primary-soft: #e8f3ff;
  --nav-hover: #f2f3f5;
  --danger: #f54a45;
  --warn: #ff7d00;
  --ok: #00b42a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(31, 35, 41, 0.08);
  --shadow-drawer: -8px 0 24px rgba(31, 35, 41, 0.12);
  --header-h: 56px;
  --nav-w: 220px;
  --ctl-h: 32px;
  --ctl-radius: 4px;
  --ctl-bd: #d0d3d6;
  --ctl-bd-hover: #3370ff;
  --ctl-focus: rgba(51, 112, 255, 0.2);
}

* { box-sizing: border-box; }
/* 全局去除移动端点击阴影 */
* {
  -webkit-tap-highlight-color: transparent !important;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html {
  -webkit-touch-callout: none;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; }

.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--nav-w);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  flex-shrink: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.brand-name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.brand-ver { font-size: 12px; color: var(--muted); margin-top: 2px; }
.nav nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
}
.nav nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  text-decoration: none;
  color: #2b2f36;
  border-radius: 8px;
}
.nav nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.75; }
.nav nav a:hover { background: var(--nav-hover); }
.nav nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav nav a.active svg { opacity: 1; }
.nav-foot {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.nav-foot p { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.btn-backup {
  width: 100%;
  background: var(--primary-soft);
  color: var(--primary);
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
}
.btn-backup:hover { background: #d6e6ff; }

.main-wrap {
  margin-left: var(--nav-w);
  width: calc(100% - var(--nav-w));
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.top h1 { margin: 0; font-size: 16px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.page-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.banner {
  margin: 16px 24px 0;
  padding: 10px 12px;
  border: 1px solid #f9c9c6;
  background: #ffece8;
  border-radius: var(--radius);
}
.banner.error { color: var(--danger); }
#app { padding: 20px 24px 40px; }
#app.is-page-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
#app.page-fade-in {
  animation: page-fade-in 0.2s ease;
}
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #app.is-page-loading { transition: none; }
  #app.page-fade-in { animation: none; }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.toolbar select {
  width: auto;
  min-width: 140px;
}
.tabs {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 14px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
}
.tabs button.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.cell-actions { white-space: nowrap; }
.cell-actions .btn-text { padding: 4px 8px; }
.btn-text.danger { color: var(--danger); }
.btn, .btn-text, .btn-ghost, .btn-danger {
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--nav-hover); }
.btn-text {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 6px;
}
.btn-text:hover { color: var(--ink); background: var(--nav-hover); }
.btn-danger {
  background: #fff;
  border: 1px solid #f9c9c6;
  color: var(--danger);
}
.btn-danger:hover { background: #ffece8; }

.kpi-row, .rate-row, .grid-2 { display: grid; gap: 12px; margin-bottom: 14px; }
.kpi-row { grid-template-columns: repeat(5, 1fr); }
.rate-row { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.4fr 1fr; }
.card, .block {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 16px; }
.card .label { font-size: 12px; color: var(--muted); }
.card .value { font-size: 24px; margin-top: 6px; font-weight: 600; letter-spacing: -0.02em; }
.card .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.block h3 {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
  background: #fff;
}
.block .body { padding: 14px 16px; }
.note {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  background: #fff7e8;
  color: var(--warn);
  font-size: 12px;
  border-radius: 4px;
}
.muted { color: var(--muted); }
.login-brand .muted{line-height: .5;}
.period {
  display: flex;
  background: var(--bg);
  border-radius: 6px;
  padding: 3px;
}
.period button {
  background: transparent;
  border: 0;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 4px;
  color: var(--muted);
}
.period button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.dash { display: grid; gap: 16px; }
.dash-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.dash-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.dash-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-ops a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4e5969;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.dash-ops a:hover {
  border-color: #bfd3ff;
  color: var(--primary);
  background: #f8fbff;
}
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.field-check input { margin-top: 3px; flex-shrink: 0; }
.field-check .muted { font-weight: 400; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.dash-kpi {
  background: #fff;
  border: 1px solid #eaedf1;
  border-radius: 8px;
  padding: 16px 18px 14px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}
.dash-kpi:hover {
  border-color: #d6e4ff;
  box-shadow: 0 6px 16px rgba(51, 112, 255, 0.08);
}
.dash-kpi-hd {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-ico svg { width: 14px; height: 14px; display: block; }
.ico-consult { background: #e8f3ff; color: #3370ff; }
.ico-valid { background: #e8f8f2; color: #12b76a; }
.ico-quote { background: #fff6e6; color: #f79009; }
.ico-won { background: #eaf4ff; color: #155eef; }
.ico-amount { background: #f2f4f7; color: #344054; }
.ico-ready { background: #e8f8f2; color: #12b76a; }
.dash-kpi.tone-ready .v { color: #0f7b4a; }
.dash-panel-note {
  margin: 0;
  padding: 0 18px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.dash-kpi .k { font-size: 13px; color: #667085; }
.dash-kpi .v {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: #1d2129;
}
.dash-kpi .s { margin-top: 6px; font-size: 12px; color: #98a2b3; }
.dash-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.dash-panel {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.dash-panel h3 {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--line-2);
}
.dash-panel .pad { padding: 16px 18px 18px; }
.funnel { display: grid; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: 72px 1fr 40px; align-items: center; gap: 10px; }
.funnel-row span { font-size: 13px; color: #646a73; }
.funnel-row b { font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }
.funnel-track { height: 8px; background: #f2f3f5; border-radius: 99px; overflow: hidden; }
.funnel-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5b8cff, #3370ff);
  border-radius: 99px;
}
.funnel-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px;
}
.funnel-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.funnel-conv {
  font-size: 11px;
  font-weight: 600;
  color: #8f959e;
  line-height: 1;
}
.funnel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #5b8cff 0%, #3370ff 100%);
  box-shadow: 0 6px 14px rgba(51, 112, 255, 0.18);
  transition: width 0.25s ease;
}
.funnel-step:nth-child(2) .funnel-bar { background: linear-gradient(135deg, #4f9cff 0%, #2b6de8 100%); }
.funnel-step:nth-child(3) .funnel-bar { background: linear-gradient(135deg, #3f84f7 0%, #245bdb 100%); }
.funnel-step:nth-child(4) .funnel-bar { background: linear-gradient(135deg, #2f6fe8 0%, #1a4fbf 100%); }
.funnel-bar-name { font-size: 13px; font-weight: 600; }
.funnel-bar-n {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.rate-list { display: grid; gap: 14px; }
.rate-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center; }
.rate-item span { font-size: 13px; color: #646a73; }
.rate-item b { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 52px; text-align: right; }
.rate-rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rate-ring {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.rate-ring-chart {
  position: relative;
  width: 88px;
  height: 88px;
}
.rate-ring-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rate-ring-track,
.rate-ring-val {
  fill: none;
  stroke-width: 8;
}
.rate-ring-track { stroke: #eef0f3; }
.rate-ring-val {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}
.rate-ring.tone-valid .rate-ring-val { stroke: #12b76a; }
.rate-ring.tone-quote .rate-ring-val { stroke: #f79009; }
.rate-ring.tone-won .rate-ring-val { stroke: #3370ff; }
.rate-ring-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #1f2329;
}
.rate-ring-meta { display: grid; gap: 2px; }
.rate-ring-meta strong { font-size: 13px; font-weight: 600; color: #1f2329; }
.rate-ring-meta span { font-size: 11px; color: #8f959e; line-height: 1.35; }
.cust-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}
.cust-search {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ctl-bd);
  border-radius: 6px;
  background: #fff;
}
.cust-search:focus {
  outline: 0;
  border-color: var(--ctl-bd-hover);
  box-shadow: 0 0 0 3px var(--ctl-focus);
}
.cust-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #4e5969;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cust-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}
.cust-high {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #c25700;
  background: #fff7e8;
}
.bottleneck {
  border-left: 3px solid var(--primary);
  padding: 4px 0 4px 14px;
}
.bottleneck p { margin: 0 0 8px; }
.list-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.list-row:last-child { border-bottom: 0; }
.list-row strong { display: block; font-size: 14px; }
.meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.table-wrap {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: auto;
  background: #fff;
}
.dash-panel .table-wrap { border: 0; border-radius: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th {
  background: #f7f8fa;
  color: #646a73;
  font-weight: 500;
  font-size: 12px;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f7f8fa; }
tr.clickable { cursor: pointer; }
.decision-card.clickable { cursor: pointer; }

.form-grid { display: grid; gap: 12px; }
.field { display: block; margin: 0 0 16px; }
.field > span, .field .lab {
  display: block;
  font-size: 14px;
  color: #646a73;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 400;
}
.tag {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  margin-right: 6px;
  font-style: normal;
  font-size: 12px;
  padding: 0 6px;
  background: var(--primary-soft);
  border-radius: 4px;
  line-height: 20px;
  vertical-align: 1px;
}

/* 通用控件：所有普通 input / select / textarea 同一套 */
.field input:not([type="hidden"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.field select,
.field textarea,
.toolbar select {
  display: block;
  width: 100%;
  height: var(--ctl-h);
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  line-height: calc(var(--ctl-h) - 2px);
  color: #1f2329;
  background-color: #fff;
  border: 1px solid var(--ctl-bd);
  border-radius: var(--ctl-radius);
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea {
  height: auto;
  min-height: 80px;
  padding: 8px 12px;
  line-height: 1.6;
  resize: vertical;
}
.field.story textarea { min-height: 96px; }
.field select,
.toolbar select {
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238f959e' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  padding-right: 28px;
  cursor: pointer;
}
.toolbar select { width: auto; }
.field input::placeholder,
.field textarea::placeholder {
  color: #8f959e;
  opacity: 1;
}
.field input:hover,
.field select:hover,
.field textarea:hover,
.toolbar select:hover {
  border-color: var(--ctl-bd-hover);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar select:focus {
  border-color: #3370ff;
  box-shadow: 0 0 0 2px var(--ctl-focus);
  background-color: #fff;
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: #f5f6f7;
  color: #8f959e;
  border-color: #e5e6eb;
  cursor: not-allowed;
  box-shadow: none;
}
.field input[type="number"] { -moz-appearance: textfield; }
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="date"]::-webkit-datetime-edit,
.field input[type="week"]::-webkit-datetime-edit {
  padding: 0;
  line-height: calc(var(--ctl-h) - 2px);
}
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="week"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: #1f2329;
  box-shadow: 0 0 0 32px #fff inset;
}
.field input[type="file"] {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  font-size: 13px;
  color: #646a73;
  background: #f7f8fa;
  border: 1px dashed var(--ctl-bd);
  border-radius: var(--ctl-radius);
}
.help { font-size: 12px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.sep { height: 1px; background: var(--line-2); margin: 16px 0; }
.stack { display: grid; gap: 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.row-2 > .field, .row-3 > .field { margin-bottom: 16px; }
.sheet-form { display: flex; flex-direction: column; min-height: 100%; }
.sheet-fields { flex: 1; }
.sheet-foot {
  position: sticky;
  bottom: 0;
  margin: 8px -24px 0;
  padding: 12px 24px 16px;
  background: #fff;
  border-top: 1px solid var(--line-2);
  display: flex;
  gap: 8px;
}
.sheet-foot .btn, .sheet-foot .btn-danger { flex: 1; min-height: 36px; }
.timeline {
  margin: 8px 0 8px;
  display: grid;
  gap: 12px;
  position: relative;
  padding-left: 14px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e8f0ff;
}
.tl-item {
  position: relative;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  line-height: 1.55;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-sizing: border-box;
}
.tl-item .meta {
  font-size: 12px;
  color: var(--muted);
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.tl-when {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.tl-result,
.result-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  flex-shrink: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.tl-result.tone-ok,
.result-badge.tone-ok { color: #0f7b3a; background: #e8f8f2; }
.tl-result.tone-warn,
.result-badge.tone-warn { color: #c25700; background: #fff7e8; }
.tl-result.tone-danger,
.result-badge.tone-danger { color: #c02a26; background: #ffece8; }
.tl-result.tone-info,
.result-badge.tone-info { color: #245bdb; background: #e8f3ff; }
.tl-feedback {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
  line-height: 1.5;
}
.tl-body {
  font-size: 14px;
  color: #1f2329;
  white-space: pre-wrap;
  word-break: break-word;
}
.tl-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.tl-k {
  color: var(--muted);
  font-size: 12px;
}
.tl-v { color: #4e5969; word-break: break-word; }
.hyp-list { display: grid; gap: 8px; }
.hyp-item {
  border: 1px solid var(--line-2);
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-radius: var(--radius);
}
.hyp-item.active, .hyp-item:hover {
  border-color: #bfd3ff;
  background: var(--primary-soft);
}
.lab-detail { display: grid; gap: 14px; }
.hyp-card, .exp-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.md-box {
  display: block;
  width: 100%;
  min-height: 240px;
  padding: 12px 14px;
  border: 1px solid var(--ctl-bd);
  border-radius: 6px;
  background: #f7f8fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  resize: vertical;
  box-sizing: border-box;
}
.hyp-card {
  border: 1px solid #bfd3ff;
  box-shadow: none;
}
.hyp-card-hd, .exp-card-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.hyp-card-hd { background: #f0f5ff; border-bottom: 1px solid #d6e4ff; }
.hyp-card-hd h3, .exp-card-hd h3 {
  margin: 0;
  font-size: 15px;
  padding: 0;
  border: 0;
  background: transparent;
}
.hyp-card-bd, .exp-card-bd { padding: 14px 16px 16px; }
.kind-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.kind-hyp { color: #245bdb; background: #d6e4ff; }
.kind-exp { color: #c25700; background: #ffe7ba; }
.exp-stack { display: grid; gap: 10px; }
.exp-stack-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #c25700;
}
.exp-card { border: 1px solid #ffd591; }
.exp-card-hd { background: #fff7e8; border-bottom: 1px solid #ffe7ba; }
.tag-exp { color: #c25700; background: #fff7e8; }
.pipe-toolbar { margin: 0 0 14px; }
.pipe-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.pipe-head .seg {
  display: inline-flex;
  flex: 1;
  min-width: 0;
  background: #f2f3f5;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.pipe-head .seg button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #646a73;
  font-size: 13px;
  font-weight: 500;
}
.pipe-head .seg button.active {
  background: #fff;
  color: #1f2329;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.08);
}
.pipe-head-act { flex-shrink: 0; }
.pipe-head-act .btn {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}
.sched-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 12px;
  -webkit-overflow-scrolling: touch;
}
.sched-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #eaedf1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: #4e5969;
  cursor: pointer;
}
.sched-chip span {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #f2f3f5;
  color: #646a73;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.sched-chip.active {
  border-color: #3370ff;
  background: #e8f3ff;
  color: #3370ff;
  font-weight: 600;
}
.sched-chip.active span { background: #3370ff; color: #fff; }
.sched-list { display: grid; gap: 8px; }
.sched-day {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 2px;
  font-size: 13px;
}
.sched-day .d { font-weight: 600; color: #1f2329; }
.sched-day .t { color: #8f959e; }
.sched-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #eaedf1;
  border-radius: 10px;
  padding: 12px;
}
.sched-card.is-overdue { border-color: #f9c9c6; background: #fff8f7; }
.sched-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sched-time {
  flex-shrink: 0;
  min-width: 42px;
  font-size: 13px;
  font-weight: 600;
  color: #3370ff;
}
.sched-card.is-overdue .sched-time { color: #d83931; }
.sched-card strong { display: block; font-size: 14px; }
.sched-sub { margin-top: 4px; font-size: 12px; color: #8f959e; }
.sched-card .btn { flex-shrink: 0; min-height: 36px; padding: 0 12px; }
.pipe-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pipe-field { display: block; min-width: 0; }
.pipe-field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.pipe-field select {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--ctl-h);
  padding: 0 28px 0 10px;
  border: 1px solid var(--ctl-bd);
  border-radius: var(--ctl-radius);
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238f959e' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  -webkit-appearance: none;
  appearance: none;
}
.pipe-count {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-screen[hidden] { display: none !important; }
.login-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 28px 24px 24px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.login-card .btn { width: 100%; min-height: 40px; }
.login-card .banner { margin: 0 0 16px; }
body.is-locked .layout,
body.is-locked .tabbar,
body.is-locked .overlay,
body.is-locked .drawer,
body.is-locked .confirm { display: none !important; }
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}
.empty {
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: #fff;
  border-radius: var(--radius);
  text-align: center;
}
.review-home { display: grid; gap: 14px; }
.decision-list { display: grid; gap: 10px; }
.decision-card {
  background: #fff;
  border: 1px solid #eaedf1;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.decision-card:hover {
  border-color: #bfd3ff;
  box-shadow: 0 2px 8px rgba(51, 112, 255, 0.06);
}
.decision-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.decision-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.decision-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.decision-choice,
.decision-eval {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.decision-choice { color: #245bdb; background: #e8f3ff; }
.decision-choice[data-choice="不做"],
.decision-choice[data-choice="停止"] { color: #646a73; background: #f5f6f7; }
.decision-choice[data-choice="延后"] { color: #c25700; background: #fff7e8; }
.decision-eval { color: #8f959e; background: #f5f6f7; }
.decision-eval[data-eval="正确"] { color: #0f7b3a; background: #e8f8f2; }
.decision-eval[data-eval="部分正确"] { color: #c25700; background: #fff7e8; }
.decision-eval[data-eval="错误"] { color: #c02a26; background: #ffece8; }
.decision-eval[data-eval="数据不足"] { color: #245bdb; background: #e8f3ff; }
.decision-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #1f2329;
  word-break: break-word;
}
.decision-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f7f8fa;
}
.decision-note.is-later { background: #f5f8ff; }
.decision-note-k {
  display: block;
  margin: 0 0 4px;
  color: #8f959e;
  font-size: 12px;
  font-weight: 600;
}
.decision-note.is-later .decision-note-k { color: #3370ff; }
.decision-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #646a73;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0 12px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #1f2329;
  cursor: pointer;
  user-select: none;
}
.chip-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.review-card {
  background: #fff;
  border: 1px solid #eaedf1;
  border-radius: 8px;
  overflow: hidden;
}
.review-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f2f5;
}
.review-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2329;
}
.review-hd .muted {
  margin: 4px 0 0;
  font-size: 12px;
}
.review-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.review-summary {
  margin: 0;
  padding: 12px 16px;
  background: #f5f8ff;
  border-bottom: 1px solid #e8f0ff;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.6;
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #f0f2f5;
}
.review-sec {
  background: #fff;
  padding: 14px 16px 16px;
  min-width: 0;
}
.review-sec-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #8f959e;
  letter-spacing: 0.02em;
}
.review-sec-body {
  font-size: 13px;
  line-height: 1.65;
  color: #1f2329;
  white-space: pre-wrap;
  word-break: break-word;
}
.review-sec-ok .review-sec-label { color: #2ea121; }
.review-sec-bad .review-sec-label { color: #d83931; }
.review-sec-exec .review-sec-label { color: #c27500; }
.review-sec-dir .review-sec-label,
.review-sec-next .review-sec-label { color: #3370ff; }
.review-sec-stop .review-sec-label { color: #646a73; }
.form-group-title {
  margin: 8px 0 12px;
  padding-top: 8px;
  border-top: 1px solid #f0f2f5;
  font-size: 12px;
  font-weight: 600;
  color: #8f959e;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.page-actions { display: none; }
.tabbar { display: none; }
.mine-home { display: grid; gap: 14px; }
.mine-account {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 16px 18px;
}
.mine-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.mine-account strong { display: block; font-size: 16px; }
.mine-account p { margin: 4px 0 0; }
.mine-account .grow { flex: 1; min-width: 0; }
.mine-logout {
  margin-top: 8px;
  padding-bottom: 8px;
}
.mine-logout .btn-ghost {
  width: 100%;
  min-height: 44px;
  color: #646a73;
}
.mine-install {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 14px 16px;
}
.mine-install h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.mine-install .muted { margin: 0 0 10px; font-size: 13px; }
.mine-install .help { margin: 0; }

.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ops-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 124px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}
.ops-tile:hover { border-color: #bfd3ff; background: #f8fbff; }
.ops-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ops-ico svg { width: 18px; height: 18px; display: block; }
.ops-copy { display: grid; gap: 4px; min-width: 0; }
.ops-copy strong { font-size: 15px; font-weight: 600; }
.ops-copy span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.follow-home {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}
.follow-hero {
  background: linear-gradient(180deg, #f5f9ff 0%, #fff 72%);
  border-radius: 12px;
  padding: 16px 18px 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.follow-hero-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.follow-hero h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.follow-hero > p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #4e5969;
}
.follow-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.follow-kpi {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
}
.follow-kpi .n {
  display: block;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.follow-kpi .l {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.follow-kpi.tone-primary .n { color: var(--primary); }
.follow-kpi.tone-warm .n { color: #c25700; }
.follow-kpi.tone-danger .n { color: var(--danger); }
.follow-kpi.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.follow-kpi.active .l { color: var(--primary); }
.follow-more {
  min-width: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8f0ff;
}
.follow-stats {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 14px 16px;
}
.follow-stats h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.follow-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.follow-chips::-webkit-scrollbar { display: none; }
.follow-chip {
  flex: 0 0 auto;
  border: 1px solid #eaedf1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  color: #4e5969;
  line-height: 1.3;
}
.follow-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.follow-section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.follow-section-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.follow-section-hd .muted { font-size: 12px; }
.rel-stats {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 14px 16px;
}
.rel-stats h3,
.rel-stats summary {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.rel-stats summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rel-stats summary::-webkit-details-marker { display: none; }
.rel-stats summary .muted { font-weight: 400; }
.rel-stats details[open] summary .muted { display: none; }
.rel-stats details[open] .rel-stats-grid { margin-top: 12px; }
.rel-stats details[open] .help { margin-top: 10px; }
.rel-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.rel-stats-grid > div {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
}
.rel-stats-grid .n {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1f2329;
}
.rel-stats-grid .l {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1f2329;
}
.follow-list { display: grid; gap: 10px; min-width: 0; }
.follow-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.follow-card[data-prio="高"] { border-color: #f9c9c6; }
.follow-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.follow-card-title { min-width: 0; flex: 1; }
.follow-card-hd strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.follow-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #8f959e;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.follow-stage {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #4e5969;
  font-weight: 600;
}
.follow-ready {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #e8f8f2;
  color: #0f7b4a;
  font-weight: 700;
  font-size: 12px;
}
.follow-amt { color: #1f2329; font-weight: 600; }
.follow-why {
  margin: 10px 0 0;
  font-size: 14px;
  color: #1f2329;
  line-height: 1.55;
  font-weight: 500;
}
.follow-tip {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f5f9ff;
  border-radius: 8px;
  border: 1px solid #e8f0ff;
}
.follow-tip > span {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #d6e4ff;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 18px;
}
.follow-tip p {
  margin: 0;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.5;
}
.follow-card-ft {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}
.follow-go {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 0;
  margin: 0;
  width: auto;
  min-height: auto;
  border-radius: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.follow-go::after { content: ' →'; }
.follow-go:active { opacity: 0.7; }
.prio {
  display: inline-flex;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
  align-self: flex-start;
  max-width: 72px;
}
.prio-select {
  width: auto;
  max-width: 72px;
  min-width: 0;
  height: 28px;
  padding: 0 20px 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: #f5f6f7;
  background-image: linear-gradient(45deg, transparent 50%, #8f959e 50%),
    linear-gradient(135deg, #8f959e 50%, transparent 50%);
  background-position: calc(100% - 12px) 11px, calc(100% - 8px) 11px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  color: #646a73;
  font-size: 12px;
  font-weight: 600;
  line-height: 26px;
  -webkit-appearance: none;
  appearance: none;
}
.prio[data-prio="高"] .prio-select {
  color: #c02a26;
  background: #ffece8;
}
.prio[data-prio="中"] .prio-select {
  color: #c25700;
  background: #fff7e8;
}
.prio[data-prio="低"] .prio-select {
  color: #646a73;
  background: #f5f6f7;
}
.prio-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.prio-tag[data-prio="高"] {
  color: #c02a26;
  background: #ffece8;
}
.prio-tag[data-prio="中"] {
  color: #c25700;
  background: #fff7e8;
}
.prio-tag[data-prio="低"] {
  color: #646a73;
  background: #f5f6f7;
}
.next-box {
  border: 1px solid #bfd3ff;
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.next-box h3 { margin: 0 0 8px; font-size: 14px; color: var(--primary); }
.next-box p { margin: 0 0 6px; }
.next-box .warn { color: #c25700; font-size: 13px; }
.stage-hist { display: grid; gap: 8px; margin: 0 0 16px; }
.stage-hist-item { font-size: 13px; }
.stage-hist-item .d { color: var(--muted); margin-right: 8px; }
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.choice-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 40px;
  background: #fff;
  cursor: pointer;
}
.choice-grid label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.exp-link {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 37, 0.45);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  background: #fff;
  z-index: 21;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: var(--shadow-drawer);
}
.overlay[hidden],
.drawer[hidden] {
  display: none !important;
}
.confirm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm[hidden] { display: none !important; }
.confirm-mask {
  position: absolute;
  inset: 0;
  background: rgba(31, 35, 41, 0.45);
}
.confirm-box {
  position: relative;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 10px;
  padding: 20px 20px 16px;
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.18);
}
.confirm-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2329;
}
.confirm-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4e5969;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.btn-danger-solid {
  border: 1px solid #f54a45;
  background: #f54a45;
  color: #fff;
}
.btn-danger-solid:hover {
  background: #d83a35;
  border-color: #d83a35;
  color: #fff;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: #646a73;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.drawer-close:hover { background: var(--nav-hover); color: var(--ink); }
.drawer-body { padding: 20px 24px 0; overflow: auto; flex: 1; }
.drawer-body h3 { font-size: 14px; margin: 0 0 12px; }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .rate-row, .dash-split { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  html, body { height: 100%; overflow: hidden; }
  .layout { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .nav { display: none; }
  .tabbar {
    display: flex;
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 4px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    text-decoration: none;
    font-size: 11px;
    color: #646a73;
    border-radius: 8px;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--primary); font-weight: 600; }
  .ops-grid { gap: 10px; }
  .ops-tile { min-height: 112px; padding: 14px; }
  .decision-card { padding: 14px; border-radius: 12px; }
  .decision-hd { align-items: flex-start; flex-wrap: wrap; }
  .decision-tags { justify-content: flex-start; }
  .decision-title { font-size: 16px; }
  .chip-opt { min-height: 40px; font-size: 14px; flex: 1 1 calc(50% - 8px); justify-content: center; }
  .chip-row { gap: 8px; }
  .layout,
  .main-wrap,
  .page-scroll,
  #app {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .main-wrap { margin-left: 0; height: auto; flex: 1; overflow: hidden; }
  .top { display: none !important; }
  .page-actions:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 12px 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-actions .btn,
  .page-actions .btn-ghost { flex: 1; min-height: 40px; }
  .page-actions .period { width: 100%; }
  .page-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #app {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 24px;
    overflow-x: visible;
    box-sizing: border-box;
  }
  .banner {
    margin-left: 12px;
    margin-right: 12px;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
  }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-kpi { box-shadow: none; }
  .dash-kpi:last-child { grid-column: 1 / -1; }
  .dash-kpi .v { font-size: 22px; }
  .rate-rings { grid-template-columns: 1fr; gap: 14px; }
  .rate-ring {
    grid-template-columns: 72px 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    gap: 12px;
  }
  .rate-ring-chart { width: 72px; height: 72px; }
  .rate-ring-pct { font-size: 14px; }
  .rate-item { grid-template-columns: 72px 1fr auto; }
  .cust-toolbar { flex-wrap: nowrap; }
  .cust-check { height: 40px; }
  .row-2, .row-3 { grid-template-columns: 1fr; gap: 0; }
  .choice-grid { grid-template-columns: 1fr; }
  .follow-home,
  .follow-hero,
  .follow-list,
  .follow-card,
  .follow-more { max-width: 100%; min-width: 0; }
  .follow-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .follow-chip { flex: 0 0 auto; white-space: nowrap; }
  .follow-hero { padding: 14px 14px 12px; }
  .follow-hero h2 { font-size: 20px; }
  .follow-kpi .n { font-size: 22px; }
  .follow-card { padding: 12px 14px; width: 100%; box-sizing: border-box; }
  .follow-card-ft { justify-content: flex-end; }
  .follow-card-ft .btn,
  .follow-card-ft .follow-go {
    flex: 0 0 auto;
    width: auto;
    min-height: auto;
  }
  .rel-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-feedback { font-size: 15px; }
  .follow-card-hd { flex-direction: row; align-items: flex-start; gap: 8px; }
  .prio-select {
    font-size: 12px !important;
    height: 28px !important;
    line-height: 26px !important;
    width: auto !important;
    max-width: 72px;
  }
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; }
  .pipe-head {
    position: sticky;
    top: 0;
    z-index: 8;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px -12px 12px;
    padding: 8px 12px 10px;
    background: rgba(245, 246, 247, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eaedf1;
  }
  .pipe-head .seg { width: 100%; }
  .pipe-head-act { width: 100%; }
  .pipe-head-act .btn { width: 100%; min-height: 40px; }
  .toolbar select { min-width: 0; flex: 1; }
  .pipe-field select { font-size: 16px; height: 40px; line-height: 38px; }
  .mine-account { flex-wrap: wrap; }
  .cell-actions { white-space: normal; }
  input, select:not(.prio-select), textarea { font-size: 16px; }
  .field input:not([type="hidden"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
  .field select,
  .field textarea,
  .toolbar select { font-size: 16px; height: 40px; line-height: 38px; }
  .field textarea { height: auto; line-height: 1.6; }
  .prio-dot { font-size: 13px; min-width: 32px; height: 32px; line-height: 30px; }
  .drawer {
    width: 100%;
    height: min(92dvh, 100%);
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-radius: 12px 12px 0 0;
  }
  .drawer.is-open { transform: translateY(0); }
  .drawer-head { height: 48px; }
  .sheet-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .table-cards thead { display: none; }
  .table-cards table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr {
    padding: 12px 14px;
    border-bottom: 8px solid var(--bg);
  }
  .table-cards td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: 0;
  }
  .table-cards td::before {
    content: attr(data-th);
    color: var(--muted);
    flex-shrink: 0;
  }
  .table-cards .empty-row td { display: block; }
  .table-cards .empty-row td::before { content: none; }
  .table-cards .cell-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; }
  .table-cards .cell-actions::before { content: none; }
}
