/* ═══════════════════════════════════════════════════
   ContentDesk Pro · style.css
   Dark editorial CMS — Instrument Serif + Geist
═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg:         #0c0e13;
  --bg2:        #10121a;
  --surface:    #141720;
  --surface2:   #1b1f2e;
  --surface3:   #222740;
  --border:     #1f2435;
  --border2:    #2a3050;
  --border3:    #353d60;

  --text:       #dde1f0;
  --text-dim:   #8890b0;
  --text-muted: #4a5070;

  --muz:        #d4a96a;
  --muz-dim:    rgba(212,169,106,0.12);
  --muz-border: rgba(212,169,106,0.3);
  --nad:        #5b9cf6;
  --nad-dim:    rgba(91,156,246,0.12);
  --nad-border: rgba(91,156,246,0.3);

  --green:      #52d48a;
  --green-dim:  rgba(82,212,138,0.12);
  --red:        #e05668;
  --red-dim:    rgba(224,86,104,0.12);
  --purple:     #a07cf5;
  --purple-dim: rgba(160,124,245,0.12);
  --amber:      #f0b429;

  /* Sizes */
  --sidebar-w:  224px;
  --topbar-h:   52px;
  --radius:     10px;
  --radius-sm:  6px;

  /* Fonts */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Geist', system-ui, sans-serif;
  --font-mono:  'Geist Mono', 'Courier New', monospace;

  /* Active brand (changes dynamically) */
  --brand:        var(--muz);
  --brand-dim:    var(--muz-dim);
  --brand-border: var(--muz-border);
}

html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  display: flex;
  height: 100vh;
  line-height: 1.5;
}

/* ──────────────────────────────────────────────────
   SCROLLBARS
────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ──────────────────────────────────────────────────
   SIDEBAR
────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease, min-width 0.25s ease;
  z-index: 100;
}
.sidebar.collapsed { width: 0; min-width: 0; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.logo-glyph {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--muz), var(--nad));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--bg); flex-shrink: 0;
}
.logo-name { font-family: var(--font-serif); font-size: 17px; letter-spacing: -0.3px; }
.logo-ver  { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

.brand-pill-group {
  display: flex; gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.brand-pill {
  flex: 1; padding: 6px 0;
  border-radius: 20px; border: 1px solid var(--border2);
  background: transparent; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 11px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 5px;
  transition: all 0.18s;
}
.brand-pill .pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-muz.active { background: var(--muz-dim); border-color: var(--muz); color: var(--muz); }
.pill-nad.active { background: var(--nad-dim); border-color: var(--nad); color: var(--nad); }
.brand-pill:not(.active):hover { background: var(--surface2); }

.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-group-label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 1.5px; color: var(--text-muted);
  padding: 4px 8px 6px; text-transform: uppercase;
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13px;
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 1px; user-select: none;
  text-decoration: none;
}
.nav-link span:first-child { font-size: 14px; width: 16px; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--brand-dim); color: var(--brand); }

.sidebar-status {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.status-apis { display: flex; flex-direction: column; gap: 4px; }
.api-indicator { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.ind-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-off  { background: var(--border2); }
.dot-on   { background: var(--green); box-shadow: 0 0 6px var(--green); animation: blink 3s infinite; }
.dot-err  { background: var(--red); }
@keyframes blink { 0%,100%{opacity:1} 60%{opacity:0.5} }

/* ──────────────────────────────────────────────────
   MAIN WRAP
────────────────────────────────────────────────── */
.main-wrap {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* ──────────────────────────────────────────────────
   TOPBAR
────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px; gap: 16px;
  flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.hamburger {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 4px;
  transition: color 0.15s;
}
.hamburger:hover { color: var(--text); }

.topbar-brand {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
}
.tb-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-muz { background: var(--muz); }
.dot-nad { background: var(--nad); }

.breadcrumb { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.progress-bar { width: 120px; height: 3px; background: var(--border2); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 2px; width: 0%; transition: width 0.3s; }

.top-action-btn {
  padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text-dim); font-family: var(--font-sans); font-size: 12px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.top-action-btn:hover { color: var(--text); }
.top-action-btn.accent {
  background: var(--brand-dim); color: var(--brand);
  border-color: var(--brand-border);
}

/* ──────────────────────────────────────────────────
   VIEWS
────────────────────────────────────────────────── */
.views-wrap { flex: 1; overflow: hidden; position: relative; }
.view { position: absolute; inset: 0; display: none; overflow: hidden; }
.view.active { display: flex; flex-direction: column; }

.view-inner { flex: 1; overflow-y: auto; padding: 24px; }
.view-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.view-head h2 {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 400;
  letter-spacing: -0.3px;
}

/* ──────────────────────────────────────────────────
   COMPOSE LAYOUT
────────────────────────────────────────────────── */
.compose-layout {
  display: flex; height: 100%; overflow: hidden;
}

/* FORM PANEL */
.compose-form {
  width: 310px; min-width: 310px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.form-scroll {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
}
.form-section-head {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px; margin-top: 4px;
}

.field { margin-bottom: 10px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 4px; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 7px 9px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-sans); font-size: 12px;
  outline: none; transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a5070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  padding-right: 26px; cursor: pointer;
}
.field select option { background: var(--surface2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-border);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field-hint { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-top: 3px; }

.field-row { display: flex; gap: 8px; }
.field-row .field { flex: 1; min-width: 0; }

.badge-mono {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--surface2); color: var(--text-muted);
  padding: 1px 6px; border-radius: 10px;
  border: 1px solid var(--border2);
}

/* Image drop */
.image-drop {
  border: 1px dashed var(--border2); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; cursor: pointer;
  transition: all 0.15s; background: var(--bg2);
}
.image-drop:hover { border-color: var(--brand-border); background: var(--brand-dim); }
.image-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); font-size: 12px; }

/* Automation checkboxes */
.automation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.auto-check {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg2);
  cursor: pointer; font-size: 11px; color: var(--text-dim);
  transition: all 0.15s; user-select: none;
}
.auto-check:hover { border-color: var(--border2); color: var(--text); }
.auto-check input { display: none; }
.auto-check-box {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid var(--border2); flex-shrink: 0;
  transition: all 0.15s; position: relative;
}
.auto-check input:checked ~ .auto-check-box {
  background: var(--brand); border-color: var(--brand);
}
.auto-check input:checked ~ .auto-check-box::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--bg); font-weight: 700;
}
.auto-check input:checked ~ span:last-child { color: var(--text); }

/* Action buttons */
.action-stack { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-bottom: 20px; }

.btn-main {
  width: 100%; padding: 10px 14px;
  background: var(--brand); color: var(--bg);
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all 0.18s; position: relative; overflow: hidden;
}
.btn-main:hover { filter: brightness(1.1); }
.btn-main:active { transform: scale(0.98); }
.btn-glyph { font-size: 15px; }

.btn-row { display: flex; gap: 6px; }
.btn-sec {
  flex: 1; padding: 8px 6px;
  background: var(--surface2); color: var(--text-dim);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 11px;
  cursor: pointer; transition: all 0.15s; text-align: center;
}
.btn-sec:hover { color: var(--text); background: var(--surface3); }

.btn-ghost {
  width: 100%; padding: 7px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.btn-ghost:hover { color: var(--red); border-color: var(--red); background: var(--red-dim); }

/* ──────────────────────────────────────────────────
   EDITOR PANEL
────────────────────────────────────────────────── */
.compose-editor {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

.editor-tabs {
  display: flex; align-items: center;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 16px; flex-shrink: 0; gap: 0;
}
.etab {
  padding: 13px 14px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.etab:hover { color: var(--text); }
.etab.active { color: var(--text); border-bottom-color: var(--brand); }
.etab-count {
  display: inline-block; padding: 1px 5px;
  background: var(--surface2); border-radius: 10px;
  font-size: 9px; margin-left: 5px; color: var(--text-dim);
}
.etab-actions { margin-left: auto; display: flex; gap: 4px; }
.etab-btn {
  padding: 4px 8px; background: none; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-muted); font-size: 11px;
  cursor: pointer; transition: all 0.15s;
}
.etab-btn:hover { color: var(--text); background: var(--surface2); }

.epane { display: none; flex: 1; flex-direction: column; padding: 16px; overflow: hidden; }
.epane.active { display: flex; }
.epane-meta { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-bottom: 10px; flex-shrink: 0; }
.epane-meta b { color: var(--text-dim); }

.article-ta {
  flex: 1; width: 100%;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-sans); font-size: 14px; line-height: 1.75;
  padding: 16px 18px; resize: none; outline: none;
  transition: border-color 0.15s;
}
.article-ta:focus { border-color: var(--brand-border); box-shadow: 0 0 0 3px var(--brand-dim); }
.article-ta::placeholder { color: var(--text-muted); font-style: italic; }

/* Social platforms */
.social-platforms { display: flex; gap: 6px; margin-bottom: 10px; flex-shrink: 0; }
.plat-btn {
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 10px;
  cursor: pointer; transition: all 0.15s;
}
.plat-btn.active { background: var(--brand-dim); border-color: var(--brand-border); color: var(--brand); }
.plat-btn:hover:not(.active) { background: var(--surface2); color: var(--text); }

/* Audio header */
.audio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-shrink: 0; }
.audio-badge {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--purple); background: var(--purple-dim);
  border: 1px solid rgba(160,124,245,0.25);
  padding: 3px 10px; border-radius: 20px;
}
.audio-dur { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ──────────────────────────────────────────────────
   YOAST SEO PANEL
────────────────────────────────────────────────── */
.yoast-wrap { display: flex; gap: 20px; margin-bottom: 16px; }
.yoast-score-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: var(--surface2); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--green); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.5s, stroke 0.3s; }
.ring-score {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
}
.yoast-checks { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.yc-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim);
  padding: 5px 0; border-bottom: 1px solid var(--border);
}
.yc-item:last-child { border-bottom: none; }
.yc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--border2); }
.yc-dot.pass { background: var(--green); }
.yc-dot.fail { background: var(--red); }
.yc-dot.warn { background: var(--amber); }
.yc-label { flex: 1; }

.seo-preview-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.spb-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px; }
.spb-url   { font-size: 12px; color: var(--green); margin-bottom: 3px; }
.spb-title { font-size: 16px; color: #8ab4f8; margin-bottom: 4px; font-weight: 400; }
.spb-desc  { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ──────────────────────────────────────────────────
   CALENDAR
────────────────────────────────────────────────── */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.cal-day-head {
  background: var(--surface); padding: 8px 4px;
  text-align: center; font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); letter-spacing: 0.5px;
}
.cal-day {
  background: var(--surface); padding: 8px 6px;
  min-height: 70px; cursor: pointer; transition: background 0.12s;
  position: relative;
}
.cal-day:hover { background: var(--surface2); }
.cal-day.today { background: var(--brand-dim); }
.cal-day.other-month .cal-day-num { color: var(--text-muted); }
.cal-day-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--brand); font-weight: 600; }
.cal-event {
  font-size: 10px; padding: 2px 5px; border-radius: 3px;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer;
}
.ev-muz { background: var(--muz-dim); color: var(--muz); border-left: 2px solid var(--muz); }
.ev-nad { background: var(--nad-dim); color: var(--nad); border-left: 2px solid var(--nad); }

/* ──────────────────────────────────────────────────
   DRAFTS / HISTORY
────────────────────────────────────────────────── */
.drafts-list, .history-list { display: flex; flex-direction: column; gap: 8px; }
.draft-card, .hist-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; transition: border-color 0.15s;
}
.draft-card:hover, .hist-card:hover { border-color: var(--border2); }
.draft-brand-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.draft-info { flex: 1; min-width: 0; }
.draft-title { font-size: 14px; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.draft-actions { display: flex; gap: 6px; }
.draft-act-btn {
  padding: 4px 9px; border-radius: 4px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--text-muted); font-size: 11px; cursor: pointer;
  transition: all 0.15s;
}
.draft-act-btn:hover { color: var(--text); }

/* ──────────────────────────────────────────────────
   SETTINGS / TWO-COL
────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.sc-head { font-family: var(--font-sans); font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.sc-sub  { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.conn-status {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-muted); margin-top: 8px;
  padding: 5px 8px; background: var(--bg2);
  border-radius: 4px; border: 1px solid var(--border);
}
.conn-status.ok  { color: var(--green); background: var(--green-dim); border-color: rgba(82,212,138,0.2); }
.conn-status.err { color: var(--red);   background: var(--red-dim);   border-color: rgba(224,86,104,0.2); }

/* ──────────────────────────────────────────────────
   TOASTS
────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px;
  animation: toastIn 0.2s ease; pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  max-width: 320px; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.toast-success { background: var(--green-dim); border: 1px solid rgba(82,212,138,0.3); color: var(--green); }
.toast-error   { background: var(--red-dim);   border: 1px solid rgba(224,86,104,0.3); color: var(--red); }
.toast-info    { background: var(--nad-dim);    border: 1px solid var(--nad-border);    color: var(--nad); }
.toast-warn    { background: rgba(240,180,41,0.12); border: 1px solid rgba(240,180,41,0.3); color: var(--amber); }
@keyframes toastIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ──────────────────────────────────────────────────
   MODAL
────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; width: 480px; max-width: 90vw;
  overflow: hidden;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ──────────────────────────────────────────────────
   SPINNER / LOADING
────────────────────────────────────────────────── */
.spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .compose-form { width: 260px; min-width: 260px; }
  .settings-grid, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { position: absolute; height: 100%; }
  .compose-form { width: 100%; min-width: unset; border-right: none; }
  .compose-editor { display: none; }
}
