/* Raptool Release Center - staff app. Deep forest green + warm clay on paper white. */
:root {
  --forest-900: #17392a; --forest-700: #1f4d3a; --forest-500: #2f7457; --forest-300: #6fb08e; --forest-100: #dcebe2;
  --clay-700: #8f4724; --clay-600: #a4552f; --clay-500: #bf6a41; --clay-300: #e6a987; --clay-100: #f8e6db;
  --paper: #fbf8f1; --paper-2: #f3eee2; --card: #ffffff; --ink: #1c2520; --muted: #5f6d65; --line: #e3dccb; --line-2: #d3cab4;
  --accent: var(--forest-700); --accent-ink: #ffffff; --link: #1f6b4c;
  --s-planning: #66788f; --s-building: #2f7457; --s-waiting: #bf6a41; --s-testing: #a67c12; --s-ready: #247f84; --s-published: #1f4d3a; --s-paused: #8a8f98; --s-cancelled: #9b4a4a; --s-unknown: #9aa39d;
  --m-fable: #1f4d3a; --m-opus: #bf6a41; --m-sonnet: #4f86b0; --m-haiku: #d9a441; --m-other: #8a8f98;
  --ok: #2f7457; --warn: #a67c12; --bad: #b04a3a;
  --radius: 12px; --shadow: 0 1px 2px rgba(23,57,42,.06), 0 6px 18px rgba(23,57,42,.07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0e1713; --paper-2: #14211b; --card: #18261f; --ink: #e7efe9; --muted: #98a89f; --line: #263a30; --line-2: #33493d; --accent: #6fb28f; --accent-ink: #0b1a13; --link: #8fd0ad;
    --forest-100: #1f3328; --clay-100: #3a2a20; --s-planning: #8da0b8; --s-building: #5fb38c; --s-waiting: #e0916a; --s-testing: #d6ad3d; --s-ready: #4fb6bb; --s-published: #8fd0ad;
    --m-fable: #5fb38c; --m-opus: #e0916a; --m-sonnet: #7fb0d6; --m-haiku: #e6bd5c; --m-other: #a0a6ae; --ok: #6fb28f; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #0e1713; --paper-2: #14211b; --card: #18261f; --ink: #e7efe9; --muted: #98a89f; --line: #263a30; --line-2: #33493d; --accent: #6fb28f; --accent-ink: #0b1a13; --link: #8fd0ad;
  --forest-100: #1f3328; --clay-100: #3a2a20; --s-planning: #8da0b8; --s-building: #5fb38c; --s-waiting: #e0916a; --s-testing: #d6ad3d; --s-ready: #4fb6bb; --s-published: #8fd0ad;
  --m-fable: #5fb38c; --m-opus: #e0916a; --m-sonnet: #7fb0d6; --m-haiku: #e6bd5c; --m-other: #a0a6ae; --ok: #6fb28f; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); min-height: 100vh; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--link); }
small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .88em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--clay-500) 70%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--forest-900); color: #e9f1ec; padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; text-decoration: none; color: #fff; }
.side .brand img { width: 34px; height: 34px; }
.side .brand b { font-family: var(--serif); font-size: 1.12rem; display: block; line-height: 1.1; }
.side .brand span { font-size: .72rem; opacity: .7; letter-spacing: .08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #d6e5dc; text-decoration: none; min-height: 44px; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.on { background: #fbf8f1; color: var(--forest-900); font-weight: 600; }
.nav .ico { width: 20px; height: 20px; display: inline-flex; opacity: .9; }
.side .btn svg { vertical-align: -4px; margin-right: 4px; }
.nav .count { margin-left: auto; background: var(--clay-500); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; font-weight: 700; }
.side .grow { flex: 1; }
.side .me { font-size: .82rem; padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.14); }
.side .me button { background: none; border: 0; color: #cfe0d6; cursor: pointer; padding: 6px 0; text-decoration: underline; min-height: 36px; }
.main { padding: 22px clamp(14px, 3vw, 34px) 60px; min-width: 0; }
.topbar { display: none; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.pagehead p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.vertag { position: fixed; right: 8px; bottom: 5px; font-size: 10px; color: var(--muted); opacity: .75; pointer-events: none; z-index: 5; font-variant-numeric: tabular-nums; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.clay { background: var(--clay-500); border-color: var(--clay-500); color: #fff; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-size: 1.1rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; font-size: 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .lbl { font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.field .hint { font-size: .8rem; color: var(--muted); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: 0 14px; min-height: 42px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- cards, tiles ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card > h2, .card > h3 { margin-bottom: 10px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); margin-bottom: 16px; }
.tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 76px; box-shadow: var(--shadow); position: relative; }
.tile:hover { border-color: var(--accent); }
.tile .n { font-family: var(--serif); font-size: 1.9rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile .l { font-size: .82rem; color: var(--muted); font-weight: 600; }
.tile.on { outline: 3px solid var(--accent); outline-offset: -1px; }
.tile::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tc, var(--line-2)); }
.tile.clay { background: var(--clay-100); border-color: var(--clay-300); --tc: var(--clay-500); }
.tile.clay .n { color: var(--clay-600); }
:root[data-theme="dark"] .tile.clay .n { color: var(--clay-300); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bc, var(--muted)) 16%, transparent); color: var(--bc, var(--muted)); border: 1px solid color-mix(in srgb, var(--bc, var(--muted)) 35%, transparent); white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bc, var(--muted)); }
.badge.plain::before { display: none; }
.b-planning { --bc: var(--s-planning); } .b-building { --bc: var(--s-building); } .b-waiting { --bc: var(--s-waiting); } .b-testing { --bc: var(--s-testing); }
.b-ready { --bc: var(--s-ready); } .b-published { --bc: var(--s-published); } .b-paused { --bc: var(--s-paused); } .b-cancelled { --bc: var(--s-cancelled); } .b-unknown { --bc: var(--s-unknown); }
.b-draft { --bc: var(--s-paused); } .b-approved { --bc: var(--s-testing); } .b-customer { --bc: var(--forest-500); } .b-internal { --bc: var(--s-planning); } .b-flag { --bc: var(--clay-500); } .b-ok { --bc: var(--ok); } .b-bad { --bc: var(--bad); }
.progress { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--s-building); border-radius: 999px; }
.progress.waiting > i { background: var(--s-waiting); }

/* ---------- kanban ---------- */
.board-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; color: var(--muted); font-size: .85rem; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.kanban { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: minmax(205px, 1fr); overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kanban.few { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; }
.col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col > header { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; font-weight: 700; text-transform: capitalize; }
.col > header .badge { margin-left: auto; }
.col .empty { color: var(--muted); font-size: .85rem; padding: 10px 6px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--kc, var(--line-2)); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; display: block; width: 100%; text-align: left; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--accent); border-left-color: var(--kc); }
.kcard .t { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kcard .t small { font-weight: 600; }
.kcard .step { font-size: .85rem; margin: 4px 0 8px; color: var(--ink); overflow-wrap: anywhere; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .75rem; color: var(--muted); margin-top: 8px; }
.kcard .wait { margin: 6px 0; padding: 5px 8px; border-radius: 8px; font-size: .82rem; background: var(--paper-2); }
.kcard.you { background: var(--clay-100); border-color: var(--clay-300); --kc: var(--clay-500); }
.kcard.you .wait { background: var(--clay-500); color: #fff; font-weight: 700; }
.kcard .stale { color: var(--bad); }

/* ---------- tables ---------- */
.tbl-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-width: 100%; }
.tbl-scroll { overflow: auto; max-width: 100%; max-height: 70vh; }
table.dt { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%; font-size: .9rem; }
table.dt th, table.dt td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
table.dt thead th { position: sticky; top: 0; background: var(--paper-2); z-index: 2; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); user-select: none; }
table.dt thead tr.filters th { top: 38px; background: var(--card); padding: 4px 6px; z-index: 1; text-transform: none; }
table.dt .h { display: flex; align-items: center; gap: 4px; cursor: pointer; min-height: 22px; }
table.dt .h .arrow { opacity: .35; font-size: .7rem; }
table.dt th[aria-sort="ascending"] .arrow, table.dt th[aria-sort="descending"] .arrow { opacity: 1; color: var(--accent); }
table.dt .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
table.dt .rs:hover, table.dt .rs.on { background: color-mix(in srgb, var(--accent) 40%, transparent); }
table.dt thead th { position: sticky; }
table.dt tbody tr { cursor: default; }
table.dt tbody tr.click { cursor: pointer; }
table.dt tbody tr:hover td { background: color-mix(in srgb, var(--forest-100) 60%, transparent); }
table.dt td.num, table.dt th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dt .fin { min-height: 32px; padding: 3px 8px; font-size: 14px; border-radius: 8px; }
table.dt tbody td.wrap { white-space: normal; }
.tbl-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.tbl-foot button { background: none; border: 0; color: var(--link); cursor: pointer; text-decoration: underline; min-height: 32px; }
.ctx { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; max-height: 70vh; overflow: auto; }
.ctx h4 { margin: 6px 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ctx label { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.ctx label:hover { background: var(--paper-2); }
.ctx input { width: 18px; height: 18px; accent-color: var(--accent); }
.ctx button { width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.ctx button:hover { background: var(--paper-2); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- tabs, modal, toast ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.tabs button { background: none; border: 0; padding: 0 16px; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--clay-500); }
.modal-back { position: fixed; inset: 0; background: rgba(10,20,15,.55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; z-index: 50; overflow: auto; }
.modal { background: var(--card); border-radius: 14px; width: min(640px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid var(--line); }
.modal.wide { width: min(980px, 100%); }
.modal > header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal > .body { padding: 18px; }
.modal > footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; width: min(92vw, 460px); }
.toast { background: var(--forest-900); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--forest-700); }
.banner { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--clay-300); background: var(--clay-100); margin-bottom: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.info { border-color: var(--line-2); background: var(--paper-2); }
.banner .grow { flex: 1; min-width: 200px; }
.empty-state { text-align: center; padding: 36px 14px; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.copybox { display: flex; gap: 8px; align-items: stretch; } .copybox code { flex: 1; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; user-select: all; }
pre.snippet { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-family: var(--mono); font-size: .82rem; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 16px 18px; }
.tl li::before { content: ""; position: absolute; left: -27px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--tc, var(--muted)); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.tl .when { font-size: .78rem; color: var(--muted); } .tl .txt { overflow-wrap: anywhere; }
.tl li[data-type=publish] { --tc: var(--forest-700); } .tl li[data-type=status] { --tc: var(--forest-500); } .tl li[data-type=notes] { --tc: var(--s-testing); } .tl li[data-type=approval] { --tc: var(--clay-500); }
.tl li[data-type=token] { --tc: var(--m-sonnet); } .tl li[data-type=document] { --tc: var(--s-ready); } .tl li[data-type=manual] { --tc: var(--s-planning); } .tl li[data-type=sync] { --tc: var(--s-paused); }

/* ---------- editor ---------- */
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stepper .st { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 700; font-size: .85rem; color: var(--muted); background: var(--card); }
.stepper .st.done { background: var(--forest-100); color: var(--forest-700); border-color: var(--forest-300); }
:root[data-theme="dark"] .stepper .st.done { color: var(--forest-300); }
.stepper .st.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stepper .arrow { color: var(--muted); }
.editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editor .pane { min-width: 0; }
.mdbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.mdbar button { min-width: 38px; min-height: 36px; border: 1px solid var(--line-2); background: var(--card); border-radius: 8px; cursor: pointer; font-weight: 700; }
.editor textarea { min-height: 280px; font-family: var(--mono); font-size: 14px; }
.preview { border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px 16px; min-height: 280px; background: var(--card); overflow: auto; max-height: 60vh; }
.notes h3, .preview h3 { font-size: 1rem; margin: 14px 0 6px; } .notes ul, .preview ul, .notes ol, .preview ol { padding-left: 1.3rem; margin: .3em 0; }
.preview .sec-internal { background: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in srgb, var(--clay-500) 10%, transparent) 8px 16px); padding: 4px 10px; border-radius: 8px; }
.preview img { max-width: 100%; } .preview pre { background: var(--paper-2); padding: 10px; border-radius: 8px; overflow: auto; } .preview table { border-collapse: collapse; } .preview th, .preview td { border: 1px solid var(--line); padding: 4px 8px; }
.diff { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 55vh; background: var(--card); }
.diff div { padding: 1px 10px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.4em; }
.diff .add { background: color-mix(in srgb, var(--ok) 20%, transparent); } .diff .del { background: color-mix(in srgb, var(--bad) 18%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.dz { border: 2px dashed var(--line-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.dz.over { border-color: var(--accent); background: var(--forest-100); }
.doclist { list-style: none; margin: 12px 0 0; padding: 0; }
.doclist li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.doclist .nm { font-weight: 600; overflow-wrap: anywhere; } .doclist .sub { font-size: .78rem; color: var(--muted); }
.doclist .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tokgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }

/* ---------- charts ---------- */
.chart { width: 100%; overflow: hidden; } .chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); } .chart .lbl-strong { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart rect.seg:hover { opacity: .85; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; margin: 6px 0 2px; } .legend span { display: inline-flex; align-items: center; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--forest-900); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .8rem; box-shadow: var(--shadow); max-width: 260px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, var(--forest-100), transparent), var(--paper); }
.auth .card { width: min(420px, 100%); padding: 28px 24px; }
.auth .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth .brand img { width: 44px; height: 44px; } .auth h1 { font-size: 1.4rem; }
.auth .err { color: var(--bad); font-weight: 600; margin: 8px 0; } .auth .okmsg { color: var(--ok); font-weight: 600; margin: 8px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-102%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--forest-900); color: #fff; padding: 8px 12px; }
  .topbar b { font-family: var(--serif); } .topbar .icon-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .kanban, .kanban.few { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .kanban .col.is-empty { display: none; }
  h1 { font-size: 1.4rem; }
  .doclist li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .side, .topbar, .vertag, .actions, .tabs { display: none !important; } .app { display: block; } body { background: #fff; color: #000; } }
