:root {
  --bg-0: #08080a;
  --bg-1: #0f1014;
  --bg-2: #171820;
  --panel: rgba(18, 19, 26, 0.88);
  --panel-strong: rgba(25, 26, 35, 0.95);
  --line: #2e303c;
  --line-strong: #45495c;
  --ink: #f6f7fb;
  --muted: #b4b8c8;
  --accent: #ff7b1c;
  --accent-strong: #ff9d56;
  --accent-soft: rgba(255, 123, 28, 0.18);
  --danger: #cb3748;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", "Space Grotesk", "Avenir Next", sans-serif;
  background:
    radial-gradient(circle at 8% -10%, rgba(255, 123, 28, 0.22) 0%, transparent 36%),
    radial-gradient(circle at 88% 0%, rgba(255, 123, 28, 0.14) 0%, transparent 30%),
    linear-gradient(170deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
}

body[data-role="admin"] .sidebar {
  background: linear-gradient(180deg, #141016 0%, #0c0a0f 100%);
}

body[data-role="viewer"] .sidebar,
body[data-role="member"] .sidebar,
body[data-role="user"] .sidebar {
  background: linear-gradient(180deg, #11131a 0%, #0b0d13 100%);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #11121a 0%, #0b0c12 100%);
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.4rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #140c07;
  font-weight: 800;
  background: linear-gradient(140deg, var(--accent-strong), var(--accent));
  box-shadow: 0 8px 18px rgba(255, 123, 28, 0.32);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 0.94rem;
  letter-spacing: 0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.73rem;
}

.side-nav {
  display: grid;
  gap: 0.4rem;
}

.nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #d6d8e4;
  border-radius: 10px;
  text-align: left;
  padding: 0.56rem 0.7rem;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.02em;
}

.nav-btn:hover {
  background: #1e202b;
}

.nav-btn.is-active {
  background: linear-gradient(120deg, rgba(255, 123, 28, 0.24), rgba(255, 123, 28, 0.08));
  border-color: rgba(255, 123, 28, 0.46);
  color: #fff5ee;
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #171922;
}

.side-foot small {
  color: var(--muted);
}

.badge {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.26rem 0.58rem;
  width: fit-content;
  font-weight: 700;
  background: #20222f;
}

.badge-admin {
  border-color: rgba(255, 123, 28, 0.6);
  background: linear-gradient(120deg, rgba(255, 123, 28, 0.42), rgba(255, 123, 28, 0.14));
}

.badge-member {
  border-color: #5a65b8;
  background: linear-gradient(120deg, rgba(90, 101, 184, 0.4), rgba(90, 101, 184, 0.15));
}

.badge-guest {
  border-color: #525567;
}

.main {
  padding: 1rem;
  display: grid;
  gap: 0.95rem;
}

.topbar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: min(620px, 48vw);
}

.top-search input {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0.22rem 0 0;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  letter-spacing: 0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.request-state {
  border: 1px solid rgba(255, 123, 28, 0.45);
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  color: #ffd7bd;
  background: rgba(255, 123, 28, 0.14);
}

.status-banner {
  border: 1px solid #3c4256;
  border-radius: 12px;
  padding: 0.55rem 0.72rem;
  font-size: 0.86rem;
}

.status-info {
  background: rgba(64, 117, 201, 0.18);
  border-color: rgba(64, 117, 201, 0.55);
  color: #dbe8ff;
}

.status-success {
  background: rgba(52, 158, 103, 0.18);
  border-color: rgba(52, 158, 103, 0.55);
  color: #ddffef;
}

.status-error {
  background: rgba(203, 55, 72, 0.2);
  border-color: rgba(203, 55, 72, 0.58);
  color: #ffe0e4;
}

.token-line {
  margin: 0;
  color: var(--muted);
}

.token-line code {
  color: #ffbe93;
  font-family: "IBM Plex Mono", "JetBrains Mono", "Fira Code", monospace;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.54rem 0.92rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #fff7f1;
  background: linear-gradient(130deg, #ff9f5e, var(--accent));
  transition: filter 120ms ease, transform 120ms ease;
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn.secondary {
  background: #2a2e3c;
  border-color: #42485a;
  color: #eceef9;
}

.btn.tiny {
  padding: 0.32rem 0.58rem;
  font-size: 0.73rem;
}

.btn.secondary.is-on {
  border-color: rgba(255, 123, 28, 0.7);
  background: linear-gradient(120deg, rgba(255, 123, 28, 0.4), rgba(255, 123, 28, 0.14));
  color: #fff4eb;
}

.btn.danger {
  background: #aa2f3d;
  border-color: #c6394a;
}

.is-hidden {
  display: none !important;
}

.view {
  display: none;
}

.view.is-visible {
  display: grid;
  gap: 0.95rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  background: linear-gradient(180deg, var(--panel-strong) 0%, var(--panel) 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.hero-panel {
  padding: 0;
  overflow: hidden;
}

.home-hero {
  min-height: 250px;
  background:
    linear-gradient(120deg, rgba(255, 123, 28, 0.16), transparent 58%),
    radial-gradient(circle at 78% 12%, rgba(255, 123, 28, 0.22), transparent 42%),
    linear-gradient(180deg, #1c1d29, #12131c);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  padding: 1.15rem;
  display: flex;
  align-items: flex-end;
}

.home-hero-content {
  max-width: min(700px, 95%);
}

.home-hero-kicker {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffc69e;
  font-weight: 700;
}

.home-hero h2 {
  margin: 0.42rem 0 0;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  letter-spacing: 0.02em;
  color: #fff3e8;
}

.home-hero p {
  margin: 0.55rem 0 0;
  color: #e6e9f6;
  line-height: 1.5;
}

.home-stats {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.home-stat {
  border: 1px solid #3a3f50;
  border-radius: 11px;
  padding: 0.48rem 0.54rem;
  background: linear-gradient(180deg, #202432, #181b26);
}

.home-stat-label {
  margin: 0;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c7cbda;
}

.home-stat-value {
  margin: 0.3rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff2e8;
}

h2 {
  margin: 0;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

h2 + * {
  margin-top: 0.7rem;
}

.section-subtitle {
  margin: 0.9rem 0 0.5rem;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d0d4e3;
}

.setup-card {
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 123, 28, 0.48);
  border-radius: 12px;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(255, 123, 28, 0.14), rgba(20, 14, 11, 0.94));
}

.admin-maintenance-banner {
  margin-top: 0.7rem;
}

.dashboard-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.6rem;
}

.dashboard-card {
  border: 1px solid #3c4254;
  border-radius: 12px;
  padding: 0.62rem;
  background: linear-gradient(180deg, #202434, #181b27);
  min-height: 148px;
}

.dashboard-kv {
  display: grid;
  gap: 0.45rem;
}

.dashboard-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #31374a;
  padding-bottom: 0.35rem;
}

.dashboard-kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashboard-kv-key {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c2c8da;
}

.dashboard-kv-value {
  font-size: 0.8rem;
  color: #f5f7ff;
  text-align: right;
}

.dashboard-list {
  display: grid;
  gap: 0.38rem;
}

.dashboard-list-item {
  border: 1px solid #363c4e;
  border-radius: 9px;
  padding: 0.4rem 0.45rem;
  background: #181c29;
}

.dashboard-list-item strong {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: #fff3e8;
}

.dashboard-list-item span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #c8cde0;
}

.dashboard-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-domain-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.admin-domain-card {
  border: 1px solid #383e50;
  border-radius: 11px;
  padding: 0.6rem;
  background: linear-gradient(180deg, #1b1f2d, #151925);
  display: grid;
  gap: 0.4rem;
}

.admin-domain-card h4 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: #ffe7d5;
}

.admin-domain-card p {
  margin: 0;
  font-size: 0.76rem;
  color: #c7cce0;
  line-height: 1.35;
}

.admin-domain-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #475067;
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #e7ecff;
  background: #23283a;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 0.68rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #c5c8d7;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #e4e8f5;
  font-size: 0.88rem;
}

.toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #414555;
  border-radius: 11px;
  background: #171a24;
  color: var(--ink);
  font: inherit;
  padding: 0.62rem 0.68rem;
}

input::placeholder,
textarea::placeholder {
  color: #8f95aa;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
  border-color: rgba(255, 123, 28, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 123, 28, 0.2);
}

textarea {
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin: 0.75rem 0;
}

.playback-quality-field {
  min-width: 220px;
  margin: 0;
}

.playback-audio-field {
  min-width: 240px;
  margin: 0;
}

.playback-subtitle-field {
  min-width: 240px;
  margin: 0;
}

.playback-status-live {
  margin: 0.7rem 0 0.45rem;
  border: 1px solid #3a3f50;
  border-radius: 12px;
  padding: 0.55rem 0.62rem;
  background: linear-gradient(180deg, #171924, #13151e);
}

.status-live-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.status-chip {
  border: 1px solid #4a5063;
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #eceef8;
  background: #232837;
}

.status-chip-muted {
  border-color: #4a5063;
  color: #c6cada;
  background: #222636;
}

.status-chip-info {
  border-color: rgba(64, 117, 201, 0.58);
  color: #dce9ff;
  background: rgba(64, 117, 201, 0.22);
}

.status-chip-warn {
  border-color: rgba(255, 123, 28, 0.65);
  color: #ffe0ca;
  background: rgba(255, 123, 28, 0.23);
}

.status-chip-success {
  border-color: rgba(52, 158, 103, 0.62);
  color: #defeed;
  background: rgba(52, 158, 103, 0.22);
}

.status-chip-error {
  border-color: rgba(203, 55, 72, 0.64);
  color: #ffe1e6;
  background: rgba(203, 55, 72, 0.24);
}

.playback-quick-meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.playback-network-meta {
  margin: 0.36rem 0 0;
  font-size: 0.78rem;
  color: #d8dced;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 0.85rem;
}

.admin-nav-shell {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 310px);
  gap: 0.8rem;
  align-items: start;
}

.admin-module-list {
  margin-left: auto;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  position: sticky;
  top: 0.6rem;
}

.admin-module-list .btn {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
}

.side-admin-modules {
  margin-top: 0.1rem;
  display: grid;
  gap: 0.3rem;
}

.side-admin-group {
  display: grid;
  gap: 0.3rem;
  padding: 0.45rem 0.4rem 0.55rem;
  border: 1px solid rgba(69, 73, 92, 0.42);
  border-radius: 12px;
  background: rgba(20, 21, 30, 0.72);
}

.side-admin-group-title {
  margin: 0 0 0.1rem;
  color: #ffbe93;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-admin-modules .btn {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
}

.admin-panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 0.9rem;
}

.admin-panel-section {
  display: grid;
  gap: 0.8rem;
}

.chip {
  border: 1px solid #474c5e;
  border-radius: 999px;
  background: #222636;
  color: #eef0fb;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.72rem;
  cursor: pointer;
}

.chip.is-active {
  border-color: rgba(255, 123, 28, 0.7);
  background: linear-gradient(120deg, rgba(255, 123, 28, 0.4), rgba(255, 123, 28, 0.15));
}

.chip.muted {
  cursor: default;
  opacity: 0.8;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.65rem;
}

.library-card {
  border: 1px solid #393d4d;
  border-radius: 12px;
  padding: 0.68rem;
  background: linear-gradient(180deg, #232736, #1a1d28);
}

.library-card h3 {
  margin: 0;
  font-size: 1rem;
}

.library-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.access-library-list {
  border: 1px solid #393d4d;
  border-radius: 10px;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.4rem;
  max-height: 180px;
  overflow: auto;
  background: #171a24;
}

.access-library-item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  border: 1px solid #2e3240;
  border-radius: 9px;
  padding: 0.35rem 0.45rem;
  font-size: 0.82rem;
  color: var(--text);
}

.access-library-item input[type="checkbox"] {
  margin-top: 0.15rem;
}

.access-library-item .meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.65rem;
}

.admin-user-card {
  border: 1px solid #393d4d;
  border-radius: 12px;
  padding: 0.68rem;
  background: linear-gradient(180deg, #232736, #1a1d28);
}

.admin-user-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.admin-user-card p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.72rem;
}

.media-strip {
  display: flex;
  gap: 0.72rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scroll-snap-type: x proximity;
}

.media-strip .media-card {
  flex: 0 0 210px;
  max-width: 210px;
  scroll-snap-align: start;
}

.media-card {
  border: 1px solid #393d4d;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #242838, #1a1d29);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.media-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 123, 28, 0.55);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.42);
}

.media-poster-btn {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.media-poster-btn:hover .media-poster {
  filter: brightness(1.08);
}

.media-poster {
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 123, 28, 0.36) 0%, transparent 44%),
    linear-gradient(170deg, #2c3041, #1c1e2a 58%, #11131c 100%);
  border-bottom: 1px solid #363a49;
  background-size: cover;
  background-position: center;
}

.media-body {
  padding: 0.62rem 0.65rem 0.68rem;
}

.media-title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.25;
  color: #ffe2cf;
}

.media-meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.media-collection-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.media-runtime-badge {
  margin: 0.5rem 0 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid #4a5063;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #232837;
  color: #eceef8;
}

.media-runtime-muted {
  border-color: #4a5063;
  color: #c6cada;
  background: #222636;
}

.media-runtime-info {
  border-color: rgba(64, 117, 201, 0.58);
  color: #dce9ff;
  background: rgba(64, 117, 201, 0.22);
}

.media-runtime-warn {
  border-color: rgba(255, 123, 28, 0.65);
  color: #ffe0ca;
  background: rgba(255, 123, 28, 0.23);
}

.media-runtime-success {
  border-color: rgba(52, 158, 103, 0.62);
  color: #defeed;
  background: rgba(52, 158, 103, 0.22);
}

.media-runtime-error {
  border-color: rgba(203, 55, 72, 0.64);
  color: #ffe1e6;
  background: rgba(203, 55, 72, 0.24);
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.72rem;
}

.continue-card {
  border: 1px solid #393d4d;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #242838, #1a1d29);
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: 132px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.continue-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 123, 28, 0.5);
}

.continue-poster {
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 123, 28, 0.36) 0%, transparent 44%),
    linear-gradient(170deg, #2c3041, #1c1e2a 58%, #11131c 100%);
  border-right: 1px solid #363a49;
  background-size: cover;
  background-position: center;
}

.continue-body {
  padding: 0.62rem 0.65rem 0.68rem;
}

.progress-line {
  margin-top: 0.52rem;
  border: 1px solid #3a3f50;
  border-radius: 999px;
  height: 8px;
  background: #14161f;
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff9f5e, var(--accent));
}

.detail-card {
  border: 1px solid #393d4d;
  border-radius: 12px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #232736, #171a25);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 1rem;
}

.detail-poster {
  border: 1px solid #3a3f50;
  border-radius: 10px;
  min-height: 240px;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 123, 28, 0.36) 0%, transparent 44%),
    linear-gradient(170deg, #2c3041, #1c1e2a 58%, #11131c 100%);
  background-size: cover;
  background-position: center;
}

.detail-body {
  min-width: 0;
}

.detail-overview {
  margin-top: 0.7rem;
  color: #f2f4ff;
  line-height: 1.5;
  max-width: 70ch;
}

.detail-pill-row {
  margin-top: 0.52rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.detail-pill {
  border: 1px solid #4a5063;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #e5e8f6;
  background: #252a3a;
}

.diag-summary {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.diag-check-grid {
  margin: 0.6rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.55rem;
}

.diag-check {
  border: 1px solid #3f4558;
  border-radius: 11px;
  padding: 0.58rem;
  background: linear-gradient(180deg, #1d2130, #171a26);
}

.diag-check h4 {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.diag-check p {
  margin: 0.42rem 0 0;
  color: #d9ddec;
  font-size: 0.78rem;
  line-height: 1.35;
}

.diag-check-pass {
  border-color: rgba(52, 158, 103, 0.56);
  background: linear-gradient(180deg, rgba(52, 158, 103, 0.2), rgba(22, 33, 26, 0.95));
}

.diag-check-warn {
  border-color: rgba(255, 123, 28, 0.62);
  background: linear-gradient(180deg, rgba(255, 123, 28, 0.2), rgba(35, 26, 18, 0.95));
}

.diag-check-fail {
  border-color: rgba(203, 55, 72, 0.62);
  background: linear-gradient(180deg, rgba(203, 55, 72, 0.24), rgba(37, 20, 24, 0.95));
}

.out {
  margin: 0.6rem 0 0;
  min-height: 3.5rem;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #3a3f50;
  border-radius: 11px;
  padding: 0.6rem;
  background: linear-gradient(180deg, #151720, #111219);
  color: #f7f8ff;
  font-family: "IBM Plex Mono", "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.76rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.player {
  width: 100%;
  max-height: 380px;
  border: 1px solid #3a3f50;
  border-radius: 12px;
  background: #0f1016;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-btn {
    text-align: center;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 0.6rem;
  }

  .admin-nav-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-search {
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .home-hero {
    min-height: 210px;
    padding: 0.9rem;
  }

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

  .detail-poster {
    min-height: 220px;
  }
}
