/* VoiceMento MAM — deep green + gold, Bricolage Grotesque / Inter */
:root {
  color-scheme: dark;
  --bg: #06110f;
  --surface: #0b1916;
  --surface-2: #0f211d;
  --surface-3: #142b26;
  --line: rgba(214, 234, 226, 0.08);
  --line-2: rgba(214, 234, 226, 0.15);
  --text: #e8efeb;
  --text-2: #a9bbb3;
  --text-3: #71867e;
  --gold: #c5a14e;
  --gold-2: #e0c179;
  --gold-soft: rgba(197, 161, 78, 0.13);
  --green: #4cc38a;
  --green-soft: rgba(76, 195, 138, 0.13);
  --blue: #6ba9ea;
  --blue-soft: rgba(107, 169, 234, 0.13);
  --amber: #e5a74c;
  --amber-soft: rgba(229, 167, 76, 0.13);
  --red: #ef6d64;
  --red-soft: rgba(239, 109, 100, 0.13);
  --violet: #a993f5;
  --slate: #8fa49c;
  --slate-soft: rgba(143, 164, 156, 0.13);
  --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 90% -12%, rgba(197, 161, 78, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(21, 69, 64, 0.35), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
svg { width: 16px; height: 16px; flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.page-head .sub a svg, .kv a svg { width: 14px; height: 14px; vertical-align: -2px; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; font-weight: 700; }
h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
::selection { background: var(--gold-soft); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #22352f; border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px; border-right: 1px solid var(--line); background: rgba(3, 10, 9, 0.45); backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, #154540, #0b3632); border: 1px solid rgba(197, 161, 78, 0.45); color: var(--gold-2);
}
.brand b { display: block; font-family: var(--display); font-size: 16px; letter-spacing: -0.02em; }
.brand small { display: block; color: var(--text-3); font-size: 11.5px; margin-top: -2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); font-weight: 500;
}
.nav a svg { width: 17px; height: 17px; opacity: 0.85; }
.nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav a.on { background: var(--gold-soft); color: var(--gold-2); }
.nav .count { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-weight: 600; }
.nav .count.soft { background: var(--amber-soft); color: var(--amber); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; font-size: 12px; color: var(--text-3); }
.scan-state { display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); flex: none; }
.pulse.err { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.pulse.busy { background: var(--gold); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.linkbtn { background: none; border: 0; color: var(--text-3); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--text); }

.main { min-width: 0; padding: 18px 28px 60px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input, .search input[type='search'] { width: 100%; padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- controls ---------- */
.btn, .btn-ghost, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; padding: 8px 13px;
  font: 600 13px/1.2 var(--font); cursor: pointer; white-space: nowrap; border: 1px solid transparent; transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1c1606; box-shadow: 0 2px 10px rgba(197, 161, 78, 0.25); }
.btn:hover { filter: brightness(1.07); color: #1c1606; }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.btn-quiet { background: none; color: var(--text-2); padding: 6px 9px; font-weight: 500; }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.btn-danger { color: var(--red); }
.btn svg, .btn-ghost svg, .btn-quiet svg { width: 15px; height: 15px; }
.btn.sm, .btn-ghost.sm, .btn-quiet.sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.is-busy svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

input[type='text'], input[type='search'], input[type='password'], input[type='date'], input[type='email'], input[type='tel'], input[type='number'], input[type='url'], select, textarea {
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 8px 11px; font: 14px var(--font); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(197, 161, 78, 0.6); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { width: 100%; resize: vertical; min-height: 90px; line-height: 1.5; }
select { padding-right: 28px; }
input[type='checkbox'] { accent-color: var(--gold); width: 15px; height: 15px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
label.field > span small { font-weight: 400; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }

/* ---------- layout pieces ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--text-2); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.crumbs { color: var(--text-3); font-size: 12.5px; margin-bottom: 8px; }
.crumbs a:hover { color: var(--text); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 15.5px; }
.card-head .meta { color: var(--text-3); font-size: 12px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 14px 16px 0; }
.empty { color: var(--text-3); padding: 22px 8px; text-align: center; font-size: 13px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; display: block; }
a.stat:hover { border-color: var(--line-2); color: inherit; }
.stat .k { color: var(--text-3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--text-3); font-size: 12px; margin-top: 1px; }
.stat.alert .v { color: var(--red); }
.stat.good .v { color: var(--gold-2); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: var(--slate-soft); color: var(--slate); white-space: nowrap; line-height: 1.5;
}
.chip svg { width: 12px; height: 12px; }
.chip.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-intake { background: var(--slate-soft); color: var(--slate); }
.st-media { background: var(--blue-soft); color: var(--blue); }
.st-editing { background: var(--amber-soft); color: var(--amber); }
.st-ready { background: var(--gold-soft); color: var(--gold-2); }
.st-delivered { background: var(--green-soft); color: var(--green); }
.st-archived { background: rgba(255, 255, 255, 0.05); color: var(--text-3); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.gold { background: var(--gold-soft); color: var(--gold-2); }
.chip.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); }

/* mini export matrix: H4K H1080 / V4K V1080 */
.mx { display: inline-grid; grid-template-columns: auto auto auto; gap: 2px 3px; align-items: center; font-size: 9.5px; font-weight: 700; color: var(--text-3); letter-spacing: 0.02em; }
.mx i { font-style: normal; width: 12px; text-align: center; }
.mx b { width: 22px; height: 13px; border-radius: 4px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(255, 255, 255, 0.12); color: transparent; font-size: 8.5px; }
.mx b.on { background: var(--green-soft); border: 1px solid rgba(76, 195, 138, 0.35); color: var(--green); }
.mx b.na { opacity: 0.35; }

.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.bar.done > span { background: var(--green); }

/* ---------- board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: rgba(255, 255, 255, 0.018); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.col-head h3 { font-size: 13px; }
.col-head .n { color: var(--text-3); font-size: 12px; font-weight: 600; }
.col-head .hint { margin-left: auto; color: var(--text-3); font-size: 11px; }
.col-body { display: flex; flex-direction: column; gap: 8px; max-height: 640px; overflow-y: auto; padding-right: 2px; }
.pcard { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; transition: border-color 0.15s, transform 0.1s; }
.pcard:hover { border-color: rgba(197, 161, 78, 0.4); color: inherit; }
.pcard .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.pcard .m { color: var(--text-3); font-size: 11.5px; margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pcard .f { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.pcard .f .bar { flex: 1; }
.pcard.overdue { border-color: rgba(239, 109, 100, 0.35); }
.col-more { color: var(--text-3); font-size: 12px; text-align: center; padding: 4px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t .name { font-weight: 600; }
table.t .sub { color: var(--text-3); font-size: 11.5px; margin-top: 1px; }
table.t tr.muted-row td { opacity: 0.55; }
th.sel, td.sel { width: 28px; padding-right: 0 !important; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; flex-wrap: wrap; }
.seg a, .seg button { padding: 5px 10px; border-radius: 8px; color: var(--text-2); font: 500 12.5px var(--font); background: none; border: 0; cursor: pointer; }
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.on, .seg button.on { background: var(--surface-3); color: var(--text); }
.seg .n { color: var(--text-3); margin-left: 4px; font-size: 11px; }
.bulkbar { display: none; position: sticky; bottom: 14px; z-index: 5; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); align-items: center; gap: 10px; flex-wrap: wrap; }
.bulkbar.show { display: flex; }

/* ---------- checklist ---------- */
.checklist { display: flex; flex-direction: column; }
.ci { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.ci:last-child { border-bottom: 0; }
.ci .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.ci .ic svg { width: 13px; height: 13px; }
.ci.done .ic { background: var(--green-soft); color: var(--green); }
.ci.partial .ic { background: var(--amber-soft); color: var(--amber); }
.ci.todo .ic { border: 1.5px dashed var(--line-2); color: var(--text-3); }
.ci.todo.req .ic { border-color: rgba(229, 167, 76, 0.55); }
.ci.na .ic { background: rgba(255, 255, 255, 0.04); color: var(--text-3); }
.ci.na .lb { color: var(--text-3); text-decoration: line-through; }
.ci .lb { font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ci .dt { color: var(--text-3); font-size: 12px; margin-top: 1px; overflow-wrap: anywhere; }
.ci .ov { display: inline-flex; gap: 2px; opacity: 0.45; transition: opacity 0.15s; }
.ci:hover .ov, .ci .ov:focus-within { opacity: 1; }
.ci .ov button { background: none; border: 1px solid transparent; color: var(--text-2); font: 500 11.5px var(--font); padding: 3px 7px; border-radius: 7px; cursor: pointer; }
.ci .ov button:hover { border-color: var(--line-2); color: var(--text); }
.ci .ov button.on { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); color: var(--text-3); }
.tag.gold { background: var(--gold-soft); color: var(--gold-2); }

/* ---------- exports ---------- */
.xgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.xcell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; }
.xcell .shot { height: 150px; display: grid; place-items: center; background: #030807; position: relative; }
.xcell .shot img { max-width: 100%; max-height: 150px; object-fit: contain; display: block; }
.xcell .shot .ph { color: var(--text-3); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.xcell .shot .ph svg { width: 22px; height: 22px; opacity: 0.6; }
.xcell.missing { border-style: dashed; }
.xcell .cap { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.xcell .cap .h { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.xcell .cap .d { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcell .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, 0.35); transition: opacity 0.15s; }
.xcell .play svg { width: 34px; height: 34px; color: #fff; }
.xcell .shot:hover .play { opacity: 1; }
.cards-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.thumbcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #030807; }
.thumbcard img { display: block; width: 100%; height: 130px; object-fit: contain; }
.thumbcard .cap { padding: 7px 10px; font-size: 12px; background: var(--surface-2); display: flex; justify-content: space-between; gap: 6px; }
.thumbcard.missing { border-style: dashed; display: grid; place-items: center; min-height: 160px; color: var(--text-3); background: rgba(0, 0, 0, 0.2); }

/* ---------- QC ---------- */
.qc { display: flex; flex-direction: column; gap: 6px; }
.qi { display: flex; gap: 10px; padding: 9px 11px; border-radius: 10px; font-size: 13px; align-items: flex-start; }
.qi svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.qi.error { background: var(--red-soft); color: #f7c0bb; }
.qi.error svg { color: var(--red); }
.qi.warn { background: var(--amber-soft); color: #f2d3a6; }
.qi.warn svg { color: var(--amber); }
.qi.info { background: rgba(255, 255, 255, 0.035); color: var(--text-2); }
.qi.info svg { color: var(--text-3); }
.qi a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- feed ---------- */
.feed { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); align-items: start; }
.ev:last-child { border-bottom: 0; }
.ev .ei { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: var(--text-2); }
.ev .ei svg { width: 13px; height: 13px; }
.ev .ei.green { background: var(--green-soft); color: var(--green); }
.ev .ei.gold { background: var(--gold-soft); color: var(--gold-2); }
.ev .ei.blue { background: var(--blue-soft); color: var(--blue); }
.ev .ei.red { background: var(--red-soft); color: var(--red); }
.ev .ei.amber { background: var(--amber-soft); color: var(--amber); }
.ev .msg { font-size: 13px; overflow-wrap: anywhere; }
.ev .msg .p { font-weight: 600; }
.ev .when { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.ev details summary { color: var(--text-3); font-size: 11.5px; cursor: pointer; margin-top: 2px; list-style: none; }
.ev details summary::-webkit-details-marker { display: none; }
.ev details pre { margin: 6px 0 0; white-space: pre-wrap; font: 11.5px/1.5 var(--mono); color: var(--text-2); background: rgba(0, 0, 0, 0.25); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.ev.note .msg { white-space: pre-wrap; }

/* ---------- files ---------- */
details.group { border-top: 1px solid var(--line); }
details.group:first-of-type { border-top: 0; }
details.group > summary { list-style: none; cursor: pointer; padding: 10px 2px; display: flex; gap: 10px; align-items: center; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary .chev { width: 14px; height: 14px; color: var(--text-3); transition: transform 0.15s; flex: none; }
details.group[open] > summary .chev { transform: rotate(90deg); }
details.group > summary .gp { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
details.group > summary .gm { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.files { padding: 0 0 10px 24px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.frow:last-child { border-bottom: 0; }
.frow .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fa { display: flex; gap: 2px; }
.frow audio { height: 28px; width: 220px; }
.iconbtn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--text-2); background: none; border: 0; cursor: pointer; }
.iconbtn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.iconbtn svg { width: 14px; height: 14px; }
.msgs { display: flex; flex-direction: column; }
.msg-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 56px auto; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.msg-row:last-child { border-bottom: 0; }
.msg-row .n { color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.msg-row audio { height: 28px; width: 100%; max-width: 260px; }
.msg-row.short .nm { color: var(--text-3); }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius); border: 1px solid rgba(197, 161, 78, 0.3); background: var(--gold-soft); margin-bottom: 16px; }
.callout svg { width: 18px; height: 18px; color: var(--gold-2); flex: none; margin-top: 2px; }
.callout.red { border-color: rgba(239, 109, 100, 0.35); background: var(--red-soft); }
.callout.red svg { color: var(--red); }
.callout .body { flex: 1; min-width: 0; }
.callout h3 { margin-bottom: 3px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; background: var(--surface-3); border: 1px solid var(--line-2); padding: 11px 14px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); max-width: 420px; font-size: 13px; display: flex; gap: 10px; align-items: center; animation: rise 0.2s ease-out; }
.toast.err { border-color: rgba(239, 109, 100, 0.5); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.newpill { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40; display: none; }
.newpill.show { display: inline-flex; }
details.edit > summary { list-style: none; cursor: pointer; }
details.edit > summary::-webkit-details-marker { display: none; }
.split { display: flex; gap: 8px; align-items: center; }
.split > * { flex: 1; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 26px; }
.login h1 { font-size: 22px; margin: 16px 0 4px; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.err-box { background: var(--red-soft); color: #f7c0bb; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .side-foot .scan-state span { display: none; }
  .main { padding: 14px 16px 50px; }
  .topbar { flex-wrap: wrap; }
  .search { max-width: none; flex: 1 1 100%; order: 2; }
  .top-actions { margin-left: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(5, 260px); }
  .xgrid, .cards-row { grid-template-columns: minmax(0, 1fr); }
  .frow { grid-template-columns: minmax(0, 1fr) auto; }
  .frow .hide-sm { display: none; }
  .msg-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .msg-row .dur { display: none; }
}
