/* ═══════════════════════════════════════════════════════════════════════════
   LeapContent Cloud · Architectural Magazine Ops Cockpit
   Dual signature themes matching local Gate-1 picker-ui.css:
     data-theme="dark"  → 曜石 Obsidian Studio (#08080a / #141418 / #d6bd8c)
     data-theme="light" → 纸刊 Editorial Paper (#f6f5f0 / #ffffff / #047857)
   100% offline/self-hosted: zero external CDN, webfont, or remote asset URLs.
   ═══════════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --top-h: 52px;
  --sans: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, "Noto Sans SC", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Theme A · 曜石 Obsidian Studio ─────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;
  --void: #08080a;
  --rail: #0b0b0e;
  --top: rgba(11, 11, 14, 0.92);
  --stage-bg: radial-gradient(90% 55% at 50% 0%, rgba(214, 189, 140, 0.045), transparent 70%), #08080a;
  --grid-line: rgba(255, 255, 255, 0.018);

  --sheet-bg: linear-gradient(180deg, #141418 0%, #121216 42%, #0f0f13 100%);
  --sheet-alt: #101014;
  --sheet-border-top: 0 solid transparent;
  --sheet-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 24px 56px -34px rgba(0, 0, 0, 0.88);
  --card-bg: linear-gradient(180deg, #16161b 0%, #121216 100%);
  --card-hover: linear-gradient(180deg, #1a1a20 0%, #15151a 100%);

  --hair: rgba(255, 255, 255, 0.07);
  --hair-2: rgba(255, 255, 255, 0.11);
  --hair-3: rgba(255, 255, 255, 0.18);
  --hover: rgba(255, 255, 255, 0.04);

  --ink: #f5f5f7;
  --ink-2: #d2d2d7;
  --ink-3: #a3a3ab;
  --ink-4: #868690;
  --ink-5: #5e5e66;
  --read: #e4e4ea;

  --accent: #d6bd8c;
  --accent-hi: #f1e2c0;
  --accent-lo: #9a8459;
  --accent-soft: rgba(214, 189, 140, 0.12);
  --accent-border: rgba(214, 189, 140, 0.34);

  --pos: #6cc5a3;
  --pos-soft: rgba(108, 197, 163, 0.12);
  --pos-border: rgba(108, 197, 163, 0.34);

  --warn: #e9b468;
  --warn-soft: rgba(233, 180, 104, 0.12);
  --warn-border: rgba(233, 180, 104, 0.34);

  --neg: #ef6b73;
  --neg-ink: #ffb4b9;
  --neg-soft: rgba(239, 107, 115, 0.11);
  --neg-border: rgba(239, 107, 115, 0.35);

  --info: #8ec5e8;
  --info-soft: rgba(142, 197, 232, 0.11);
  --info-border: rgba(142, 197, 232, 0.32);

  --headline-font: var(--sans);
  --headline-weight: 650;
  --r-sheet: 14px;
  --r: 10px;
  --r-sm: 7px;

  --seg-bg: rgba(0, 0, 0, 0.34);
  --seg-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.055);
  --thumb-bg: linear-gradient(180deg, #2b2b32 0%, #222228 100%);
  --thumb-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 1px 3px rgba(0, 0, 0, 0.5);

  --input-bg: rgba(0, 0, 0, 0.34);
  --input-border: rgba(255, 255, 255, 0.09);
  --focus-border: rgba(214, 189, 140, 0.55);
  --focus-ring: 0 0 0 3px rgba(214, 189, 140, 0.14);

  --ghost-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.04) 100%);
  --ghost-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.065) 100%);
  --ghost-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), inset 0 0 0 1px rgba(255, 255, 255, 0.08);

  --primary-bg: linear-gradient(180deg, #f4e7c9 0%, #e1c999 48%, #cdb07a 100%);
  --primary-bg-hover: linear-gradient(180deg, #f8eed8 0%, #e7d1a4 48%, #d4b984 100%);
  --primary-ink: #1e180d;
  --primary-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 22px -10px rgba(214, 189, 140, 0.48);

  --chip-bg: rgba(255, 255, 255, 0.045);
  --chip-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.075);
  --glass-bg: linear-gradient(180deg, rgba(24, 24, 29, 0.96) 0%, rgba(15, 15, 19, 0.98) 100%);
  --scrim: rgba(4, 4, 6, 0.72);
  --scroll-thumb: rgba(255, 255, 255, 0.12);
  --selection: rgba(214, 189, 140, 0.28);
}

/* ── Theme B · 纸刊 Editorial Paper ─────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --void: #f6f5f0;
  --rail: #f1f0e9;
  --top: rgba(241, 240, 233, 0.95);
  --stage-bg:
    radial-gradient(ellipse 80% 55% at 50% 8%, rgba(5, 150, 105, 0.055), transparent 70%),
    radial-gradient(ellipse 55% 45% at 88% 92%, rgba(180, 105, 14, 0.045), transparent 70%),
    #f6f5f0;
  --grid-line: rgba(17, 20, 24, 0.032);

  --sheet-bg: linear-gradient(180deg, #ffffff 0%, #ffffff 65%, #fdfcf9 100%);
  --sheet-alt: #faf9f5;
  --sheet-border-top: 2px solid #059669;
  --sheet-shadow: 0 0 0 1px rgba(17, 20, 24, 0.1), 0 2px 6px rgba(17, 20, 24, 0.04), 0 24px 50px -30px rgba(17, 20, 24, 0.2);
  --card-bg: #ffffff;
  --card-hover: #fdfcf9;

  --hair: rgba(17, 20, 24, 0.09);
  --hair-2: rgba(17, 20, 24, 0.14);
  --hair-3: rgba(17, 20, 24, 0.24);
  --hover: rgba(17, 20, 24, 0.035);

  --ink: #111418;
  --ink-2: #3d4550;
  --ink-3: #59616d;
  --ink-4: #767f8c;
  --ink-5: #9da4ae;
  --read: #232830;

  --accent: #047857;
  --accent-hi: #059669;
  --accent-lo: #065f46;
  --accent-soft: rgba(5, 150, 105, 0.085);
  --accent-border: rgba(5, 150, 105, 0.3);

  --pos: #047857;
  --pos-soft: rgba(5, 150, 105, 0.08);
  --pos-border: rgba(5, 150, 105, 0.28);

  --warn: #b4690e;
  --warn-soft: rgba(180, 105, 14, 0.09);
  --warn-border: rgba(180, 105, 14, 0.3);

  --neg: #c62828;
  --neg-ink: #9f1b1b;
  --neg-soft: rgba(220, 38, 38, 0.07);
  --neg-border: rgba(220, 38, 38, 0.28);

  --info: #1d5fa7;
  --info-soft: rgba(29, 95, 167, 0.08);
  --info-border: rgba(29, 95, 167, 0.26);

  --headline-font: var(--serif);
  --headline-weight: 800;
  --r-sheet: 5px;
  --r: 4px;
  --r-sm: 3px;

  --seg-bg: #e9e7df;
  --seg-shadow: inset 0 1px 2px rgba(17, 20, 24, 0.08), inset 0 0 0 1px rgba(17, 20, 24, 0.06);
  --thumb-bg: #ffffff;
  --thumb-shadow: 0 0 0 1px rgba(17, 20, 24, 0.1), 0 1px 3px rgba(17, 20, 24, 0.12);

  --input-bg: #f6f5f0;
  --input-border: rgba(17, 20, 24, 0.15);
  --focus-border: #059669;
  --focus-ring: 0 0 0 3px rgba(5, 150, 105, 0.14);

  --ghost-bg: #ffffff;
  --ghost-bg-hover: #faf9f5;
  --ghost-shadow: 0 0 0 1px rgba(17, 20, 24, 0.15), 0 1px 0 rgba(17, 20, 24, 0.04);

  --primary-bg: #111418;
  --primary-bg-hover: #047857;
  --primary-ink: #ffffff;
  --primary-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -10px rgba(17, 20, 24, 0.5);

  --chip-bg: #f6f5f0;
  --chip-shadow: inset 0 0 0 1px rgba(17, 20, 24, 0.11);
  --glass-bg: rgba(255, 255, 255, 0.97);
  --scrim: rgba(17, 20, 24, 0.42);
  --scroll-thumb: rgba(17, 20, 24, 0.16);
  --selection: rgba(5, 150, 105, 0.18);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html,
body {
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--selection);
}

:focus-visible {
  outline: 2px solid var(--focus-border);
  outline-offset: 2px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
}

.lc-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

/* ── Boot Screen ─────────────────────────────────────────────────────────── */
.lc-boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--stage-bg);
}

.lc-boot-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.lc-boot-mark svg {
  width: 24px;
  height: 24px;
}

.lc-boot-label {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* ── Shell & Top Navigation ──────────────────────────────────────────────── */
.lc-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--top-h) minmax(0, 1fr);
  background-color: var(--void);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--stage-bg);
  background-size: 48px 48px, 48px 48px, 100% 100%;
}

.lc-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--top);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

.lc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lc-emblem {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
  flex: none;
}

.lc-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.lc-wordmark b {
  font: 700 11.5px/1 var(--mono);
  letter-spacing: 0.16em;
  color: var(--ink);
  white-space: nowrap;
}

.lc-wordmark span {
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
}

.lc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.lc-nav::-webkit-scrollbar {
  display: none;
}

.lc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.lc-nav-btn:hover {
  color: var(--ink);
  background: var(--hover);
}

.lc-nav-btn.is-active {
  color: var(--ink);
  background: var(--thumb-bg);
  box-shadow: var(--thumb-shadow);
}

.lc-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font: 600 11px/1 var(--mono);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.lc-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lc-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--chip-bg);
  box-shadow: var(--chip-shadow);
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.lc-role-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font: 600 10.5px/1.1 var(--mono);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.lc-role-tag.is-editor {
  background: var(--pos-soft);
  color: var(--pos);
  border-color: var(--pos-border);
}

/* ── Buttons, Inputs, Badges & Segmented Controls ────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 120ms ease, background 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary-bg);
  color: var(--primary-ink);
  box-shadow: var(--primary-shadow);
}

.btn-primary:not(:disabled):hover {
  background: var(--primary-bg-hover);
}

.btn-ghost {
  background: var(--ghost-bg);
  color: var(--ink-2);
  box-shadow: var(--ghost-shadow);
}

.btn-ghost:not(:disabled):hover {
  background: var(--ghost-bg-hover);
  color: var(--ink);
}

.btn-danger {
  background: var(--neg-soft);
  color: var(--neg-ink);
  box-shadow: inset 0 0 0 1px var(--neg-border);
}

.btn-danger:not(:disabled):hover {
  filter: brightness(1.08);
}

.btn-success {
  background: var(--pos-soft);
  color: var(--pos);
  box-shadow: inset 0 0 0 1px var(--pos-border);
}

.btn-sm {
  height: 27px;
  padding: 0 9px;
  font-size: 12px;
}

.btn-lg {
  height: 40px;
  padding: 0 18px;
  font-size: 13.5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font: 500 11.5px/1 var(--sans);
  white-space: nowrap;
  background: var(--chip-bg);
  color: var(--ink-2);
  box-shadow: var(--chip-shadow);
}

.pill-accent {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.pill-pos {
  color: var(--pos);
  background: var(--pos-soft);
  box-shadow: inset 0 0 0 1px var(--pos-border);
}

.pill-warn {
  color: var(--warn);
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px var(--warn-border);
}

.pill-neg {
  color: var(--neg-ink);
  background: var(--neg-soft);
  box-shadow: inset 0 0 0 1px var(--neg-border);
}

.pill-info {
  color: var(--info);
  background: var(--info-soft);
  box-shadow: inset 0 0 0 1px var(--info-border);
}

.seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r);
  background: var(--seg-bg);
  box-shadow: var(--seg-shadow);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: calc(var(--r) - 3px);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn.is-active {
  color: var(--ink);
  background: var(--thumb-bg);
  box-shadow: var(--thumb-shadow);
}

.input,
.textarea,
.select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}

.textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

/* ── Main Container & Editorial Sheets ───────────────────────────────────── */
.lc-main {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 18px 20px 36px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--headline-font);
  font-size: 22px;
  font-weight: var(--headline-weight);
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}

.page-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-4);
}

.sheet {
  background: var(--sheet-bg);
  border-top: var(--sheet-border-top);
  border-radius: var(--r-sheet);
  box-shadow: var(--sheet-shadow);
  padding: 18px 20px;
  min-width: 0;
}

.section-kicker {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ── Login View ──────────────────────────────────────────────────────────── */
.login-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--void);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--stage-bg);
  background-size: 48px 48px, 48px 48px, 100% 100%;
}

.login-top {
  height: var(--top-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hair);
}

.login-center {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 30px 28px 26px;
}

.login-heading {
  font-family: var(--headline-font);
  font-size: 24px;
  font-weight: var(--headline-weight);
  line-height: 1.28;
  margin-bottom: 8px;
}

.login-desc {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 20px;
  line-height: 1.65;
}

.login-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.login-pillar {
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--sheet-alt);
  border: 1px solid var(--hair);
}

.login-pillar b {
  display: block;
  font: 600 11.5px/1.2 var(--mono);
  color: var(--accent);
  margin-bottom: 3px;
}

.login-pillar span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.dev-login-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}

.dev-login-box summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-4);
  user-select: none;
}

.dev-login-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Task Pool View ──────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-card {
  background: var(--card-bg);
  border-top: var(--sheet-border-top);
  border-radius: var(--r-sheet);
  box-shadow: var(--sheet-shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: background 160ms ease, transform 160ms ease;
}

.task-card:hover {
  background: var(--card-hover);
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.task-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-title {
  font-family: var(--headline-font);
  font-size: 16.5px;
  font-weight: var(--headline-weight);
  line-height: 1.38;
  color: var(--ink);
  word-break: break-word;
}

.task-topic {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brief-strip {
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 12.5px;
  color: var(--read);
  line-height: 1.5;
}

.brief-strip-label {
  display: block;
  font: 600 11px/1.2 var(--mono);
  color: var(--accent);
  margin-bottom: 3px;
}

.admin-note-box {
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--warn-border);
  background: var(--warn-soft);
  font-size: 12px;
  color: var(--read);
}

.admin-note-box .brief-strip-label {
  color: var(--warn);
}

.task-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Radar & Competitor 2-Column Split ───────────────────────────────────── */
.split-radar {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.queue-panel {
  background: var(--sheet-bg);
  border-radius: var(--r-sheet);
  box-shadow: var(--sheet-shadow);
  overflow: hidden;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}

.queue-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  width: 100%;
  text-align: left;
  padding: 10px 11px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease;
}

.queue-item:hover {
  background: var(--hover);
}

.queue-item.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.queue-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.queue-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reader-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reader-rule-box {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--sheet-alt);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.reader-rule-box.is-pos {
  border-left-color: var(--pos);
}

.reader-rule-box h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}

.reader-rule-box.is-pos h4 {
  color: var(--pos);
}

.reader-rule-box p {
  font-size: 13.5px;
  color: var(--read);
  line-height: 1.65;
}

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bullet-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  color: var(--read);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.action-drawer {
  padding: 16px;
  border-radius: var(--r);
  background: var(--sheet-alt);
  border: 1px solid var(--hair-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Workbench View ──────────────────────────────────────────────────────── */
.review-alert {
  margin-bottom: 14px;
  padding: 13px 16px;
  border-radius: var(--r);
  background: var(--neg-soft);
  border: 1px solid var(--neg-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--neg-ink);
}

.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 16px;
  align-items: start;
}

.wb-grid.has-l1 {
  grid-template-columns: 290px minmax(0, 1fr) 355px;
}

.editor-textarea {
  width: 100%;
  min-height: 520px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.72;
  resize: vertical;
}

.editor-textarea:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}

.l1-item {
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hair);
  background: var(--sheet-alt);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--sheet-alt);
  border: 1px solid var(--hair);
}

.score-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
}

.score-track {
  height: 6px;
  border-radius: 999px;
  background: var(--hair-2);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.score-fill.is-high {
  background: var(--pos);
}

.score-fill.is-low {
  background: var(--neg);
}

.issue-card {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hair-2);
  background: var(--sheet-alt);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
}

.issue-card.is-p0 {
  border-color: var(--neg-border);
  background: var(--neg-soft);
}

.issue-card.is-p1 {
  border-color: var(--warn-border);
  background: var(--warn-soft);
}

.issue-excerpt {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--ink-2);
  word-break: break-all;
}

[data-theme="light"] .issue-excerpt {
  background: rgba(17, 20, 24, 0.05);
}

/* ── Delivery & Card Studio ──────────────────────────────────────────────── */
.preview-frame {
  width: 100%;
  height: 540px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-sm);
  background: #ffffff;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.channel-card {
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: var(--sheet-alt);
  border: 1px solid var(--hair-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.62;
  color: var(--read);
}

.code-block {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--input-bg);
  border: 1px solid var(--hair-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Tables (Tokens, Users, Fact Gaps, Audit Logs) ───────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.lc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.lc-table th,
.lc-table td {
  text-align: left;
  padding: 10px 11px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}

.lc-table th {
  font: 600 11px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

.lc-table tr:hover td {
  background: var(--hover);
}

/* ── Modals & Toasts ─────────────────────────────────────────────────────── */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--glass-bg);
  border-top: var(--sheet-border-top);
  border-radius: var(--r-sheet);
  box-shadow: var(--sheet-shadow);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-family: var(--headline-font);
  font-size: 18px;
  font-weight: var(--headline-weight);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
}

.token-reveal-box {
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lc-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.lc-toast {
  pointer-events: auto;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--glass-bg);
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--sheet-shadow);
  border-left: 3px solid var(--accent);
}

.lc-toast.is-error {
  border-left-color: var(--neg);
}

.lc-toast.is-success {
  border-left-color: var(--pos);
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--ink-4);
  font-size: 13px;
}

.row-gap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.col-gap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* ── Responsive (1200px clean, <= 1040px graceful stack) ─────────────────── */
@media (max-width: 1240px) {
  .wb-grid.has-l1 {
    grid-template-columns: 250px minmax(0, 1fr) 320px;
  }
  .lc-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .lc-nav-btn {
    padding: 0 9px;
    font-size: 12.5px;
  }
}

@media (max-width: 1040px) {
  .task-grid,
  .split-radar,
  .wb-grid,
  .wb-grid.has-l1,
  .channel-grid,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .queue-panel {
    max-height: 360px;
  }
  .lc-wordmark span {
    display: none;
  }
}
