/* ============================================================================
   Corvus Studio — premium dark UI.
   Theme: "raven iridescence" — obsidian surfaces + a violet→indigo→cyan sheen
   (the colours of light on a raven's wing). Server-rendered; no JS required.
   ========================================================================== */
:root {
  /* obsidian base */
  --bg:        #070809;
  --bg-1:      #0a0c11;
  --bg-2:      #0e1118;
  --surface:   #14171f;
  --surface-2: #181c26;
  --surface-3: #20262f;  /* legacy alias kept for older rules */
  --elevated:  #1b202b;
  --border:    #1f2530;
  --border-2:  #2b3340;
  --hairline:  rgba(255,255,255,.06);

  --text:    #eef1f7;
  --text-2:  #c8cfdc;
  --muted:   #94a0b3;
  --muted-2: #636e81;

  /* raven sheen */
  --iris-1: #9a8bff;   /* violet  */
  --iris-2: #6d5cf0;   /* indigo  */
  --iris-3: #4f8cff;   /* blue    */
  --iris-4: #3fc8e4;   /* cyan    */
  --accent:   #8d7bff;
  --accent-2: #6d5cf0;
  --sheen:  linear-gradient(135deg, var(--iris-1) 0%, var(--iris-2) 42%, var(--iris-3) 78%, var(--iris-4) 100%);
  --sheen-soft: linear-gradient(135deg, rgba(154,139,255,.16), rgba(79,140,255,.10) 70%, rgba(63,200,228,.08));

  /* status */
  --green: #34d27b; --green-bg: rgba(52,210,123,.12); --green-bd: rgba(52,210,123,.32);
  --amber: #f0b13c; --amber-bg: rgba(240,177,60,.12); --amber-bd: rgba(240,177,60,.34);
  --red:   #f56a78; --red-bg:   rgba(245,106,120,.12); --red-bd:  rgba(245,106,120,.34);
  --blue:  #4aa3ff; --blue-bg:  rgba(74,163,255,.12); --blue-bd:  rgba(74,163,255,.34);
  --violet:#b08cff; --violet-bg:rgba(176,140,255,.14); --violet-bd:rgba(176,140,255,.36);

  --r:    14px;
  --r-sm: 9px;
  --r-lg: 22px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.30);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 24px 60px rgba(0,0,0,.45);
  --glow: 0 0 0 1px rgba(141,123,255,.25), 0 8px 30px rgba(109,92,240,.35);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(109,92,240,.16), transparent 60%),
    radial-gradient(760px 480px at 6% 4%, rgba(63,200,228,.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--iris-3); text-decoration: none; }
a:hover { color: var(--iris-1); }
h1, h2, h3 { margin: 0; font-weight: 680; letter-spacing: -.015em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.dot { color: var(--muted-2); margin: 0 2px; }
::selection { background: rgba(141,123,255,.32); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #3a4456; background-clip: content-box; }

/* ---------- Raven brand mark ---------- */
.raven { display: block; }
.raven-svg { display: block; width: 100%; height: 100%; }
.brand-mark { /* container that holds the raven svg */
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 11px; background: var(--sheen-soft);
  border: 1px solid rgba(141,123,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(109,92,240,.30);
}
.brand-mark .raven-svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 4px rgba(109,92,240,.55)); }

/* ---------- App shell / layout ---------- */
.layout { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--bg-1), #060708);
  border-right: 1px solid var(--border); padding: 20px 14px 16px; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: grid; grid-template-columns: auto 1fr; gap: 1px 12px; align-items: center; padding: 4px 8px 20px; }
.brand-mark { grid-row: span 2; align-self: center; }
.brand-name { font-weight: 760; font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.brand-name b { background: var(--sheen); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-tag { grid-column: 2; font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .16em; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 10px; color: var(--muted); font-weight: 560; font-size: 13.5px;
  transition: background .14s, color .14s; isolation: isolate;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(141,123,255,.20), rgba(141,123,255,.02)); }
.nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--sheen); box-shadow: 0 0 12px rgba(141,123,255,.7);
}
.nav-link .ic { width: 18px; text-align: center; opacity: .85; font-size: 15px; }
.nav-sep { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 16px 12px 5px; }
.soon { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--iris-1);
  background: rgba(141,123,255,.12); border: 1px solid rgba(141,123,255,.3); border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.lang-switch { display: inline-flex; gap: 2px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.lang-switch a { color: var(--muted-2); font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 6px; letter-spacing: .03em; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.on { color: #fff; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 30px; background: rgba(8,9,11,.66); backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--border);
}
.page-title { font-size: 19px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 560; font-size: 13px; }
.role-badge { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.role-admin  { background: var(--violet-bg); color: var(--violet); border: 1px solid var(--violet-bd); }
.role-editor { background: var(--blue-bg);  color: var(--blue);  border: 1px solid var(--blue-bd); }
.content { padding: 28px 30px 72px; max-width: 1320px; width: 100%; }
.content > * { animation: rise .4s cubic-bezier(.2,.7,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 650; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); transition: .14s; white-space: nowrap; }
.btn:hover { border-color: #3a4658; background: var(--elevated); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--sheen); border: none; color: #fff; box-shadow: 0 6px 20px rgba(109,92,240,.4); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(109,92,240,.55); }
.btn.primary:disabled { background: var(--surface-2); color: var(--muted-2); border: 1px solid var(--border); cursor: not-allowed; box-shadow: none; transform: none; filter: none; }
.btn.warn { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber); }
.btn.warn:hover { background: rgba(240,177,60,.2); }
.btn.ghost { background: transparent; }
.btn.ghost.on { background: rgba(141,123,255,.14); border-color: rgba(141,123,255,.45); color: #fff; }
.btn.block { width: 100%; }
.btn.xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.hint { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

input, select { font-family: inherit; font-size: 14px; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; outline: none; transition: .14s; }
input:hover, select:hover { border-color: #3a4658; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(141,123,255,.2); background: var(--surface); }
input[type="time"] { font-variant-numeric: tabular-nums; }

/* ---------- Auth (login / change password) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(700px 480px at 50% -10%, rgba(109,92,240,.20), transparent 60%); }
.auth-card { width: 384px; max-width: 100%; background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 34px 32px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141,123,255,.6), transparent); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 780; letter-spacing: -.02em; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-brand .brand-mark .raven-svg { width: 27px; height: 27px; }
.auth-brand b { background: var(--sheen); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; margin: 14px 0 24px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form label, .settings-fields label { display: flex; flex-direction: column; gap: 7px; font-size: 12px;
  color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.auth-form .btn { margin-top: 6px; padding: 11px; font-size: 14px; }
.auth-lang { margin-top: 22px; color: var(--muted-2); font-size: 12px; text-align: center; }
.auth-lang a { color: var(--muted); font-weight: 600; } .auth-lang a.on { color: var(--text); }
.alert { padding: 10px 13px; border-radius: 10px; font-size: 13px; }
.alert.err  { background: var(--red-bg);  border: 1px solid var(--red-bd);  color: #ffb0b7; }
.alert.info { background: var(--blue-bg); border: 1px solid var(--blue-bd); color: #bcd9ff; }

/* ---------- Panels ---------- */
.panel { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel h2 { font-size: 14.5px; }
.subhead { margin: -6px 0 20px; color: var(--muted); }
.subhead-row { display: flex; align-items: center; gap: 12px; margin: -6px 0 20px; }
.subhead-row .subhead { margin: 0; }
.scoped-note { display: flex; align-items: center; gap: 9px; background: var(--sheen-soft); border: 1px solid rgba(141,123,255,.28);
  color: var(--text-2); border-radius: 11px; padding: 11px 15px; font-size: 13px; margin-bottom: 20px; }
.scoped-note::before { content: "◆"; color: var(--iris-1); font-size: 11px; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--muted); letter-spacing: .01em; }
.badge.green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green-bd); }
.badge.amber  { background: var(--amber-bg);  color: var(--amber);  border-color: var(--amber-bd); }
.badge.red    { background: var(--red-bg);    color: #ffb0b7;       border-color: var(--red-bd); }
.badge.blue   { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue-bd); }
.badge.violet { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-bd); }
.badge.muted  { color: var(--muted-2); }
.badge.status { text-transform: uppercase; letter-spacing: .05em; font-size: 10px; }
.status-live { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.status-staged { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-bd); }
.status-instructed, .status-sent_to_creator { background: var(--surface-2); color: var(--muted); }
.status-editing { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-bd); }
.status-archived { background: var(--surface-2); color: var(--muted-2); }

/* ---------- Kanban board ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.column { background: linear-gradient(180deg, rgba(255,255,255,.015), transparent), var(--bg-1);
  border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.col-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 14px; }
.col-title { font-weight: 680; font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.col-count { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 7px; }
.col-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.col-to_cut  .col-dot { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.col-editing .col-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.col-staged  .col-dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.col-body { display: flex; flex-direction: column; gap: 11px; min-height: 72px; }
.col-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted-2); font-size: 12px;
  text-align: center; padding: 26px 12px; border: 1px dashed var(--border-2); border-radius: 11px; }
.col-empty .ce-icon { font-size: 18px; opacity: .6; }

.reel-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 12px; padding: 13px 14px 13px 16px; transition: transform .14s, border-color .14s, box-shadow .14s; overflow: hidden; }
.reel-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted-2); }
.reel-card:hover { transform: translateY(-2px); border-color: #3a4658; box-shadow: var(--shadow); }
.reel-card.ok::before   { background: linear-gradient(180deg, var(--green), #1fae63); box-shadow: 0 0 14px rgba(52,210,123,.5); }
.reel-card.warn::before { background: linear-gradient(180deg, var(--amber), #c98a2a); box-shadow: 0 0 14px rgba(240,177,60,.5); }
.rc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rc-creator { font-weight: 700; color: var(--text); font-size: 14px; }
.rc-num { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.rc-checks { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 7px; border: 1px solid var(--border-2); color: var(--muted-2); background: var(--bg-2); }
.pill.yes { color: var(--green); border-color: var(--green-bd); background: var(--green-bg); }
.pill.no  { color: var(--muted-2); opacity: .8; }
.rc-missing { margin: 10px 0 0; padding: 8px 10px 8px 26px; color: var(--amber); font-size: 11.5px;
  background: var(--amber-bg); border: 1px solid var(--amber-bd); border-radius: 9px; list-style-position: inside; }

/* full-width "intentional" empty pipeline */
.empty-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 30px 20px; margin-bottom: 24px; border: 1px dashed var(--border-2); border-radius: var(--r);
  background: radial-gradient(420px 200px at 50% 0, rgba(109,92,240,.08), transparent 70%); }
.empty-hero .eh-mark { width: 52px; height: 52px; opacity: .8; }
.empty-hero h3 { font-size: 15px; }
.empty-hero p { margin: 0; color: var(--muted); font-size: 13px; max-width: 440px; }

/* ---------- Availability gauge ---------- */
.avail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.avail-card { display: flex; align-items: center; gap: 16px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 13px; padding: 15px 16px; }
.gauge { --pct: 0; --ring: var(--green); position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--surface-2) 0); }
.gauge::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--border); }
.gauge.low  { --ring: var(--amber); }
.gauge.full { --ring: linear-gradient(var(--green), var(--green)); }
.gauge-val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums; z-index: 1; }
.gauge-val small { font-size: 9px; font-weight: 700; }
.avail-info { min-width: 0; flex: 1; }
.avail-name { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.avail-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.avail-sub b { color: var(--text-2); }
.avail-foot { margin-top: 8px; }

/* ---------- Reel detail ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 16px; font-weight: 650; font-size: 13px; }
.back-link:hover { color: var(--text); }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 18px; }
.preview-box { display: flex; gap: 15px; align-items: center; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.preview-play { width: 58px; height: 58px; flex: none; display: grid; place-items: center; font-size: 21px; color: #fff;
  background: var(--sheen); border-radius: 14px; box-shadow: 0 8px 22px rgba(109,92,240,.45); }
.preview-title { font-weight: 650; }
.kv { display: flex; flex-direction: column; }
.kv-row { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 11px 2px; border-top: 1px solid var(--border); }
.kv-k { color: var(--muted); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.kv-v { word-break: break-word; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.check-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 800; }
.check.ok .check-ic  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.check.bad .check-ic { background: var(--surface-2); color: var(--muted-2); border: 1px solid var(--border-2); }
.validation-summary { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 650; font-size: 13px; }
.validation-summary.ok { color: var(--green); }
.validation-summary.warn { color: var(--amber); }
.chip { display: inline-block; font-size: 11px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd);
  border-radius: 7px; padding: 2px 9px; margin: 4px 4px 0 0; }
.status-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.live-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- Content inbox ---------- */
.inbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.inbox-stub { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 12px; gap: 8px; }
.stub-icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; color: var(--iris-1);
  background: var(--sheen-soft); border: 1px solid rgba(141,123,255,.25); border-radius: 50%; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.file-name { font-weight: 600; }
.file-actions { margin-left: auto; }

/* ---------- Instructions ---------- */
.instr-list { display: flex; flex-direction: column; gap: 14px; }
.instr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.instr-id { display: flex; align-items: baseline; gap: 10px; }
.instr-toggles { display: flex; gap: 16px; }
.switch-form { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; background: none; border: none;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 650; padding: 0; }
.switch-track { width: 40px; height: 23px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2);
  position: relative; transition: .18s; flex: none; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted);
  transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch:hover .switch-track { border-color: #3a4658; }
.switch.on .switch-track { background: linear-gradient(90deg, var(--green-bg), rgba(52,210,123,.28)); border-color: var(--green-bd); }
.switch.on .switch-knob { left: 19px; background: var(--green); box-shadow: 0 0 10px rgba(52,210,123,.7); }
.switch.on .switch-label { color: var(--green); }
.brief { border-top: 1px solid var(--border); padding-top: 12px; }
.brief summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; }
.brief summary::-webkit-details-marker { display: none; }
.brief summary::before { content: "▸"; color: var(--iris-1); margin-right: 8px; display: inline-block; transition: .15s; }
.brief[open] summary::before { transform: rotate(90deg); }
.brief-body { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 12px 0 0; max-height: 360px; overflow: auto; }

/* ---------- Settings ---------- */
.settings-list { display: flex; flex-direction: column; gap: 14px; }
.settings-form { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: center; }
.settings-name { font-weight: 700; font-size: 14px; }
.settings-name .muted.small { display: block; font-weight: 500; margin-top: 3px; }
.settings-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.settings-fields input[type=number] { width: 92px; }
.time-pair { display: flex; gap: 6px; align-items: center; }
.tz-foot { margin-top: 16px; display: inline-flex; align-items: center; gap: 7px; }
.tz-foot::before { content: "🌐"; filter: grayscale(.3); }

/* ---------- Premium "coming soon" placeholder ---------- */
.placeholder { position: relative; overflow: hidden; text-align: center; padding: 58px 24px 64px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border-2); border-radius: var(--r-lg); }
.placeholder::before { content: ""; position: absolute; inset: -40% 0 auto 0; height: 70%;
  background: radial-gradient(520px 240px at 50% 0, rgba(109,92,240,.18), transparent 70%); pointer-events: none; }
.ph-badge { position: relative; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: #fff; background: var(--sheen); border-radius: 999px;
  padding: 5px 14px; box-shadow: 0 6px 18px rgba(109,92,240,.4); }
.ph-icon { position: relative; font-size: 46px; margin: 22px 0 10px; background: var(--sheen);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 14px rgba(109,92,240,.5)); }
.placeholder h2 { position: relative; font-size: 20px; }
.placeholder p { position: relative; color: var(--muted); max-width: 460px; margin: 8px auto 0; }
.ph-preview { position: relative; display: flex; justify-content: center; gap: 8px; margin-top: 26px; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.ph-preview span { width: 54px; height: 34px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border-2); }

/* ---------- Distribution matrix (Phase 4) ---------- */
.dist-banner { display: flex; align-items: center; gap: 9px; background: var(--amber-bg); border: 1px solid var(--amber-bd);
  color: var(--amber); border-radius: 11px; padding: 11px 15px; font-size: 13px; font-weight: 700; margin-bottom: 16px; letter-spacing: .01em; }
.dist-overview { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-bottom: 18px; padding: 15px 20px; }
.dist-ov { display: flex; align-items: baseline; gap: 8px; }
.dist-ov b { font-size: 15px; font-variant-numeric: tabular-nums; }
.dist-teams { display: flex; flex-direction: column; gap: 16px; }
.dist-team-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.dist-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dist-table-wrap { overflow-x: auto; }
.dist-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.dist-matrix th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2);
  font-weight: 700; padding: 6px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dist-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.dist-matrix tbody tr:last-child td { border-bottom: none; }
.dist-matrix tbody tr:hover td { background: rgba(255,255,255,.018); }
.dist-wcol { width: 170px; }
.dist-wname { font-weight: 680; color: var(--text); white-space: nowrap; }
.dist-cell { font-variant-numeric: tabular-nums; }
.dist-cell.filled { color: var(--text-2); }
.dist-cell.empty { color: var(--muted-2); }
.dist-cell.recycled { color: var(--blue); }
.dist-rec { color: var(--blue); font-weight: 800; }
.dist-short { text-align: right; white-space: nowrap; }
.dist-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.dist-note { color: var(--amber); }
.viral-note { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; }
  .brand { padding: 4px 8px; } .brand-tag { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; margin: 0; gap: 4px; } .nav-sep { display: none; }
  .nav-link.active::before { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: none; padding: 0; }
  .board { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .content { padding: 18px 16px 60px; }
  .topbar { padding: 13px 16px; }
  .user-chip { display: none; }
}
