:root {
  --bg: #0c0a09;
  --bg-elevated: #15110f;
  --bg-soft: #1d1713;
  --panel: rgba(23, 18, 15, 0.82);
  --panel-strong: rgba(28, 22, 18, 0.94);
  --panel-highlight: rgba(42, 29, 20, 0.96);
  --line: rgba(255, 205, 138, 0.12);
  --line-strong: rgba(255, 205, 138, 0.22);
  --accent: #ffb056;
  --accent-strong: #ff9a3d;
  --accent-soft: #ffd8a8;
  --text: #fff5e8;
  --muted: #d7b692;
  --muted-strong: #b78f66;
  --danger: #ff7e7e;
  --success: #8fdc95;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.32);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 172, 72, 0.17), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(255, 126, 73, 0.12), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(255, 186, 95, 0.07), transparent 28%),
    linear-gradient(160deg, #0b0908 0%, #120d0b 35%, #1a110d 68%, #0e0907 100%);
}

body.overlay-page {
  overflow: hidden;
  background: transparent;
}

body.overlay-page::before {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
}

.page-shell {
  position: relative;
  min-height: 100vh;
}

.stream-alert-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stream-alert-card {
  position: absolute;
  left: 40px;
  bottom: 40px;
  width: min(540px, calc(100vw - 80px));
  padding: 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 205, 138, 0.2);
  background:
    linear-gradient(180deg, rgba(33, 25, 20, 0.92), rgba(16, 12, 10, 0.96)),
    radial-gradient(circle at top right, rgba(255, 176, 86, 0.18), transparent 34%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.stream-alert-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stream-alert-card h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 0.96;
}

.stream-alert-track {
  margin: 0;
  color: var(--accent-soft);
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.3;
}

.stream-alert-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stream-alert-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.stack {
  display: grid;
  gap: 24px;
  padding-bottom: 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  padding: 42px 0 28px;
}

.hero.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.hero-main,
.hero > div:first-child,
.hero-side-card,
.hero nav {
  position: relative;
  z-index: 1;
}

.hero > div:first-child,
.hero-main,
.hero-side-card {
  background: linear-gradient(180deg, rgba(33, 25, 20, 0.78), rgba(20, 16, 13, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero > div:first-child,
.hero-main {
  padding: 30px;
}

.hero-side-card {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-self: stretch;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-pill,
.badge,
.total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.hero-pill,
.badge-soft {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--accent-soft);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--accent-soft);
  text-transform: uppercase;
}

.hero h1,
.summary-card h2,
.winner-card h3,
.section-head h2,
.feature-card h3,
.admin-card h3,
.demo-top h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 0.94;
  max-width: 14ch;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ghost-link,
.action-button,
button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.ghost-link:hover,
.action-button:hover,
button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 174, 86, 0.18), rgba(255, 174, 86, 0.08));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.ghost-link:focus-visible,
.action-button:focus-visible,
button:focus-visible,
.judge-input:focus-visible,
.score-input:focus-visible {
  outline: 2px solid rgba(255, 176, 86, 0.6);
  outline-offset: 2px;
}

.summary-card,
.winner-card,
.demo-card,
.feature-card,
.admin-card,
.section-head-card {
  background: linear-gradient(180deg, rgba(27, 21, 17, 0.88), rgba(20, 16, 13, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  padding: 22px;
}

.premium-summary {
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
}

.summary-metric {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
}

.summary-metric.emphasis {
  background: linear-gradient(145deg, rgba(255, 176, 86, 0.16), rgba(255, 255, 255, 0.03));
}

.summary-metric.warning {
  background: linear-gradient(145deg, rgba(255, 117, 117, 0.14), rgba(255, 176, 86, 0.05));
  border-color: rgba(255, 117, 117, 0.14);
}

.label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
}

.value {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.value-xl {
  font-size: 38px;
}

.winner-card,
.section-head-card {
  padding: 24px;
}

.premium-card {
  background: linear-gradient(135deg, rgba(255, 176, 86, 0.16), rgba(255, 255, 255, 0.03));
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.demo-grid,
.admin-card-grid,
.feature-grid {
  display: grid;
  gap: 18px;
}

.demo-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.admin-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.demo-card,
.admin-card,
.feature-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.demo-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.demo-top h3,
.feature-card h3,
.admin-card h3,
.hero-side-card h3 {
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent-soft);
}

.badge-status {
  background: rgba(255, 176, 86, 0.14);
  border-color: rgba(255, 176, 86, 0.18);
}

.meta-list,
.score-list,
.asset-stack,
.compact-list {
  display: grid;
  gap: 10px;
}

.meta-row,
.score-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  font-size: 14px;
}

.meta-row span:first-child,
.score-row span:first-child {
  color: var(--muted);
  min-width: 110px;
}

.meta-row span:last-child,
.score-row span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.inline-link {
  color: var(--accent-soft);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.judge-tools {
  align-items: end;
}

.judge-input,
.score-input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 13px 14px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.judge-input:hover,
.score-input:hover {
  border-color: var(--line-strong);
}

.judge-input:focus,
.score-input:focus {
  border-color: rgba(255, 176, 86, 0.44);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 176, 86, 0.08);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.score-item {
  display: grid;
  gap: 8px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-actions-primary {
  align-items: center;
}

.total-pill {
  background: rgba(143, 220, 149, 0.12);
  border: 1px solid rgba(143, 220, 149, 0.1);
  color: var(--success);
  font-size: 13px;
  white-space: normal;
  line-height: 1.4;
}

.status-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.status-text.error,
.error {
  color: var(--danger);
}

.content-text {
  overflow-wrap: anywhere;
}

.admin-tabs {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 11, 9, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.tab-button {
  flex: 1 1 220px;
  justify-content: center;
}

.tab-button.is-active {
  background: linear-gradient(180deg, rgba(255, 176, 86, 0.28), rgba(255, 154, 61, 0.12));
  border-color: rgba(255, 205, 138, 0.42);
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: grid;
  gap: 20px;
}

.reply-form,
.release-status-form {
  display: grid;
  gap: 12px;
}

.release-status-form {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cover-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.judge-inline-box {
  width: min(320px, 100%);
}

code {
  font-family: Consolas, monospace;
  font-size: 13px;
  color: var(--accent-soft);
}

audio {
  width: 100%;
}

textarea.judge-input {
  min-height: 96px;
  resize: vertical;
}

select.judge-input {
  appearance: none;
}

.admin-shell .hero-copy {
  max-width: 58ch;
}

.admin-stack {
  padding-bottom: 56px;
}

@media (max-width: 1080px) {
  .hero,
  .hero.compact {
    grid-template-columns: 1fr;
  }

  .premium-summary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100%, calc(100% - 24px));
  }

  .hero,
  .section-head,
  .demo-top {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero > div:first-child,
  .hero-main,
  .hero-side-card,
  .summary-card,
  .winner-card,
  .demo-card,
  .admin-card,
  .feature-card,
  .section-head-card {
    border-radius: 22px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(30px, 10vw, 46px);
  }

  .score-grid,
  .summary-card,
  .admin-card-grid,
  .demo-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    border-radius: 24px;
    position: static;
  }

  .tab-button {
    flex-basis: 100%;
  }

  .meta-row,
  .score-row {
    flex-direction: column;
  }

  .meta-row span:last-child,
  .score-row span:last-child {
    text-align: left;
  }
}

.card-section {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.audio-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 176, 86, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 176, 86, 0.08), rgba(255, 255, 255, 0.03));
}

.audio-panel-fallback {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
}

.audio-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.audio-panel-head h4 {
  margin: 0;
  font-size: 20px;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.audio-play-button {
  min-width: 92px;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 176, 86, 0.24), rgba(255, 154, 61, 0.12));
  border-color: rgba(255, 176, 86, 0.26);
}

.audio-progress-wrap {
  flex: 1 1 280px;
  display: grid;
  gap: 8px;
}

.audio-progress {
  width: 100%;
  accent-color: var(--accent);
}

.audio-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.audio-link {
  padding: 10px 14px;
}

.history-toggle-button {
  min-width: 180px;
}

.history-shell {
  display: grid;
  gap: 12px;
}

.history-panel {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.profile-panel {
  padding: 16px;
  border: 1px solid rgba(255, 176, 86, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 176, 86, 0.08), rgba(255, 255, 255, 0.03));
}

.insight-panel {
  padding: 16px;
  border: 1px solid rgba(143, 220, 149, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(143, 220, 149, 0.08), rgba(255, 255, 255, 0.03));
}

.profile-summary {
  display: grid;
  gap: 16px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.profile-stat {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-stat span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-stat strong {
  font-size: 20px;
  color: var(--text);
}

.profile-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-section {
  display: grid;
  gap: 12px;
}

.profile-interest-list,
.profile-recommendations {
  display: grid;
  gap: 10px;
}

.profile-interest {
  display: grid;
  gap: 8px;
}

.profile-interest-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
}

.profile-interest-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.profile-interest-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 176, 86, 0.82), rgba(255, 154, 61, 0.92));
}

.profile-recommendation {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-entry {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.025);
}

.history-entry-user {
  border-color: rgba(255, 176, 86, 0.12);
}

.history-entry-admin,
.history-entry-bot {
  border-color: rgba(143, 220, 149, 0.12);
}

.history-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.history-meta,
.history-kind {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.history-text {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.compact-empty {
  padding: 18px;
}

.has-audio-error {
  border-color: rgba(255, 126, 126, 0.18);
}

.release-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.release-main-column {
  display: grid;
  gap: 16px;
}

.cover-panel {
  display: grid;
  gap: 12px;
}

.cover-panel-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-card-wide {
  gap: 18px;
}

@media (max-width: 900px) {
  .release-media-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .audio-panel-head,
  .audio-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
}

#releaseGrid {
  grid-template-columns: repeat(auto-fit, minmax(540px, 1fr));
}

.release-media-layout {
  grid-template-columns: 1fr;
}

.cover-panel {
  order: -1;
  justify-items: center;
}

.cover-preview {
  width: min(100%, 260px);
  max-width: 260px;
  max-height: 260px;
}

.audio-panel {
  overflow: hidden;
}

.audio-panel .status-text,
.audio-panel h4,
.audio-panel .label {
  max-width: 100%;
}

.audio-controls-row .ghost-link {
  margin-left: auto;
}

@media (max-width: 1180px) {
  #releaseGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #releaseGrid {
    grid-template-columns: 1fr;
  }

  .cover-preview {
    width: min(100%, 220px);
    max-width: 220px;
    max-height: 220px;
  }

  .audio-controls-row .ghost-link {
    margin-left: 0;
  }
}

.leads-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.ai-sales-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.lead-card {
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 176, 86, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(27, 21, 17, 0.9), rgba(18, 15, 12, 0.96));
}

.ai-sales-card {
  background:
    radial-gradient(circle at top right, rgba(143, 220, 149, 0.12), transparent 24%),
    radial-gradient(circle at top left, rgba(255, 176, 86, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(26, 22, 18, 0.95), rgba(17, 15, 12, 0.98));
  border-color: rgba(143, 220, 149, 0.12);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.26);
}

.ai-sales-card.ai-sales-critical {
  border-color: rgba(255, 117, 117, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 117, 117, 0.08);
}

.ai-sales-card.ai-sales-hot {
  border-color: rgba(255, 176, 86, 0.24);
}

.ai-sales-card.ai-sales-warm {
  border-color: rgba(255, 215, 128, 0.18);
}

.section-head-compact {
  padding: 22px 24px;
}

.lead-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.lead-card-title {
  display: grid;
  gap: 8px;
}

.lead-head-side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.lead-score-box {
  display: grid;
  gap: 4px;
  min-width: 110px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 176, 86, 0.16);
  background: rgba(255, 176, 86, 0.08);
  text-align: right;
}

.lead-score-box strong {
  font-size: 28px;
  line-height: 1;
}

.lead-insight-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-priority {
  background: rgba(143, 220, 149, 0.14);
  border: 1px solid rgba(143, 220, 149, 0.16);
  color: var(--success);
}

.badge-heat {
  background: rgba(255, 176, 86, 0.14);
  border: 1px solid rgba(255, 176, 86, 0.18);
  color: var(--accent);
}

.badge-heat.badge-critical {
  background: rgba(255, 117, 117, 0.16);
  border-color: rgba(255, 117, 117, 0.24);
  color: #ff9f9f;
}

.badge-heat.badge-hot {
  background: rgba(255, 176, 86, 0.16);
}

.badge-heat.badge-warm {
  background: rgba(255, 215, 128, 0.12);
  border-color: rgba(255, 215, 128, 0.16);
  color: #ffd487;
}

.badge-heat.badge-watch {
  background: rgba(151, 159, 179, 0.12);
  border-color: rgba(151, 159, 179, 0.14);
  color: var(--muted);
}

.badge-alert {
  background: rgba(255, 117, 117, 0.16);
  border: 1px solid rgba(255, 117, 117, 0.24);
  color: #ffb1b1;
}

.compact-actions {
  justify-content: flex-start;
}

.offer-quick-button {
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 14px;
}

.ai-sales-quick-actions {
  justify-content: flex-start;
}

.lead-ai-summary {
  display: grid;
  gap: 8px;
}

.status-urgent {
  color: #ffb4a4;
}

.today-focus-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-color: rgba(255, 117, 117, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 117, 117, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(29, 22, 18, 0.96), rgba(20, 16, 13, 0.98));
}

.today-focus-list {
  display: grid;
  gap: 14px;
}

.today-focus-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.today-focus-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.today-focus-rank {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
  color: #fff4e7;
  background: linear-gradient(145deg, rgba(255, 176, 86, 0.24), rgba(255, 117, 117, 0.24));
  border: 1px solid rgba(255, 176, 86, 0.18);
}

.today-focus-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.today-focus-actions {
  justify-content: flex-start;
}

.followup-pipeline-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-color: rgba(143, 220, 149, 0.14);
  background:
    radial-gradient(circle at top right, rgba(143, 220, 149, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(26, 22, 18, 0.96), rgba(18, 15, 12, 0.98));
}

.followup-task-card.followup-task-critical,
.followup-mini-card.followup-mini-critical {
  border-color: rgba(255, 117, 117, 0.22);
  background: linear-gradient(180deg, rgba(54, 24, 24, 0.42), rgba(255, 255, 255, 0.02));
}

.followup-task-card.followup-task-hot,
.followup-mini-card.followup-mini-hot {
  border-color: rgba(255, 176, 86, 0.24);
  background: linear-gradient(180deg, rgba(65, 39, 21, 0.4), rgba(255, 255, 255, 0.02));
}

.followup-task-card.followup-task-warm,
.followup-mini-card.followup-mini-warm {
  border-color: rgba(255, 215, 128, 0.18);
}

.followup-mini-card {
  border-width: 1px;
}

.campaign-center-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-color: rgba(255, 176, 86, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 176, 86, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(28, 22, 18, 0.96), rgba(19, 16, 13, 0.98));
}

.campaign-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.campaign-card {
  display: grid;
  gap: 16px;
}

.campaign-card.campaign-critical {
  border-color: rgba(255, 117, 117, 0.24);
}

.campaign-card.campaign-hot {
  border-color: rgba(255, 176, 86, 0.22);
}

.campaign-card.campaign-warm {
  border-color: rgba(255, 215, 128, 0.16);
}

.campaign-card.campaign-watch {
  border-color: rgba(255, 255, 255, 0.06);
}

.campaign-count-box {
  min-width: 92px;
}

.campaign-recipient-list {
  display: grid;
  gap: 12px;
}

.campaign-recipient {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.campaign-recipient-copy {
  display: grid;
  gap: 8px;
}

.campaign-recipient-actions {
  justify-content: flex-start;
}

.campaign-sequence {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.campaign-sequence li {
  line-height: 1.55;
}

.crm-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr minmax(420px, 760px);
}

.crm-drawer[hidden] {
  display: none !important;
}

.crm-drawer-backdrop {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(5, 6, 8, 0.56);
  backdrop-filter: blur(4px);
  box-shadow: none;
}

.crm-drawer-panel {
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top right, rgba(255, 176, 86, 0.1), transparent 24%),
    radial-gradient(circle at top left, rgba(143, 220, 149, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(19, 16, 13, 0.98), rgba(13, 12, 10, 1));
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.28);
}

.crm-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 24px 18px;
  background: rgba(18, 15, 12, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-close-button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
}

.crm-drawer-body {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.crm-hero-card,
.crm-section-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.crm-hero-card {
  background:
    radial-gradient(circle at top right, rgba(255, 176, 86, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(32, 24, 19, 0.96), rgba(19, 16, 13, 0.98));
}

.crm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.crm-columns {
  display: grid;
  gap: 16px;
}

.crm-mini-list {
  display: grid;
  gap: 10px;
}

.crm-mini-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.crm-follow-grid {
  display: grid;
  gap: 12px;
}

.crm-follow-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.crm-follow-primary {
  border-color: rgba(255, 176, 86, 0.16);
  background: linear-gradient(180deg, rgba(255, 176, 86, 0.08), rgba(255, 255, 255, 0.02));
}

.crm-follow-secondary {
  border-color: rgba(143, 220, 149, 0.16);
  background: linear-gradient(180deg, rgba(143, 220, 149, 0.08), rgba(255, 255, 255, 0.02));
}

.crm-follow-soft {
  border-color: rgba(151, 159, 179, 0.16);
}

body.drawer-open {
  overflow: hidden;
}

.storage-meta-block {
  display: grid;
  gap: 8px;
}

.insight-plan {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.insight-plan li {
  line-height: 1.55;
}

@media (max-width: 980px) {
  .leads-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .lead-card-head {
    flex-direction: column;
  }

  .lead-head-side {
    justify-items: start;
  }

  .lead-score-box {
    text-align: left;
  }

  .today-focus-main {
    flex-direction: column;
  }

  .crm-drawer {
    grid-template-columns: 1fr;
  }

  .crm-drawer-panel {
    width: min(100vw, 100%);
  }
}


/* Studio Growth OS */
.tab-button-growth {
  border-color: rgba(143, 220, 149, 0.22);
  color: #c8ffd0;
}

.growth-command-center {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
}

.growth-brand-card,
.growth-console-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(143, 220, 149, 0.16);
  background:
    radial-gradient(circle at 16% 10%, rgba(143, 220, 149, 0.15), transparent 24%),
    radial-gradient(circle at 92% 0%, rgba(255, 176, 86, 0.16), transparent 26%),
    linear-gradient(160deg, rgba(21, 28, 23, 0.96), rgba(19, 16, 13, 0.98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.growth-brand-card h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.95;
  max-width: 12ch;
}

.growth-brand-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.platinum-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #0f0b08;
  background:
    radial-gradient(circle at 30% 20%, #fff0bc, transparent 42%),
    linear-gradient(145deg, #ffb056, #8fdc95);
  box-shadow: 0 18px 42px rgba(143, 220, 149, 0.16);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.growth-score-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid rgba(143, 220, 149, 0.24);
  background:
    radial-gradient(circle, rgba(143, 220, 149, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.03);
}

.growth-score-ring span {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.growth-score-ring small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
}

.growth-quick-grid,
.growth-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.growth-command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.growth-output {
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  color: var(--accent-soft);
  white-space: pre-wrap;
  font-family: "Cascadia Mono", "Consolas", monospace;
  line-height: 1.55;
}

.growth-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.growth-list {
  display: grid;
  gap: 12px;
}

.growth-mini-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.growth-tone-good {
  border-color: rgba(143, 220, 149, 0.22);
  background: linear-gradient(145deg, rgba(143, 220, 149, 0.12), rgba(255, 255, 255, 0.02));
}

.growth-tone-hot {
  border-color: rgba(255, 176, 86, 0.22);
  background: linear-gradient(145deg, rgba(255, 176, 86, 0.14), rgba(255, 255, 255, 0.02));
}

.growth-tone-warning {
  border-color: rgba(255, 117, 117, 0.22);
  background: linear-gradient(145deg, rgba(255, 117, 117, 0.12), rgba(255, 255, 255, 0.02));
}

@media (max-width: 980px) {
  .growth-command-center,
  .growth-two-columns,
  .growth-command-form {
    grid-template-columns: 1fr;
  }
}

/* === MPC / Studio Hardware dark theme for admin === */
body.admin-page {
  background: #0D0F12;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 28px 28px;
  color: #E8EBF1;
}
body.admin-page::before { display: none; }
.admin-page .page-shell { background: transparent; }
.admin-page .hero,
.admin-page .hero > div:first-child,
.admin-page .hero-main,
.admin-page .hero-side-card {
  background: #16191E;
  border: 1px solid #2A2E37;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  backdrop-filter: none;
  color: #E8EBF1;
  border-radius: 12px;
}
.admin-page .hero h1 { color: #F2F4F8; max-width: none; font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; line-height: 1.15; }
.admin-page .hero-copy { color: #9AA3B2; }
.admin-page .eyebrow { color: #00F2FE; letter-spacing: 0.14em; }
.admin-page .hero-pill { background: rgba(0,242,254,0.08); border: 1px solid rgba(0,242,254,0.35); color: #00F2FE; }
.admin-page .ghost-link {
  background: #1C2027; border: 1px solid #2A2E37; color: #E8EBF1; box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.admin-page .ghost-link:hover {
  border-color: rgba(0,242,254,0.6); box-shadow: 0 0 12px rgba(0,242,254,0.25); transform: translateY(-1px);
}
/* MPC display: summary metrics as neon readout */
.admin-page .summary-card,
.admin-page .admin-card,
.admin-page .section-head-card,
.admin-page .winner-card {
  background: #16191E;
  border: 1px solid #2A2E37;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  backdrop-filter: none;
  color: #E8EBF1;
  border-radius: 12px;
}
.admin-page .summary-card {
  background: linear-gradient(180deg, #0A0C10, #10131A);
  border-color: #2A2E37;
  box-shadow: inset 0 0 24px rgba(0,0,0,0.6), 0 8px 28px rgba(0,0,0,0.5);
}
.admin-page .summary-metric {
  background: rgba(255,255,255,0.02); border: 1px solid #2A2E37; border-radius: 12px;
}
.admin-page .summary-metric.emphasis { background: rgba(0,242,254,0.06); border-color: rgba(0,242,254,0.35); }
.admin-page .summary-metric.warning { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.4); }
.admin-page .label { color: #9AA3B2; }
.admin-page .value {
  color: #00F2FE;
  font-family: "JetBrains Mono", Consolas, "Roboto Mono", monospace;
  text-shadow: 0 0 12px rgba(0,242,254,0.45);
}
.admin-page .status-text { color: #9AA3B2; }
.admin-page .content-text { color: #C9D0DB; }
.admin-page .admin-tabs {
  background: #16191E; border: 1px solid #2A2E37; box-shadow: 0 8px 28px rgba(0,0,0,0.5); backdrop-filter: none; border-radius: 12px; top: 8px;
}
.admin-page .tab-button { background: #1C2027; border: 1px solid #2A2E37; color: #C9D0DB; border-radius: 999px; transition: all 0.2s ease; }
.admin-page .tab-button:hover { border-color: rgba(0,242,254,0.5); color: #00F2FE; }
.admin-page .tab-button.is-active { background: rgba(0,242,254,0.12); border-color: #00F2FE; color: #00F2FE; box-shadow: 0 0 14px rgba(0,242,254,0.3); }
.admin-page .tab-button-growth { border-color: rgba(139,92,246,0.4); color: #C9D0DB; }
.admin-page .tab-button-growth.is-active { background: rgba(139,92,246,0.14); border-color: #8B5CF6; color: #B7A6FF; box-shadow: 0 0 14px rgba(139,92,246,0.35); }
/* Status pads with glow */
.admin-page .badge-soft { background: #1C2027; border: 1px solid #2A2E37; color: #C9D0DB; }
.admin-page .badge-heat { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.45); color: #FBBF24; }
.admin-page .badge-alert { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.5); color: #F87171; box-shadow: 0 0 10px rgba(248,113,113,0.3); }
.admin-page .badge-status { background: rgba(0,242,254,0.08); border: 1px solid rgba(0,242,254,0.45); color: #00F2FE; box-shadow: 0 0 10px rgba(0,242,254,0.25); }
.admin-page .badge-status.st-green { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.55); color: #34D399; box-shadow: 0 0 10px rgba(16,185,129,0.3); }
.admin-page .badge-status.st-amber { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.55); color: #FBBF24; box-shadow: 0 0 10px rgba(245,158,11,0.3); }
.admin-page .badge-status.st-purple { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.55); color: #B7A6FF; box-shadow: 0 0 10px rgba(139,92,246,0.35); }
.admin-page .badge-status.st-red { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.55); color: #F87171; box-shadow: 0 0 10px rgba(248,113,113,0.35); }
.admin-page .empty-state { background: #16191E; border: 1px solid #2A2E37; color: #9AA3B2; }
.admin-page .judge-input { background: #0F1216; border: 1px solid #2A2E37; color: #E8EBF1; }
.admin-page .judge-input:focus { background: #0F1216; border-color: #00F2FE; box-shadow: 0 0 0 3px rgba(0,242,254,0.15); }
/* Neon action buttons */
.admin-page .card-actions button,
.admin-page .release-status-form button[type="submit"],
.admin-page .growth-command-form button[type="submit"],
.admin-page .release-track-upload-form button[type="submit"] {
  background: rgba(0,242,254,0.1); border: 1px solid rgba(0,242,254,0.5); color: #00F2FE;
  transition: all 0.2s ease; cursor: pointer;
}
.admin-page .card-actions button:hover,
.admin-page .release-status-form button[type="submit"]:hover,
.admin-page .growth-command-form button[type="submit"]:hover,
.admin-page .release-track-upload-form button[type="submit"]:hover {
  background: rgba(0,242,254,0.18); box-shadow: 0 0 14px rgba(0,242,254,0.35); transform: translateY(-1px);
}
.admin-page .card-actions-primary button:last-child { border-color: rgba(139,92,246,0.5); color: #B7A6FF; background: rgba(139,92,246,0.1); }
/* Studio player: neon progress + peak meter while playing */
.admin-page .audio-progress { accent-color: #00F2FE; }
.admin-page .audio-play-button { position: relative; overflow: hidden; }
.admin-page .audio-panel.is-playing { border-color: rgba(0,242,254,0.5); box-shadow: 0 0 18px rgba(0,242,254,0.2); }
.admin-page .audio-panel.is-playing .audio-play-button {
  border-color: #00F2FE; color: #00F2FE; box-shadow: 0 0 14px rgba(0,242,254,0.4);
}
.admin-page .audio-panel.is-playing .audio-play-button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg, #00F2FE 0 6px, transparent 6px 10px);
  background-size: 200% 100%; animation: mpc-peak 0.7s linear infinite;
}
@keyframes mpc-peak { from { background-position: 0 0; } to { background-position: -40px 0; } }
/* Mono data readouts */
.admin-page .pkg-row span:last-child,
.admin-page .meta-row span:last-child,
.admin-page .total-pill {
  font-family: "JetBrains Mono", Consolas, "Roboto Mono", monospace;
  font-size: 12.5px;
}
.admin-page .pkg-row { background: #10131A; border-color: #2A2E37; }
.admin-page .pkg-ok { background: rgba(16,185,129,0.12); color: #34D399; border: 1px solid rgba(16,185,129,0.4); }
.admin-page .pkg-missing { background: rgba(245,158,11,0.12); color: #FBBF24; border: 1px solid rgba(245,158,11,0.35); }
.admin-page .pkg-details summary { color: #00F2FE; }
.admin-page .cover-preview { border: 1px solid #2A2E37; box-shadow: 0 0 18px rgba(0,242,254,0.12); }
.admin-page .pkg-dot:focus-visible,
.admin-page .admin-card-wide:focus-visible { outline: 2px solid #00F2FE; }

/* Пакет заявки — понятный чек-лист */
.pkg-section { display: grid; gap: 12px; }
.pkg-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pkg-row { align-items: center; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 8px 10px; background: rgba(255,255,255,0.02); }
.admin-page .pkg-row { background: #10131A; border-color: #2A2E37; }
.pkg-row.is-missing { opacity: 0.85; }
.pkg-dot { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 700; flex-shrink: 0; cursor: help; transition: background 0.15s, transform 0.15s; position: relative; }
.pkg-dot::after { content: attr(data-tooltip); position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); background: #212529; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 10px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.pkg-dot:hover::after { opacity: 1; }
.pkg-dot:focus-visible { outline: 2px solid #00F2FE; outline-offset: 2px; }
.pkg-ok { background: rgba(143,220,149,0.18); color: #1a7f37; border: 1px solid rgba(143,220,149,0.4); }
.pkg-missing { background: rgba(255,176,86,0.16); color: #9a6700; border: 1px solid rgba(255,176,86,0.35); }
.pkg-lyrics { margin-top: 4px; }
.pkg-details summary { cursor: pointer; color: var(--accent-soft); }
.admin-page .pkg-details summary { color: #00F2FE; }
.release-side-column { display: grid; gap: 16px; align-content: start; }

.admin-card-wide { transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.admin-card-wide:hover { border-color: rgba(0,242,254,0.45); box-shadow: 0 0 18px rgba(0,242,254,0.12), 0 8px 28px rgba(0,0,0,0.5); transform: translateY(-2px); }
.admin-card-wide:focus-visible { outline: 2px solid #00F2FE; outline-offset: 2px; border-radius: 8px; }

@media (max-width: 768px) {
  .pkg-grid { grid-template-columns: 1fr; max-width: 100%; }
  .release-side-column { grid-template-columns: 1fr; }
  .admin-card-wide { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #2A2E37; }
}

/* === Master-detail: ticket sidebar + workspace === */
.master-detail { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.ticket-sidebar {
  position: sticky; top: 76px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px;
  max-height: calc(100vh - 140px); min-width: 0;
}
.ticket-search {
  position: sticky; top: 0; z-index: 2; display: grid; gap: 8px;
  background: #0D0F12; padding-bottom: 6px;
}
.release-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.release-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: #16191E; border: 1px solid #2A2E37; border-radius: 20px;
  padding: 4px 9px; font-size: 11px; font-weight: 500; color: #9AA3B2;
  cursor: pointer; transition: border-color 0.15s, color 0.15s, background-color 0.15s, transform 0.15s;
  user-select: none; font-family: inherit;
}
.release-tab:hover {
  border-color: rgba(0, 242, 254, 0.4); color: #E8EBF1; transform: translateY(-1px);
}
.release-tab.is-active {
  background: rgba(0, 242, 254, 0.12); border-color: #00F2FE; color: #00F2FE; font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}
.release-tab .tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 16px; padding: 0 5px;
  border-radius: 10px; font-size: 10px; font-weight: 700;
  background: rgba(255, 255, 255, 0.08); color: #9AA3B2;
  transition: background-color 0.15s, color 0.15s;
}
.release-tab.is-active .tab-count {
  background: #00F2FE; color: #0D0F12;
}
.ticket-list { display: grid; gap: 10px; align-content: start; overflow-y: auto; min-height: 0; padding-right: 4px; }
.ticket {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center;
  background: #16191E; border: 1px solid #2A2E37; border-radius: 12px; padding: 10px 12px;
  cursor: pointer; text-align: left; color: #E8EBF1; font: inherit; min-width: 0; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ticket:hover { border-color: rgba(0,242,254,0.5); transform: translateY(-1px); }
.ticket.is-active { border-color: #00F2FE; box-shadow: 0 0 14px rgba(0,242,254,0.3); background: #10131A; }
.ticket .badge { grid-row: span 2; justify-self: start; white-space: nowrap; }
.ticket-main { display: grid; gap: 2px; min-width: 0; }
.ticket-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ticket-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9AA3B2; font-size: 12px; }
.ticket-meta { grid-column: 2; display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.ticket-meta code { font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; color: #00F2FE; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-meta small { color: #9AA3B2; font-size: 11px; white-space: nowrap; }
div.ticket { cursor: default; }
div.ticket:hover { transform: none; }
.ticket-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ticket-tags .badge { font-size: 11px; }
.ticket-workspace { min-width: 0; display: grid; gap: 12px; align-content: start; }
.ticket-workspace .workspace-empty { margin: 0; }
.workspace-bar { display: flex; align-items: center; gap: 12px; }
.workspace-bar .status-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-bar .workspace-back { display: none; }
@media (max-width: 1024px) {
  .master-detail { grid-template-columns: minmax(0, 1fr); }
  .ticket-sidebar { position: static; max-height: none; }
  .ticket-list { max-height: 40vh; }
  .ticket-workspace { display: none; }
  .ticket-workspace.is-open {
    display: grid; position: fixed; inset: 0; z-index: 200; overflow-y: auto;
    background: #0D0F12; padding: 12px;
  }
  .ticket-workspace.is-open .workspace-back { display: inline-flex; }
}
/* === Release split-view: chat left, data right === */
#releaseGrid, #genGrid { grid-template-columns: minmax(0, 1fr); }
.release-split-card { min-width: 0; }
.release-split { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; align-items: start; }
.ticket-workspace .release-split { grid-template-columns: 340px minmax(0, 1fr); }
.release-data-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.release-data-col > * { min-width: 0; }
.release-split-card .demo-top > div { min-width: 0; }
.pkg-grid, .pkg-row > span, .meta-row > span, .chat-col-head > div { min-width: 0; }
.pkg-row > span, .meta-row > span { overflow-wrap: anywhere; white-space: normal; }
.release-chat-col { min-width: 0; max-width: 100%; box-sizing: border-box; z-index: 1; }
.release-chat-col .history-entry { overflow-wrap: anywhere; }
.admin-page .admin-tabs { z-index: 50; margin-bottom: 4px; }
.release-data-col .release-status-form { margin: 0; padding-top: 0; border-top: none; }
.release-chat-col {
  position: sticky; top: 76px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px;
  background: #10131A; border: 1px solid #2A2E37; border-radius: 12px; padding: 12px;
  max-height: calc(100vh - 140px);
}
.chat-col-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.chat-col-head h4 { margin: 2px 0 0; font-size: 17px; color: #F2F4F8; }
.chat-history-wrap { min-height: 0; display: grid; }
.release-chat-col .history-shell { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
.release-chat-col .history-shell .card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.release-chat-col .history-toggle-button { font-size: 12px; padding: 6px 10px; }
.release-chat-col .history-panel:not([hidden]) {
  display: block; min-height: 0; max-height: 46vh; overflow-y: auto;
  background: #0A0C10; border: 1px solid #2A2E37; border-radius: 10px; padding: 10px;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.55);
}
.release-chat-col .history-list { max-height: none; overflow: visible; }
.release-chat-col .history-entry { max-width: 88%; }
.release-chat-col .history-entry-user { justify-self: start; background: #1C2027; border-color: #2A2E37; }
.release-chat-col .history-entry-admin { justify-self: end; background: rgba(0,242,254,0.07); border-color: rgba(0,242,254,0.4); }
.release-chat-col .history-entry-bot { justify-self: end; background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.4); }
.chat-reply-wrap .reply-form { display: grid; gap: 8px; }
.chat-reply-wrap .reply-form textarea { min-height: 64px; resize: vertical; }
/* Compact media strip */
.media-strip { display: grid; gap: 12px; }
.media-strip-covers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 150px)); gap: 12px; }
.media-strip .cover-preview { width: 100%; height: 120px; object-fit: cover; }
.media-strip .cover-panel p { display: none; }
/* MPC accordions for long blocks */
.mpc-accordion { border: 1px solid #2A2E37; border-radius: 12px; background: #10131A; }
.mpc-accordion > summary {
  cursor: pointer; padding: 10px 14px; color: #00F2FE; font-weight: 600; font-size: 14px;
  list-style: none; display: flex; align-items: center; gap: 8px; user-select: none;
}
.mpc-accordion > summary::-webkit-details-marker { display: none; }
.mpc-accordion > summary::before { content: "▶"; font-size: 10px; transition: transform 0.15s; color: #00F2FE; }
.mpc-accordion[open] > summary::before { transform: rotate(90deg); }
.mpc-accordion > summary:hover { text-shadow: 0 0 10px rgba(0,242,254,0.4); }
.mpc-accordion .card-section, .mpc-accordion .asset-stack { border: none; background: none; padding: 0 14px 14px; }
@media (max-width: 1100px) {
  .release-split { grid-template-columns: 1fr; }
  .release-chat-col { position: static; max-height: none; }
  .release-chat-col .history-panel:not([hidden]) { max-height: 320px; }
}
