:root,
html[data-theme="ops"] {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --paper: #f8fafc;
  --paper-2: #f1f5f9;
  --card: #ffffff;
  --line: rgba(15, 23, 42, .08);
  --line-strong: rgba(15, 23, 42, .14);
  --muted: #64748b;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(37, 99, 235, .14);
  --accent-ring: rgba(37, 99, 235, .22);
  --tide: #0f766e;
  --side: #1e293b;
  --side-2: #0f172a;
  --side-line: rgba(226, 232, 240, .1);
  --side-text: #cbd5e1;
  --side-title: #f8fafc;
  --side-muted: #94a3b8;
  --side-hover: rgba(255, 255, 255, .06);
  --side-hover-text: #f8fafc;
  --side-active-bg: rgba(37, 99, 235, .22);
  --side-active-text: #ffffff;
  --side-wash: transparent;
  --side-edge: #0f172a;
  --ok: #15803d;
  --warn: #b45309;
  --gold: #a16207;
  --gold-ink: #854d0e;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .04);
  --radius: 8px;
  --radius-lg: 12px;
  --display: var(--sans);
  --page-bg: #f8fafc;
  --page-glow: transparent;
  --kpi-well: #f1f5f9;
  --row-hover: #f8fafc;
  --table-head: #f1f5f9;
  --tag-well: #e2e8f0;
  --tag-ok-bg: #dcfce7;
  --tag-warn-bg: #ffedd5;
  --tag-tide-bg: #ccfbf1;
  --tag-gold-bg: #fef3c7;
  --tag-biz-bg: #dbeafe;
  --chip-hover: #e2e8f0;
  --input-bg: #ffffff;
  --need-fill-bg: #fff4e5;
  --need-fill-line: #f0b15b;
  --ghost-hover: #ffffff;
  --btn-hover: #1d4ed8;
  --lift: #ffffff;
  --lift-hover: #eff6ff;
  --bulk-bg: #eff6ff;
  --bulk-line: rgba(37, 99, 235, .28);
  --lesson-bg: #eff6ff;
  --lesson-line: #bfdbfe;
  --lesson-later: #1e40af;
  --funnel-well: #f1f5f9;
  --toast-ink: #f8fafc;
  --scrim: rgba(15, 23, 42, .48);
  --err-bg: #ffedd5;
  --login-stage-bg: #1e293b;
  --login-fg: #f8fafc;
  --login-muted: #94a3b8;
  --login-kicker: #94a3b8;
  --login-lead: #cbd5e1;
  --login-loop: #94a3b8;
  --login-dot: #64748b;
  --login-glow: rgba(37, 99, 235, .35);
  --track-idle: #cbd5e1;
  --track-mute: #94a3b8;
  --spot: rgba(37, 99, 235, .28);
  --spot-soft: rgba(37, 99, 235, .12);
  --mark-bg: #2563eb;
  --mark-ink: #ffffff;
  --sans: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
}

html[data-theme="editorial"] {
  --ink: #1f1f1f;
  --ink-soft: #2a2a2a;
  --paper: #f4eee4;
  --paper-2: #ebe3d4;
  --card: #fffdf8;
  --line: rgba(31, 31, 31, .1);
  --line-strong: rgba(31, 31, 31, .16);
  --muted: #6b6560;
  --accent: #ff4800;
  --accent-deep: #c43800;
  --accent-ink: #fffdf8;
  --accent-soft: rgba(255, 72, 0, .12);
  --accent-ring: rgba(255, 72, 0, .22);
  --tide: #1a5f58;
  --side: #2a2420;
  --side-2: #1f1b18;
  --side-line: rgba(244, 238, 228, .1);
  --side-text: #d4cdc2;
  --side-title: #fff8ef;
  --side-muted: #9a9286;
  --side-hover: rgba(255, 255, 255, .05);
  --side-hover-text: #fff8ef;
  --side-active-bg: rgba(255, 72, 0, .16);
  --side-active-text: #fff8ef;
  --side-wash: rgba(255, 72, 0, .1);
  --side-edge: #1a1613;
  --ok: #1f6b54;
  --warn: #9a3412;
  --gold: #c4a574;
  --gold-ink: #7a6230;
  --shadow: none;
  --radius: 16px;
  --radius-lg: 16px;
  --display: var(--serif);
  --page-bg: #f4eee4;
  --page-glow: rgba(255, 72, 0, .07);
  --kpi-well: #f6f0e5;
  --row-hover: #f7f1e6;
  --table-head: #f4eee3;
  --tag-well: #efe6d4;
  --tag-ok-bg: #dceae4;
  --tag-warn-bg: #f3dfd4;
  --tag-tide-bg: #d7e6e4;
  --tag-gold-bg: #efe4cc;
  --tag-biz-bg: #ffe4d6;
  --chip-hover: #ead4c0;
  --input-bg: #ffffff;
  --need-fill-bg: #fde8d8;
  --need-fill-line: #e8a07a;
  --ghost-hover: #ffffff;
  --btn-hover: #e04000;
  --lift: #ffffff;
  --lift-hover: #fffaf4;
  --bulk-bg: #fff4ee;
  --bulk-line: rgba(255, 72, 0, .28);
  --lesson-bg: #fff4ee;
  --lesson-line: #f5c4b0;
  --lesson-later: #c43800;
  --funnel-well: #f3ece0;
  --toast-ink: #fff8ef;
  --scrim: rgba(31, 31, 31, .5);
  --err-bg: #f8e8e1;
  --login-stage-bg: #2a2420;
  --login-fg: #fff8ef;
  --login-muted: #c9c0b0;
  --login-kicker: #9a8f80;
  --login-lead: #c9c0b0;
  --login-loop: #a89d8d;
  --login-dot: #7a7164;
  --login-glow: rgba(255, 72, 0, .38);
  --track-idle: #ddd4c5;
  --track-mute: #9a9286;
  --spot: rgba(255, 72, 0, .28);
  --spot-soft: rgba(255, 72, 0, .12);
  --mark-bg: #ff4800;
  --mark-ink: #fffdf8;
}

html[data-theme="mono"] {
  --ink: #111111;
  --ink-soft: #242629;
  --paper: #ffffff;
  --paper-2: #f4f4f5;
  --card: #ffffff;
  --line: rgba(17, 17, 17, .1);
  --line-strong: rgba(17, 17, 17, .16);
  --muted: #5c5e63;
  --accent: #266df0;
  --accent-deep: #1a56c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(38, 109, 240, .1);
  --accent-ring: rgba(38, 109, 240, .2);
  --tide: #0a7a4c;
  --side: #ffffff;
  --side-2: #fafafa;
  --side-line: rgba(17, 17, 17, .08);
  --side-text: #5c5e63;
  --side-title: #111111;
  --side-muted: #9fa1a7;
  --side-hover: #f4f4f5;
  --side-hover-text: #111111;
  --side-active-bg: #111111;
  --side-active-text: #ffffff;
  --side-wash: transparent;
  --side-edge: rgba(17, 17, 17, .1);
  --ok: #0a7a4c;
  --warn: #b45309;
  --gold: #a16207;
  --gold-ink: #854d0e;
  --shadow: none;
  --radius: 8px;
  --radius-lg: 8px;
  --display: var(--sans);
  --page-bg: #ffffff;
  --page-glow: transparent;
  --kpi-well: #fafafa;
  --row-hover: #fafafa;
  --table-head: #fafafa;
  --tag-well: #f4f4f5;
  --tag-ok-bg: #e8f8f0;
  --tag-warn-bg: #fff4e5;
  --tag-tide-bg: #e8f8f0;
  --tag-gold-bg: #fff7e0;
  --tag-biz-bg: #eef3ff;
  --chip-hover: #ececec;
  --input-bg: #ffffff;
  --need-fill-bg: #fff6e8;
  --need-fill-line: #d4b07a;
  --ghost-hover: #f4f4f5;
  --btn-hover: #1a56c4;
  --lift: #ffffff;
  --lift-hover: #f7f9ff;
  --bulk-bg: #f7f9ff;
  --bulk-line: rgba(38, 109, 240, .24);
  --lesson-bg: #f7f9ff;
  --lesson-line: #d6e2fb;
  --lesson-later: #1a56c4;
  --funnel-well: #fafafa;
  --toast-ink: #ffffff;
  --scrim: rgba(17, 17, 17, .45);
  --err-bg: #fff4e5;
  --login-stage-bg: #111111;
  --login-fg: #fafafa;
  --login-muted: #9fa1a7;
  --login-kicker: #9fa1a7;
  --login-lead: #c4c4c6;
  --login-loop: #9fa1a7;
  --login-dot: #6b6d72;
  --login-glow: transparent;
  --track-idle: #e5e5e5;
  --track-mute: #9fa1a7;
  --spot: rgba(38, 109, 240, .28);
  --spot-soft: rgba(38, 109, 240, .12);
  --mark-bg: #111111;
  --mark-ink: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: light; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 520px at 88% -10%, var(--page-glow), transparent 46%),
    var(--page-bg);
  color: var(--ink);
  letter-spacing: .01em;
}
button, input, select, textarea { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.side {
  position: fixed; inset: 0 auto 0 0; width: 248px;
  background:
    linear-gradient(180deg, var(--side-wash), transparent 28%),
    var(--side);
  color: var(--side-text);
  display: flex; flex-direction: column;
  padding: 26px 18px 18px;
  border-right: 1px solid var(--side-edge);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--mark-bg);
  color: var(--mark-ink); display: grid; place-items: center;
  font-family: var(--display); font-size: 23px; line-height: 1;
}
.brand strong {
  display: block; color: var(--side-title); font-size: 18px; letter-spacing: .08em;
  font-weight: 600;
}
.brand em { font-style: normal; color: var(--side-muted); font-size: 12px; letter-spacing: .18em; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin: 28px 0 auto; }
.nav-label {
  font-size: 11px; letter-spacing: .22em; color: var(--side-muted);
  padding: 16px 12px 6px; text-transform: none;
}
.side nav a {
  color: var(--side-text); padding: 10px 12px; border-radius: 9px;
  text-decoration: none; display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.4;
}
.side nav a svg { width: 16px; height: 16px; opacity: .72; flex: none; }
.side nav a:hover { background: var(--side-hover); color: var(--side-hover-text); text-decoration: none; }
.side nav a.active {
  background: var(--side-active-bg); color: var(--side-active-text);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-n {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--side-line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex: none;
  color: var(--side-muted);
  margin-top: 1px;
}
.side nav a.coach-now:not(.active) { box-shadow: inset 2px 0 0 var(--spot); }
.side nav a.coach-now .nav-n,
.side nav a.active .nav-n {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
}
.side nav a.coach-now::after {
  content: "现在";
  margin-left: auto;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--accent);
}
.who {
  padding: 14px 12px 8px; border-top: 1px solid var(--side-line);
  font-size: 12px; color: var(--side-muted);
}
.who b { display: block; color: var(--side-title); margin-bottom: 4px; font-size: 14px; }
.who .theme-switch {
  margin-top: 12px;
  background: var(--side-hover);
  border-color: var(--side-line);
}
.who .theme-switch button { color: var(--side-muted); }
.who .theme-switch button:hover { color: var(--side-title); }
.who a { display: inline-block; margin-top: 10px; color: var(--accent); }

.main {
  margin-left: 248px;
  min-height: 100vh;
  padding: 28px 40px 80px;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 18px; color: var(--muted); font-size: 13px;
}
.topbar strong { color: var(--ink-soft); font-weight: 600; letter-spacing: .06em; }
.topbar-user { margin-left: auto; white-space: nowrap; }

.theme-switch {
  display: inline-flex; gap: 0;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}
.theme-switch button {
  border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 12px;
  padding: 5px 10px; cursor: pointer;
  letter-spacing: .06em;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink);
}

.coach {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 16px 22px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.coach-bar {
  display: flex; align-items: center; gap: 12px;
}
.coach-bar .coach-track { flex: 1; min-width: 0; }
#coachFold { flex: none; white-space: nowrap; }
html[data-coach="fold"] #coachFold.btn.ghost {
  background: #c81e1e;
  color: #fff;
  border-color: #c81e1e;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 0 0 0 3px rgba(200, 30, 30, .16);
}
html[data-coach="fold"] #coachFold.btn.ghost:hover {
  background: #a81818;
  color: #fff;
  border-color: #a81818;
}
.coach::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.coach.done::before { background: var(--ok); }
.coach-track {
  display: flex; gap: 8px; list-style: none;
  margin: 0; padding: 0;
}
.coach-track li {
  flex: 1; min-width: 0;
  color: var(--track-mute);
}
.coach-track a, .coach-track li > span {
  display: flex; align-items: flex-start; gap: 8px;
  color: inherit; text-decoration: none;
  min-height: 28px;
}
.coach-track a:hover { color: var(--ink); text-decoration: none; }
.coach-track b {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--track-idle);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.coach-track li > * > span {
  font-size: 12px; letter-spacing: .02em; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.coach-track li::after {
  content: ""; display: block; height: 3px; margin-top: 8px;
  border-radius: 99px; background: var(--track-idle);
}
.coach-track li.done { color: var(--ok); }
.coach-track li.done b { border-color: var(--ok); }
.coach-track li.done::after { background: var(--ok); }
.coach-track li.now { color: var(--accent); font-weight: 600; }
.coach-track li.now b {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
}
.coach-track li.now::after { background: var(--accent); }
.coach-body {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.coach-copy { min-width: 0; }
.coach-copy strong {
  display: block; font-family: var(--display); font-size: 22px;
  font-weight: 600; letter-spacing: .04em; margin: 0 0 6px;
}
.coach-copy p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.coach-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 168px;
}
.coach.done .coach-body { align-items: stretch; }
.coach.done .coach-actions {
  flex: 1 1 420px;
  min-width: 0;
  justify-content: center;
}
.jump-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.coach.done .jump-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jump-tile {
  display: block;
  background: var(--lift);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--ink);
  text-decoration: none;
}
.jump-tile:hover {
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
  background: var(--lift-hover);
}
.jump-tile em {
  display: block; font-style: normal;
  font-size: 11px; letter-spacing: .12em; color: var(--muted);
}
.jump-tile strong {
  display: block; margin-top: 4px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: .02em;
}
.coach-jumps[hidden], .jump-tiles[hidden] { display: none; }
.coach-later, .coach-url {
  margin: 10px 0 0 !important;
  font-size: 13px !important;
}
.coach-url code {
  font-family: inherit;
  background: var(--lift);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
}
.coach-spot {
  box-shadow: 0 0 0 3px var(--spot);
  animation: coachPulse 1.6s ease-in-out infinite;
}
@keyframes coachPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--spot); }
  50% { box-shadow: 0 0 0 8px var(--spot-soft); }
}
.coach-spot-hint { display: none; color: var(--accent); font-size: 13px; margin: 10px 0 0; }
.coach-spot-hint.show { display: block; }

.lesson {
  background: var(--lesson-bg);
  border: 1px solid var(--lesson-line);
  border-radius: var(--radius-lg);
  padding: 18px 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.lesson-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .16em;
  margin-bottom: 8px;
}
.lesson > strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .03em;
  margin: 0 0 8px;
}
.lesson > p { margin: 0; color: var(--muted); line-height: 1.6; }
.lesson ol {
  margin: 12px 0 0;
  padding: 0 0 0 22px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.lesson li { margin: 5px 0; }
.lesson-later { margin-top: 12px !important; color: var(--lesson-later) !important; }
.lesson-url {
  margin-top: 12px !important;
  color: var(--ink-soft) !important;
}
.lesson-url code {
  font-family: inherit;
  background: var(--lift);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 5px;
}
.later-panel, .later-block {
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  color: var(--muted);
}
.later-panel summary, .later-block summary {
  cursor: pointer;
  letter-spacing: .06em;
  font-size: 13px;
}
.later-panel .row, .later-panel label, .later-block .grid-2 { margin-top: 12px; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 22px;
}
.page-head h1 {
  margin: 0 0 8px; font-family: var(--display); font-size: 30px;
  font-weight: 600; letter-spacing: .04em; line-height: 1.15;
}
.page-head p, .muted { color: var(--muted); line-height: 1.6; }
.page-head p { margin: 0; max-width: 52ch; }
.panel-block-bar {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  justify-content: space-between; align-items: center;
  margin: 0 0 12px;
}
.panel-block-bar h2 { margin: 0; }
.follow-hint { margin: 8px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 9px; padding: 9px 16px; cursor: pointer;
  font: inherit; text-decoration: none; letter-spacing: .04em;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; color: var(--accent-ink); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover { background: var(--ghost-hover); color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { background: var(--warn); }

.desk-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 14px;
  margin-bottom: 18px;
}
.desk-board .cards { margin: 0; }
.desk-board .kpi {
  box-shadow: none;
  background: var(--kpi-well);
}
.desk-board .biz-strip {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.desk-board .biz-strip .biz-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
  margin-right: 4px;
}
.desk-board .biz-strip a.tag { text-decoration: none; }
.desk-board .biz-strip a.tag:hover { background: var(--chip-hover); color: var(--accent-deep); }
.review-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.review-stats .kpi { box-shadow: none; background: var(--kpi-well); margin: 0; }

.plan-pools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
.plan-pools-look {
  grid-template-columns: 1fr 1fr;
}
.plan-roster {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}
.plan-rest-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.plan-col {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 12px;
  min-height: 140px;
}
.plan-col h3 { margin: 0 0 4px; font-size: 15px; }
.plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0 0;
}
.plan-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.plan-card p { margin: 6px 0; font-size: 13px; line-height: 1.5; }
.plan-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
}
.plan-leads { max-height: 420px; overflow: auto; margin-top: 6px; }
.sheet-block { margin: 0 0 16px; }
.sheet-block h4 { margin: 0 0 8px; font-size: 14px; }
.sheet-block em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
}
.plan-pools-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.plan-pending .plan-col { min-height: 0; }
.plan-rest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.plan-review-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.plan-review-board .plan-col {
  min-height: 0;
  height: 100%;
  overflow: auto;
  border-radius: 22px;
  padding: 16px;
}
.plan-review-board .plan-card {
  min-height: 160px;
  border-radius: 16px;
}
.plan-review-board .plan-leads { max-height: none; }
.staff-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.staff-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  min-width: 160px;
}
.staff-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.staff-chip small { color: var(--muted); }
.sheet-table { width: 100%; font-size: 13px; }
.sheet-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; }
.sheet-table td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
@media (max-width: 900px) {
  .plan-pools, .plan-pools-look, .plan-rest, .plan-rest-3, .plan-review-board { grid-template-columns: 1fr; }
}
.review-stats .kpi strong { font-size: 22px; }
.review-stats .kpi:first-child strong {
  font-size: 16px; font-family: var(--sans); letter-spacing: .02em;
}
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi { padding: 18px 20px 16px; position: relative; }
.kpi em {
  color: var(--muted); font-style: normal; font-size: 12px;
  letter-spacing: .12em;
}
.kpi strong {
  display: block; font-family: var(--display); font-size: 36px;
  font-variant-numeric: tabular-nums; margin-top: 10px; letter-spacing: .02em;
}
.kpi small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.kpi.warn strong { color: var(--warn); }
.kpi.ok strong { color: var(--ok); }
.panel { padding: 20px 22px; margin-bottom: 16px; }
.panel.tight { padding: 0; overflow: hidden; }
.panel.tight > h2, .panel.tight .panel-head { padding: 16px 20px 0; margin: 0; }
.panel.tight table { margin: 0; }
.table-wrap { overflow-x: auto; }
.panel.narrow { max-width: 440px; }
.panel h2 {
  margin: 0 0 14px; font-size: 15px; letter-spacing: .08em;
  font-weight: 600; color: var(--ink-soft);
}
.panel h3 {
  margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft);
}

.funnel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.funnel-item {
  background: var(--funnel-well); border-radius: 10px; padding: 12px 8px 14px;
  text-align: center; position: relative; overflow: hidden;
}
.funnel-item i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0));
}
.funnel-item span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.funnel-item b { display: block; margin-top: 8px; font-family: var(--display); font-size: 24px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th {
  background: var(--table-head); font-weight: 600; font-size: 12px;
  letter-spacing: .08em; color: var(--muted);
}
.panel.tight thead th {
  position: sticky; top: 0; z-index: 1;
  box-shadow: 0 1px 0 var(--line);
}
tbody tr:hover td { background: var(--row-hover); }
td .empty { padding: 28px 16px; }
.toolbar, .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow);
}
.filter-bar, .bulk-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.filter-fields, .bulk-bar {
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end;
}
.filter-bar .field {
  margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .1em;
}
.filter-bar .field input, .filter-bar .field select {
  display: block; margin-top: 6px; width: auto; min-width: 156px;
}
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.filter-chips[hidden] { display: none; }
.filter-chips .tag { cursor: pointer; border: 0; font: inherit; }
.filter-chips .tag:hover { background: var(--chip-hover); }
.bulk-bar {
  border-color: var(--bulk-line);
  background: var(--bulk-bg);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar #sel { min-width: 72px; }

.board-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 14px;
}
.board-tabs-row .board-tabs { margin: 0; flex: 1; }
.modal.tag-manage,
.modal.import-rules {
  width: min(560px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
}
.modal.import-result {
  width: min(720px, 100%);
  max-height: min(92vh, 780px);
  overflow: auto;
}
.import-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 12px;
  font-weight: 600;
}
.import-counts .is-bad { color: var(--warn); }
.import-miss { width: 100%; font-size: 13px; }
.import-miss th, .import-miss td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.modal.tag-manage .field-add-row { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.board-tabs button {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}
.board-tabs button.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.board-tabs-gap {
  width: 1px;
  align-self: stretch;
  background: var(--line-strong);
  margin: 0 4px;
}
.board-tabs button.is-archive {
  border-color: var(--warn);
  color: var(--warn);
  font-weight: 600;
}
.board-tabs button.is-archive.is-on {
  background: var(--err-bg);
  border-color: var(--warn);
  color: var(--warn);
  box-shadow: 0 0 0 3px var(--tag-warn-bg);
}

.line-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 10px 0 14px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.line-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  letter-spacing: 0;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.line-row.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.line-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.line-row .line-n {
  flex: 0 0 auto;
  min-width: 52px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
}
.line-row .line-title { flex: 1; margin-top: 0; }
.line-need { display: flex; align-items: center; gap: 8px; margin: 0; padding-left: 0; }
.line-need input { width: 72px; margin: 0; }
.line-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.line-media {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
}
.line-preview, .work-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  flex-shrink: 0;
}
.line-preview.empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}
.work-lines { margin: 8px 0 0; padding-left: 0; list-style: none; }
.work-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  line-height: 1.5;
}
.work-thumb { width: 96px; height: 96px; }
.line-task { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; background: var(--card); }
.pick-review { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; background: var(--paper-2); }
.pick-review header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.line-task .check-list { margin: 8px 0; max-height: 220px; overflow: auto; }
.staff-picks, .lead-picks {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  padding: 0 0 4px;
}
.lead-picks { max-height: 180px; overflow: auto; }
.line-row .lead-picks {
  max-height: none;
  flex: 1;
  min-height: 120px;
}
.line-need { padding-left: 0; }
.line-media { padding-left: 0; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-card textarea { min-height: 96px; resize: vertical; }
.plan-card .row { margin-top: 8px; align-items: center; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }

input, select, textarea {
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--input-bg); color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
/* Empty fillable vs already-filled / display-only. Search/filter stay white. */
:is(.panel, .modal, .desk, .login-card, .kv-edit, .contact-add, .add-lead, .plan-card) input:not(#q):not(#poolQ):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]):not([readonly]):placeholder-shown,
:is(.panel, .modal, .desk, .login-card, .kv-edit, .contact-add, .add-lead, .plan-card) textarea:not([readonly]):placeholder-shown,
:is(.panel, .modal, .desk, .login-card, .kv-edit, .contact-add) select:has(> option[value=""]:checked),
input.need-fill,
select.need-fill,
textarea.need-fill,
.kv dd.need-fill,
.insight-portrait.need-fill,
.insight-body.need-fill {
  background: var(--need-fill-bg);
  border-color: var(--need-fill-line);
}
.filter-bar input,
.filter-bar select,
.toolbar input,
.toolbar select,
.bulk-bar input,
.bulk-bar select,
#q, #poolQ {
  background: var(--input-bg);
  border-color: var(--line-strong);
}
.toolbar input, .toolbar select { width: auto; min-width: 168px; }
label { display: block; margin: 12px 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
label input, label select, label textarea { margin-top: 7px; }
label.btn {
  display: inline-flex; margin: 0; color: var(--accent-ink);
  font-size: inherit; letter-spacing: .04em; cursor: pointer;
}
label.btn.ghost { color: var(--ink); }
.inline { display: flex; align-items: center; gap: 8px; width: auto; color: var(--ink); letter-spacing: 0; font-size: 14px; }
.inline input { width: auto; }

.tag {
  display: inline-flex; align-items: center;
  background: var(--tag-well); border-radius: 999px; padding: 3px 10px;
  font-size: 12px; letter-spacing: .04em;
}
.tag.ok { background: var(--tag-ok-bg); color: var(--ok); }
.tag.warn { background: var(--tag-warn-bg); color: var(--warn); }
.tag.tide { background: var(--tag-tide-bg); color: var(--tide); }
.tag.gold { background: var(--tag-gold-bg); color: var(--gold-ink); }
.tag.biz { background: var(--tag-biz-bg); color: var(--accent-deep); }
.biz-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.biz-strip { margin: 0 0 16px; }
.tag-edit { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 12px 0 0; }

.empty {
  color: var(--muted); padding: 36px 24px; text-align: center;
  font-size: 14px; line-height: 1.7;
}
.empty b { display: block; color: var(--ink-soft); font-size: 16px; margin-bottom: 6px; }
.pager { display: flex; gap: 8px; align-items: center; padding: 12px 16px; }
.bar { height: 7px; background: var(--tag-well); border-radius: 99px; overflow: hidden; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--tide); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.check-list.tall { max-height: 260px; overflow: auto; padding-right: 4px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.kv dd {
  margin: 7px 0 0; font-size: 15px; min-height: 40px;
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--input-bg); color: var(--ink); line-height: 1.45;
  word-break: break-word;
}
.kv-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; margin: 0; }
.kv-edit label { margin: 8px 0; }
.kv-edit .span-2 { grid-column: 1 / -1; }
.range-pair { display: flex; align-items: center; gap: 8px; }
.range-pair input { flex: 1; min-width: 0; }
.range-pair span { color: var(--muted); flex: none; }
.kv-meta { opacity: 1; }
#fieldAdmin { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
#fieldAdmin h3 { margin: 0 0 6px; font-size: 15px; }
.field-admin-fold { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.field-admin-fold > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.field-admin-fold > summary::-webkit-details-marker { display: none; }
.field-admin-fold > summary::before { content: "▸ "; color: var(--muted); }
.field-admin-fold[open] > summary::before { content: "▾ "; }
.field-def-row {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.field-add-row {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  align-items: flex-end; margin: 10px 0 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.field-add-row label { margin: 0; }
.field-def-row select, .field-opts { min-width: 140px; }
.field-admin-fold .field-def-row { align-items: flex-start; }

.insight-board { margin: 0 0 14px; }
.insight-head { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: flex-start; }
.insight-head h2 { margin: 0; }
.insight-portrait {
  font-size: 18px; font-weight: 600; line-height: 1.45;
  margin: 0; color: var(--ink);
  padding: 9px 11px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--input-bg);
}
.insight-nodes-title { margin: 0 0 8px; font-size: 14px; }
.insight-block {
  margin: 12px 0 16px;
  padding: 12px 14px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-2);
}
.insight-block-bar {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  justify-content: space-between; align-items: center;
  margin: 0 0 10px;
}
.insight-block-bar h3 { margin: 0; font-size: 14px; }
.insight-board:not(.is-edit-nodes) .node-acts { display: none !important; }
.insight-grid .insight-block { margin: 0; }
.node-rail {
  height: 6px; border-radius: 99px; background: var(--line);
  overflow: hidden; margin: 4px 8px 14px;
}
.node-rail-fill { height: 100%; width: 0; background: var(--ok); transition: width .2s ease; }
.node-rail-fill.is-stuck { background: var(--warn); }
.node-track {
  display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto;
}
.node-step {
  flex: 1 1 110px; min-width: 110px; text-align: center;
  padding: 8px 6px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper-2);
}
.node-step.is-done { border-color: var(--ok); background: rgba(21, 128, 61, .08); }
.node-step.is-stuck { border-color: var(--warn); background: rgba(180, 83, 9, .1); }
.node-step.is-now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
.node-dot {
  width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 8px;
  background: var(--card); border: 2px solid var(--line-strong);
}
.node-step.is-done .node-dot { background: var(--ok); border-color: var(--ok); }
.node-step.is-stuck .node-dot { background: var(--warn); border-color: var(--warn); }
.node-step.is-now .node-dot { border-color: var(--accent); }
.node-step strong { display: block; font-size: 13px; }
.node-who { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.node-who.warn { color: var(--warn); }
.node-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.insight-grid h3 { margin: 0 0 8px; font-size: 14px; }
.insight-body {
  white-space: pre-wrap; line-height: 1.55;
  margin: 0; padding: 9px 11px; min-height: 72px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--input-bg); color: var(--ink);
}
#portraitEditBox, #painEditBox, #sellEditBox label { display: block; margin: 10px 0; }
@media (max-width: 800px) {
  .insight-grid { grid-template-columns: 1fr; }
}

.contact-panel { margin-top: 14px; }
.contact-fold > summary {
  list-style: none;
  cursor: pointer;
}
.contact-fold > summary::-webkit-details-marker { display: none; }
.contact-fold-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  justify-content: space-between;
}
.contact-fold-bar h2 { margin: 0; }
.contact-one {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}
.contact-one a { font-weight: 500; margin-left: 8px; }
.contact-all { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}
.contact-row.is-primary { border-color: var(--accent); background: var(--accent-soft); }
.contact-row strong { margin-right: 8px; }
.contact-add { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.contact-add h3 { margin: 0 0 6px; font-size: 15px; }
.contact-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 14px;
  margin: 10px 0 12px;
}
@media (max-width: 800px) {
  .contact-add-grid { grid-template-columns: 1fr; }
}
input[type="date"], input[type="datetime-local"] {
  cursor: pointer;
  min-height: 42px;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  width: 18px;
  height: 18px;
}
.when-block { margin: 12px 0; }
.when-title {
  display: block; color: var(--muted); font-size: 12px; letter-spacing: .08em; margin-bottom: 4px;
}
.when-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 110px 110px;
  gap: 10px;
  align-items: end;
}
.when-fields label { margin: 0; }
.when-hint { margin: 6px 0 0; }
#deskApptWrap { grid-column: 1 / -1; }
.timeline { padding-left: 4px; }
.timeline article {
  border-left: 1px solid var(--line-strong); padding: 0 0 18px 16px;
  position: relative;
}
.timeline article::before {
  content: ""; position: absolute; left: -4px; top: 6px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.timeline b { margin-right: 8px; font-family: var(--display); }
.timeline span { color: var(--muted); font-size: 13px; }
.timeline p { margin: 6px 0 0; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--accent-deep); }

#toast {
  position: fixed; right: 28px; bottom: 28px; min-width: 220px;
  background: var(--ink); color: var(--toast-ink); padding: 12px 16px;
  border-radius: 10px; z-index: 50; box-shadow: var(--shadow);
  font-size: 14px;
}
#toast.ok { background: var(--ok); }
#toast.err { background: var(--warn); }

.modal-back, .desk-back {
  position: fixed; inset: 0; background: var(--scrim);
  display: grid; place-items: center; z-index: 40; padding: 24px;
}
.modal, .desk {
  width: min(440px, 100%); background: var(--card);
  border-radius: var(--radius-lg); padding: 26px 28px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  position: relative;
  overflow: hidden;
}
.modal::before, .desk::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.modal-kicker, .desk-kicker {
  display: block; font-size: 11px; letter-spacing: .2em; color: var(--accent);
  margin-bottom: 8px;
}
.modal h3 { margin: 0 0 8px; font-family: var(--display); font-size: 24px; letter-spacing: .04em; }
.modal p { margin: 0 0 16px; color: var(--muted); line-height: 1.65; }
.modal input, .modal textarea { width: 100%; }
.modal textarea { min-height: 88px; resize: vertical; }
.modal .row { justify-content: flex-end; margin: 20px 0 0; }
.add-lead {
  width: min(640px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
}
.add-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.lead-row { cursor: pointer; }
.lead-row.is-picked { background: var(--accent-soft); }
.lead-row a.lead-open { font-weight: 600; }
.due-banner {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--tag-gold-bg, #fff6e5);
  color: var(--gold-ink, #8a5a00);
  font-size: 14px;
  line-height: 1.6;
}
.due-banner a { font-weight: 600; }
.plan-urge {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tag-gold-bg, #fff6e5);
  color: var(--gold-ink, #8a5a00);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.plan-urge[hidden] { display: none !important; }

.desk {
  width: min(640px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  padding: 0;
}
.desk-head { padding: 26px 28px 18px; }
.desk-head-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.desk h3 {
  margin: 0 0 6px; font-family: var(--display); font-size: 28px; letter-spacing: .04em;
}
.desk-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.desk-who {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--kpi-well);
}
.desk-who div { padding: 12px 16px; border-right: 1px solid var(--line); }
.desk-who div:last-child { border-right: 0; }
.desk-who dt { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.desk-who dd { margin: 5px 0 0; font-size: 14px; }
.desk-form { padding: 18px 28px 22px; }
.desk-label {
  font-size: 12px; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px;
}
.stage-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.stage-pick {
  border: 1px solid var(--line-strong); background: var(--lift); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px;
}
.stage-pick:hover { border-color: var(--accent); color: var(--accent-deep); }
.stage-pick.on {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep);
}
.desk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.desk-hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 4px 0 0; }
.desk textarea { min-height: 128px; resize: vertical; line-height: 1.65; }
.desk-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.fb-preview {
  max-width: 36ch; color: var(--ink-soft); line-height: 1.55; font-size: 13.5px;
}

.login-body {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--login-stage-bg);
}
.login-stage {
  position: relative; overflow: hidden; color: var(--login-fg);
  padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-stage::after {
  content: ""; position: absolute; inset: auto -10% -18% -10%; height: 52%;
  background:
    radial-gradient(60% 80% at 20% 80%, var(--login-glow), transparent 55%),
    radial-gradient(50% 70% at 80% 100%, rgba(15, 118, 110, .28), transparent 50%);
  pointer-events: none;
}
.login-kicker { letter-spacing: .32em; font-size: 12px; color: var(--login-kicker); }
.login-stage h1 {
  font-family: var(--display); font-size: 72px; margin: 18px 0 12px;
  letter-spacing: .12em; font-weight: 600;
}
.login-stage .lead { max-width: 28ch; color: var(--login-lead); line-height: 1.8; font-size: 15px; }
.login-loop { display: flex; gap: 0; color: var(--login-loop); font-size: 13px; letter-spacing: .16em; }
.login-loop span + span::before { content: "\00B7"; margin: 0 14px; color: var(--login-dot); }
.login-panel {
  background: var(--paper);
  display: grid; place-items: center;
  padding: 48px 40px;
}
.login-card {
  width: min(400px, 100%);
}
.login-card .theme-switch { margin: 0 0 22px; }
.login-card h2 {
  font-family: var(--display); font-size: 32px; margin: 0 0 8px; letter-spacing: .06em;
}
.login-card .sub { color: var(--muted); margin: 0 0 28px; }
.login-submit { width: 100%; margin-top: 10px; padding: 12px 14px; }
.err {
  color: var(--warn); background: var(--err-bg); border-radius: 8px;
  padding: 8px 10px; font-size: 13px;
}
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 18px; }
.hint code {
  font-family: inherit; background: var(--lift); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px;
}
.mt { margin-top: 16px; }
.staff-note {
  background: var(--funnel-well); border-radius: 10px; padding: 12px 14px;
  color: var(--ink-soft); margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .cards, .funnel, .review-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .kv, .kv-edit, .desk-who, .desk-grid, .when-fields, .add-lead-grid { grid-template-columns: 1fr; }
  .login-body { grid-template-columns: 1fr; }
  .login-stage { min-height: 280px; padding: 36px; }
  .login-stage h1 { font-size: 48px; }
  .desk-who div { border-right: 0; border-bottom: 1px solid var(--line); }
  .coach.done .jump-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .side { position: static; width: auto; }
  .main { margin: 0; padding: 18px; }
  .coach-body { flex-direction: column; align-items: stretch; }
  .coach-track { overflow-x: auto; }
  .topbar { flex-wrap: wrap; }
  .topbar-user { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .coach-spot { animation: none; }
}

html[data-coach="fold"] .coach-body,
html[data-coach="fold"] .lesson {
  display: none;
}
html[data-coach="fold"] .coach {
  gap: 0;
  padding: 10px 14px;
  margin-bottom: 14px;
}
html[data-coach="fold"] .coach-track li::after { margin-top: 6px; }

.tile-home, .assign-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: min(58vh, 520px);
  align-items: stretch;
  transform: scale(1);
  transform-origin: center top;
  transition: transform .42s cubic-bezier(.16, 1, .3, 1), filter .42s ease, opacity .42s ease;
}
.tile-home.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: min(48vh, 420px);
}
.tile-card, .assign-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  width: 100%;
  min-height: 240px;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile-home.cols-4 .tile-card { min-height: 200px; padding: 18px 16px 16px; }
.tile-card:hover, .assign-tile:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
}
.tile-card:active, .assign-tile:active { transform: scale(.96); }
.tile-card:focus-visible, .assign-tile:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}
.tile-card-n, .assign-tile-n {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}
.tile-card h2, .assign-tile h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .04em;
  font-weight: 600;
  color: var(--ink);
}
.tile-home.cols-4 .tile-card h2 { font-size: 17px; }
.tile-card p, .assign-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13.5px;
  flex: 1;
}
.tile-card-go, .assign-tile-go {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.tile-workspace {
  position: relative;
  min-height: min(58vh, 520px);
}
.tile-stage[hidden], .assign-stage[hidden] { display: none !important; }
.tile-stage, .assign-stage {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: grid;
  padding: 0;
}
.tile-stage.tile-stage-main {
  position: fixed;
  inset: 0 0 0 248px;
  z-index: 36;
  padding: 12px 16px 16px;
  background: var(--page-bg);
}
.tile-stage-scrim, .assign-stage-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: default;
}
.tile-sheet, .assign-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
}
.tile-sheet-bar, .assign-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.tile-sheet-bar strong, .assign-sheet-bar strong {
  font-size: 16px;
  letter-spacing: .04em;
}
.tile-sheet-body, .assign-sheet-body {
  overflow: auto;
  padding: 18px 22px 24px;
  flex: 1;
}
.tile-sheet-body .panel, .assign-sheet-body .panel {
  box-shadow: none;
  border: 0;
  padding: 0;
  margin: 0;
}
.tile-sheet-body:has(.sheet-fill) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tile-sheet-body .sheet-fill {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sheet-fill #planList,
.sheet-fill .plan-pools-review {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.tile-open, body.assign-open { overflow: hidden; }
body.tile-open .tile-home,
body.tile-open .assign-home,
body.assign-open .assign-home,
body.assign-open .tile-home {
  transform: scale(.92);
  filter: blur(8px);
  opacity: .45;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .tile-home.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
}
@media (max-width: 980px) {
  .tile-home, .assign-home, .tile-home.cols-4 { grid-template-columns: 1fr; min-height: 0; }
  .tile-card, .assign-tile, .tile-home.cols-4 .tile-card { min-height: 0; }
  .tile-stage, .assign-stage { inset: 0; }
  .tile-stage.tile-stage-main { inset: 0; }
  .tile-sheet, .assign-sheet { height: 100%; }
  .plan-review-board { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-card, .assign-tile, .tile-sheet, .assign-sheet, .tile-home, .assign-home { transition: none !important; }
}

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.portrait-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 220px;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.portrait-card.is-due { border-color: var(--warn); }
.portrait-card.is-done { opacity: .55; }
.portrait-card.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
}
.portrait-card .pick {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  margin: 0;
}
.portrait-card .pick input { width: 18px; height: 18px; }
.portrait-card:has(.pick) { padding-right: 42px; }
.portrait-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .03em;
}
a.portrait-title:hover { color: var(--accent); }
.portrait-name { margin: 0; font-weight: 600; }
.portrait-card p { margin: 0; }
.portrait-tags { color: var(--muted); font-size: 13px; }
.portrait-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.eq-legend { color: var(--muted); margin: 0 0 14px; }
.eq-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: min(64vh, 620px);
}
.eq-cell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.eq-cell.iu { border-color: #c45c4a; background: linear-gradient(180deg, #fff4f1 0%, var(--card) 42%); }
.eq-cell.in { border-color: var(--accent); background: linear-gradient(180deg, #fff8e8 0%, var(--card) 42%); }
.eq-cell.nu { border-color: #4a7aa8; background: linear-gradient(180deg, #eef5fb 0%, var(--card) 42%); }
.eq-cell.nn { border-color: #94a3b8; background: linear-gradient(180deg, #f4f6f8 0%, var(--card) 42%); }
.eq-head em {
  display: inline-block;
  font-style: normal;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}
.eq-head h2 { margin: 4px 0 0; font-size: 22px; }
.eq-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.eq-add { display: flex; gap: 8px; align-items: center; }
.eq-add input { flex: 1; margin: 0; }
.eq-add select { width: 88px; margin: 0; }
.eq-items { flex: 1; min-height: 120px; }
.eq-empty { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.eq-item { min-height: 140px; }
.eq-slot {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--paper-2);
}
.eq-slot.am { background: #fff3c4; color: #7a5a00; }
.eq-slot.pm { background: #dce8ff; color: #1e3a8a; }
.eq-slot-col { margin-top: 10px; }
.eq-slot-col b { display: block; margin-bottom: 8px; font-size: 13px; }
.eq-sheet {
  min-height: 0;
  align-items: start;
  height: auto;
}
.eq-sheet .eq-cell {
  height: auto;
  overflow: visible;
}
.boss-sheet {
  margin: 28px 0 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.send-people { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.modal.send-pick { width: min(560px, 100%); max-height: min(92vh, 720px); overflow: auto; }
.modal.send-pick .send-pick-tools { justify-content: flex-start; margin: 0 0 12px; }
.modal.send-pick .send-people { margin: 0 0 8px; }
.boss-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 12px 0;
  background: var(--page-bg);
}
.boss-nudge {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--accent);
  background: var(--card);
  box-shadow: var(--shadow);
}
.boss-nudge h2 { margin: 0 0 6px; font-size: 18px; }
.boss-nudge .eq-board { min-height: 0; margin-top: 12px; }
.boss-nudge .eq-cell { min-height: 0; }
.boss-nudge .portrait-card { min-height: 0; }
@media (max-width: 980px) {
  .eq-board { grid-template-columns: 1fr; min-height: 0; }
  .portrait-grid, .line-box { grid-template-columns: 1fr; }
}
