/* ============================================================================
   EdenStudio — the creator console for edenstreammedia.com
   Shares the edenstreammedia.com design language (cream / forest / gold,
   Lora display + Source Sans 3 body) and is a no-build, dependency-free file.
   ========================================================================== */

:root {
  --bg: #fbf4e8;
  --surface: #ffffff;
  --surface-2: #f7f0e2;
  --surface-3: #f1e8d6;
  --fg: #241f18;
  --muted: #7c7363;
  --muted-strong: #5d5546;
  --brand: #2d5016;
  --brand-deep: #1e2e10;
  --espresso: #241f18;
  --rail: #16240f;
  --gold: #d4a843;
  --gold-hover: #c49a38;
  --border: #e6dcc8;
  --border-strong: #d8cbb2;
  --cream-ink: #f5f2eb;
  --ok: #2d5016;
  --ok-bg: #e9f1de;
  --warn: #8a6516;
  --warn-bg: #fbf0d8;
  --bad: #8c2f22;
  --bad-bg: #fbe4e1;
  --info: #33547a;
  --info-bg: #e8eef7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(36, 31, 24, 0.05);
  --shadow: 0 18px 40px rgba(36, 31, 24, 0.14);
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail-w: 272px;
  --speed: 160ms;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: var(--brand-deep);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ shell -- */

.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* --------------------------------------------------------------------- rail */

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 16px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(212, 168, 67, 0.10) 0%, rgba(212, 168, 67, 0) 58%),
    var(--rail);
  color: var(--cream-ink);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 242, 235, 0.2) transparent;
  z-index: 70;
}

.rail-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 8px 0;
  text-decoration: none;
}
.rail-brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.005em;
}
.rail-brand .wordmark span { color: var(--gold); }
.rail-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.38);
  border-radius: 999px;
  padding: 2px 7px;
  transform: translateY(-2px);
}

.channel-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  background: rgba(245, 242, 235, 0.06);
  border: 1px solid rgba(245, 242, 235, 0.12);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background var(--speed) ease, border-color var(--speed) ease;
}
.channel-chip:hover { background: rgba(245, 242, 235, 0.1); border-color: rgba(212, 168, 67, 0.35); }
.channel-chip .avatar {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gold) 0%, #b5882c 100%);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}
.channel-chip .who { min-width: 0; flex: 1; }
.channel-chip .who b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-chip .who span {
  display: block;
  font-size: 0.76rem;
  color: rgba(245, 242, 235, 0.62);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.channel-chip .chev { color: rgba(245, 242, 235, 0.4); }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-label {
  margin: 14px 10px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.42);
}
.rail-label:first-child { margin-top: 0; }

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(245, 242, 235, 0.74);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--speed) ease, color var(--speed) ease;
}
.rail-link svg { width: 19px; height: 19px; opacity: 0.85; flex: 0 0 19px; }
.rail-link:hover { background: rgba(245, 242, 235, 0.07); color: var(--cream-ink); }
.rail-link[aria-current="page"] {
  background: rgba(212, 168, 67, 0.14);
  color: #fff;
}
.rail-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -16px; top: 50%;
  width: 3px; height: 20px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}
.rail-link[aria-current="page"] svg { opacity: 1; color: var(--gold); }
.rail-link .count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(245, 242, 235, 0.55);
  background: rgba(245, 242, 235, 0.08);
  border-radius: 999px;
  padding: 1px 7px;
}
.rail-link[aria-current="page"] .count { color: var(--brand-deep); background: var(--gold); }

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 242, 235, 0.1);
}
.rail-foot .rail-link { font-size: 0.86rem; }

.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.2);
  font-size: 0.78rem;
  color: rgba(245, 242, 235, 0.78);
}
.mode-row b { color: var(--gold); font-weight: 600; }
.mode-row button {
  border: 1px solid rgba(212, 168, 67, 0.45);
  background: transparent;
  color: var(--gold);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  white-space: nowrap;
}
.mode-row button:hover { background: rgba(212, 168, 67, 0.14); }

.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  min-width: 0;
}
.user-row .avatar-sm {
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 999px;
  background: rgba(245, 242, 235, 0.14);
  color: var(--cream-ink);
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700;
}
.user-row .who { min-width: 0; flex: 1; font-size: 0.78rem; color: rgba(245, 242, 235, 0.6); }
.user-row .who b { display: block; color: rgba(245, 242, 235, 0.88); font-weight: 500; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-link {
  border: 0; background: transparent; color: rgba(245, 242, 235, 0.55);
  cursor: pointer; padding: 4px; border-radius: 6px; line-height: 0;
}
.icon-link:hover { color: var(--gold); background: rgba(245, 242, 235, 0.08); }

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: rgba(251, 244, 232, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font-size: 1.32rem; color: var(--fg); }
.topbar-title p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.search-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--surface-2);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  transition: background var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease;
}
.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-btn { display: none; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0.5rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--speed) ease, border-color var(--speed) ease, color var(--speed) ease, transform 80ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--brand-deep); }
.btn-gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }

.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--fg); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-quiet { background: transparent; border-color: transparent; color: var(--muted-strong); }
.btn-quiet:hover { background: var(--surface-2); color: var(--fg); }

.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #74261b; border-color: #74261b; }

.btn-sm { min-height: 32px; padding: 0.25rem 0.7rem; font-size: 0.8rem; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------- layout */

.content {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 36px) 80px;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.view-head h2 { font-size: 1.5rem; }
.view-head .sub { color: var(--muted); font-size: 0.88rem; margin-top: 3px; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.eyebrow.dark { color: var(--warn); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 18px 20px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 1.02rem; }
.panel-head .fine { margin-top: 2px; }
.panel-body { padding: 16px 20px; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.fine { color: var(--muted); font-size: 0.82rem; }
.fine-strong { color: var(--muted-strong); font-size: 0.84rem; }
.mono { font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-display); }

/* --------------------------------------------------------------- stat cards */

.stat-card {
  position: relative;
  padding: 16px 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-card .label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.stat-card .value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-card .delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ok);
}
.stat-card .delta.down { color: var(--bad); }
.stat-card .delta .fine { font-weight: 400; }
.stat-card .spark { position: absolute; right: 10px; bottom: 8px; opacity: 0.9; }
.stat-card svg.spark { width: 78px; height: 34px; }

/* --------------------------------------------------------------- checklist */

.progress-line {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-line > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, #4d7a2a 100%);
  transition: width 400ms ease;
}

.checklist { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.checklist .tick {
  width: 20px; height: 20px; flex: 0 0 20px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  color: transparent;
  background: var(--surface);
}
.checklist .tick svg { width: 12px; height: 12px; }
.checklist li.done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.checklist .what { flex: 1; min-width: 0; }
.checklist .what b { display: block; font-size: 0.88rem; font-weight: 600; }
.checklist li.done .what b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.checklist .what span { display: block; font-size: 0.78rem; color: var(--muted); }
.checklist .go { font-size: 0.78rem; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.checklist .go:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- attention */

.attention { display: flex; flex-direction: column; }
.attention-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.attention-item:last-child { border-bottom: 0; }
.attention-icon {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--warn-bg);
  color: var(--warn);
}
.attention-icon.bad { background: var(--bad-bg); color: var(--bad); }
.attention-icon.info { background: var(--info-bg); color: var(--info); }
.attention-icon svg { width: 17px; height: 17px; }
.attention-copy { flex: 1; min-width: 0; }
.attention-copy b { display: block; font-size: 0.89rem; font-weight: 600; }
.attention-copy span { display: block; color: var(--muted); font-size: 0.8rem; }

/* ------------------------------------------------------------------- chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  text-transform: capitalize;
}
.chip svg { width: 11px; height: 11px; }
.chip-published, .chip-approved, .chip-paid, .chip-done { background: var(--ok-bg); color: var(--ok); border-color: #cbdcb6; }
.chip-processing, .chip-pending, .chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #eedcb0; }
.chip-draft, .chip-archived { background: var(--surface-3); color: var(--muted-strong); border-color: var(--border-strong); }
.chip-uploading, .chip-info { background: var(--info-bg); color: var(--info); border-color: #ccdaec; }
.chip-blocked, .chip-rejected, .chip-failed { background: var(--bad-bg); color: var(--bad); border-color: #f0c5bf; }
.chip-gold { background: var(--warn-bg); color: #7a5a0f; border-color: #eedcb0; }
.chip-ghost { background: var(--surface); color: var(--muted-strong); border-color: var(--border); }

.pill-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 500;
}

/* ----------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > label, .field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-strong);
}
.field .hint { font-size: 0.75rem; color: var(--muted); }
.field .error { font-size: 0.76rem; color: var(--bad); font-weight: 500; }

input[type="text"], input[type="search"], input[type="url"], input[type="email"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #c9ba9c; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.22);
}
input::placeholder, textarea::placeholder { color: #a99f8c; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7363' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.search-field {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.search-field svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-field input { padding-left: 34px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 2px;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.segmented button:hover { color: var(--fg); }
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted-strong);
  cursor: pointer;
  user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  transition: background var(--speed) ease;
  flex: 0 0 34px;
}
.toggle .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform var(--speed) ease;
}
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(14px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------- content list */

.list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.list-head, .list-row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 2.4fr) 112px 108px 82px 104px 128px 40px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.list-head {
  min-height: 40px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.list-head button {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.list-head button svg { width: 11px; height: 11px; }
.list-row {
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--speed) ease;
  cursor: pointer;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fdfaf3; }
.list-row.selected { background: #fbf5e6; box-shadow: inset 3px 0 0 var(--gold); }

.video-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.thumb {
  position: relative;
  width: 84px;
  aspect-ratio: 16 / 9;
  flex: 0 0 84px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(150deg, #35571c 0%, #16240f 100%);
  color: rgba(245, 242, 235, 0.9);
  display: grid;
  place-items: center;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .glyph {
  max-width: 100%;
  padding: 0 4px;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.8);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.thumb .play-icon { color: rgba(245, 242, 235, 0.55); }
.thumb .dur {
  position: absolute;
  right: 3px; bottom: 3px;
  background: rgba(20, 26, 12, 0.82);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.video-cell .meta { min-width: 0; }
.video-cell .meta b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video-cell .meta span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}
.cell-muted { color: var(--muted-strong); font-size: 0.84rem; }
.cell-num { font-variant-numeric: tabular-nums; font-size: 0.86rem; }

.row-menu {
  width: 30px; height: 30px;
  border: 0; background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0.55;
  transition: opacity var(--speed) ease, background var(--speed) ease;
}
.list-row:hover .row-menu, .row-menu:focus-visible, .row-menu[aria-expanded="true"] { opacity: 1; }
.row-menu:hover { background: var(--surface-2); color: var(--fg); }

.check {
  appearance: none;
  width: 17px; height: 17px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  display: grid; place-items: center;
  margin: 0;
}
.check:checked { background: var(--brand); border-color: var(--brand); }
.check:checked::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.bulkbar {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px 9px 16px;
  background: var(--brand-deep);
  color: var(--cream-ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
}
.bulkbar b { color: var(--gold); }
.bulkbar .btn { min-height: 30px; font-size: 0.78rem; padding: 0.2rem 0.7rem; }

/* ------------------------------------------------------------------- menu */

.menu {
  position: fixed;
  z-index: 120;
  min-width: 190px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}
.menu button svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--bad); }
.menu button.danger svg { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }

/* --------------------------------------------------------------- empty/skel */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 54px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty .empty-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--brand);
  margin-bottom: 2px;
}
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 1.12rem; }
.empty p { color: var(--muted); font-size: 0.88rem; max-width: 420px; }

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #f1e9da 25%, #f8f2e6 37%, #f1e9da 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ------------------------------------------------------------------ upload */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(212, 168, 67, 0.08) 0%, rgba(212, 168, 67, 0) 70%),
    var(--surface);
  text-align: center;
  transition: border-color var(--speed) ease, background var(--speed) ease;
}
.dropzone.is-dragging {
  border-color: var(--gold);
  background: #fdf6e5;
}
.dropzone .up-mark {
  width: 46px; height: 46px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--brand);
  margin-bottom: 2px;
}
.dropzone .up-mark svg { width: 21px; height: 21px; }
.dropzone h3 { font-size: 1.05rem; }
.dropzone p { color: var(--muted); font-size: 0.85rem; }
.dropzone .row { margin-top: 6px; }

.queue { display: flex; flex-direction: column; gap: 10px; }
.queue-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.queue-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.queue-thumb {
  width: 72px; aspect-ratio: 16/9; flex: 0 0 72px;
  border-radius: 6px;
  background: linear-gradient(150deg, #35571c, #16240f);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  color: rgba(245, 242, 235, 0.75);
}
.queue-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.queue-thumb svg { width: 18px; height: 18px; }
.queue-meta { flex: 1; min-width: 0; }
.queue-meta b {
  display: block; font-size: 0.88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-meta .fine { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.queue-progress { padding: 0 14px 12px; }
.queue-progress .line {
  height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden;
}
.queue-progress .line > span {
  display: block; height: 100%; border-radius: inherit; background: var(--brand);
  transition: width 200ms linear;
}
.queue-progress .stat { display: flex; justify-content: space-between; margin-top: 5px; }

.queue-fields {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fdfaf3;
}

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.details-grid .span-2 { grid-column: 1 / -1; }

.upload-actions { display: flex; flex-direction: column; gap: 12px; }
.upload-actions .hint { margin-left: 0; }
.upload-actions > .fine { margin-left: 44px; }
.upload-actions .submit-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .n {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: #7a5a0f;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.steps b { display: block; font-size: 0.9rem; }
.steps p { margin-top: 2px; }

/* ------------------------------------------------------------------ drawer */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 36, 22, 0.42);
  backdrop-filter: blur(2px);
  animation: fade 160ms ease both;
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed;
  z-index: 110;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(36, 31, 24, 0.18);
  animation: slide-in 200ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.drawer-head h2 { font-size: 1.1rem; }
.drawer-head .fine { margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.drawer-close { margin-left: auto; }

.detail-preview {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(150deg, #35571c, #16240f);
  color: var(--cream-ink);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.detail-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-preview .play {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(20, 26, 12, 0.55);
  border: 1px solid rgba(245, 242, 235, 0.4);
  color: #fff;
  backdrop-filter: blur(4px);
}
.detail-preview .play svg { width: 18px; height: 18px; margin-left: 2px; }
.detail-preview .glyph {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.66);
}

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kv > div { background: var(--surface); padding: 10px 12px; }
.kv dt { font-size: 0.72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kv dd { margin: 2px 0 0; font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.danger-zone {
  margin-top: 20px;
  border: 1px solid #efc9c2;
  border-radius: var(--radius-sm);
  background: #fdf5f3;
  padding: 14px;
}
.danger-zone h3 { font-size: 0.9rem; color: var(--bad); font-family: var(--font-body); font-weight: 700; }
.danger-zone p { font-size: 0.8rem; color: var(--muted-strong); margin: 3px 0 10px; }

/* ----------------------------------------------------------------- dialogs */

dialog {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
  max-width: min(460px, calc(100vw - 32px));
  width: 100%;
}
dialog::backdrop { background: rgba(30, 36, 22, 0.5); backdrop-filter: blur(2px); }
.dialog-pad { padding: 22px; }
.dialog-pad h2 { font-size: 1.15rem; }
.dialog-pad p { margin-top: 6px; color: var(--muted); font-size: 0.88rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------------------------------------------------------------- palette */

.palette {
  max-width: 620px;
  width: calc(100vw - 32px);
  margin: 12vh auto auto;
  max-height: 68vh;
  overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; }
.palette:not([open]) { display: none; }
.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.palette-input svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 18px; }
.palette-input input {
  border: 0; box-shadow: none; padding: 0; min-height: 24px;
  font-size: 1rem; background: transparent;
}
.palette-input input:focus { box-shadow: none; border: 0; }
.palette-input kbd {
  font-family: var(--font-body); font-size: 0.7rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px;
  background: var(--surface-2);
}
.palette-list { overflow-y: auto; padding: 6px; }
.palette-group { padding: 8px 10px 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.palette-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px; background: transparent;
  text-align: left; cursor: pointer; font-size: 0.9rem;
}
.palette-item svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 16px; }
.palette-item .hint { margin-left: auto; font-size: 0.74rem; color: var(--muted); }
.palette-item[data-active="true"], .palette-item:hover { background: var(--surface-2); }
.palette-item .thumb-mini {
  width: 34px; height: 20px; border-radius: 3px; flex: 0 0 34px;
  background: linear-gradient(150deg, #35571c, #16240f);
}
.palette-empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 0.88rem; }

/* ----------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  z-index: 150;
  right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--brand-deep);
  color: var(--cream-ink);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  animation: toast-in 180ms ease both;
}
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; color: var(--gold); }
.toast.error { background: #5c1f16; }
.toast.error svg { color: #ffb4a6; }
.toast button {
  margin-left: auto; border: 0; background: transparent; color: inherit;
  opacity: 0.6; cursor: pointer; padding: 0; line-height: 0;
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- banners */

.banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: 0.84rem;
}
.banner svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--warn); }
.banner b { color: var(--fg); }
.banner .btn { margin-left: auto; }

.fine svg, .fine-strong svg { display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* ------------------------------------------------------------------ charts */

.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.8; }
.chart .labels { font-family: var(--font-body); font-size: 10px; fill: var(--muted); }
.chart .area { fill: url(#areaGrad); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.76rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 56px; align-items: center; gap: 10px; font-size: 0.82rem; }
.bar-row .name { color: var(--muted-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 600; }

/* ---------------------------------------------------------------- channel */

.channel-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.channel-cover {
  height: 132px;
  background:
    radial-gradient(120% 150% at 15% 0%, rgba(212, 168, 67, 0.4) 0%, rgba(212, 168, 67, 0) 55%),
    linear-gradient(120deg, var(--brand) 0%, var(--brand-deep) 100%);
  position: relative;
}
.channel-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.channel-identity {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0 20px 16px;
  background: var(--surface);
  position: relative;
}
.channel-avatar {
  width: 74px; height: 74px;
  border-radius: 18px;
  border: 3px solid var(--surface);
  background: linear-gradient(150deg, var(--gold), #b5882c);
  color: var(--brand-deep);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  flex: 0 0 74px;
  margin-top: -34px;
  box-shadow: var(--shadow-sm);
}
.channel-identity h2 { font-size: 1.35rem; }
.channel-identity .fine { margin-top: 2px; }

.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-video { border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.mini-video .art { position: relative; aspect-ratio: 16/9; background: linear-gradient(150deg, #35571c, #16240f); display: grid; place-items: center; color: rgba(245,242,235,.8); }
.mini-video .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-video .art .play-icon { color: rgba(245, 242, 235, 0.6); }
.mini-video .art span { font-family: var(--font-display); font-size: 0.8rem; opacity: .8; }
.mini-video .cap { padding: 6px 8px; font-size: 0.72rem; color: var(--muted-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ money blocks */

.money-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.money-hero .balance {
  padding: 22px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(212, 168, 67, 0.16) 0%, rgba(212, 168, 67, 0) 60%),
    var(--brand-deep);
  color: var(--cream-ink);
}
.money-hero .balance .label { font-size: 0.78rem; color: rgba(245, 242, 235, 0.66); font-weight: 600; letter-spacing: 0.02em; }
.money-hero .balance .amount { font-family: var(--font-display); font-size: 2.5rem; line-height: 1.1; margin-top: 4px; color: #fff; }
.money-hero .balance .amount small { font-size: 1.1rem; color: rgba(245, 242, 235, 0.6); }
.money-hero .balance .split { display: flex; gap: 22px; margin-top: 14px; }
.money-hero .balance .split div span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(245, 242, 235, 0.55); }
.money-hero .balance .split div b { font-size: 0.98rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.money-hero .side { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }

.ledger { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.ledger th {
  text-align: left; padding: 9px 12px; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ledger td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.num, .ledger th.num { text-align: right; }
.ledger .k { font-weight: 600; }

/* --------------------------------------------------------------- channels */

.channel-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.channel-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.7fr) 84px 84px 104px 108px minmax(150px, auto);
  gap: 14px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.channel-row:last-child { border-bottom: 0; }
.channel-row.head {
  background: var(--surface-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 9px;
  padding-bottom: 9px;
}
.channel-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.channel-name .avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gold), #b5882c);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.75rem;
}
.channel-name b { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-name span { display: block; font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-grow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.channel-row .num { font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.channel-row .num small { display: block; font-size: 0.68rem; color: var(--muted); }

@media (max-width: 1000px) {
  .channel-row { grid-template-columns: minmax(150px, 1.6fr) 70px 70px 90px auto; }
  .channel-row .col-held { display: none; }
}
@media (max-width: 720px) {
  .channel-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name actions" "meta actions"; row-gap: 4px; }
  .channel-row.head { display: none; }
  .channel-name { grid-area: name; }
  .channel-row .col-meta { grid-area: meta; display: flex; gap: 12px; }
  .channel-row .col-held, .channel-row .col-videos, .channel-row .col-views, .channel-row .col-status { display: none; }
  .channel-grow { grid-area: actions; }
}

/* ------------------------------------------------------------------ upload */

.upload-target { margin-bottom: 14px; }
.upload-target .field { max-width: 420px; }

/* ------------------------------------------------------------- claim link */

.claim-link {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.claim-link input { font-size: 0.8rem; }

/* --------------------------------------------------------------- utility */

.divider { height: 1px; background: var(--border); border: 0; margin: 18px 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.text-brand { color: var(--brand); }
.text-bad { color: var(--bad); }
.text-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.demo-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-bg); border: 1px solid #eedcb0;
  padding: 2px 7px; border-radius: 999px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .list-head, .list-row { grid-template-columns: 28px minmax(180px, 2.4fr) 104px 96px 72px 96px 40px; }
  .list-head .col-registry, .list-row .col-registry { display: none; }
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--rail-w);
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.2, 0.7, 0.3, 1);
    box-shadow: 24px 0 60px rgba(36, 31, 24, 0.3);
  }
  .rail.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .search-trigger { min-width: 0; }
  .search-trigger .label { display: none; }
  .search-trigger kbd { display: none; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .money-hero { grid-template-columns: minmax(0, 1fr); }
  .list-head { display: none; }
  .list-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "check video menu"
      "check status status";
    row-gap: 6px;
    padding: 12px 14px;
    min-height: 84px;
  }
  .list-row .check { grid-area: check; align-self: center; }
  .list-row .video-cell { grid-area: video; }
  .list-row .col-status { grid-area: status; justify-self: start; }
  .list-row .row-menu { grid-area: menu; align-self: start; }
  .list-row .col-cat, .list-row .col-views, .list-row .col-registry, .list-row .col-date { display: none; }
  .details-grid { grid-template-columns: minmax(0, 1fr); }
  .queue-main { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .topbar { gap: 8px; min-height: 62px; padding: 10px 14px; }
  .topbar-title h1 { font-size: 1.1rem; }
  .topbar-title p { display: none; }
  .topbar .btn-gold .label { display: none; }
  .topbar .btn-gold { width: 40px; padding: 0; border-radius: 999px; }
  .content { padding: 16px 14px 72px; }
  .grid-4 { gap: 10px; }
  .stat-card .value { font-size: 1.45rem; }
  .stat-card .spark { display: none; }
  .view-head h2 { font-size: 1.25rem; }
  .toolbar { padding: 10px; gap: 8px; }
  .segmented {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 14px;
  }
  .segmented button { flex: 0 1 auto; }
  .stat-card .delta { font-size: 0.72rem; }
  .stat-card .delta .fine { display: none; }
  .checklist .go { display: none; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulkbar { bottom: 10px; width: 100%; border-radius: 12px; justify-content: space-between; }
  .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
