@charset "UTF-8";

/* VORTEX TV: shared admin components. Artwork and DOM image sources stay managed by the app. */
:root {
  color-scheme: dark;
  --bg: #060b20;
  --panel: #101d38;
  --surface: #142444;
  --line: #315581;
  --accent: #2563d9;
  --accent-hover: #1e55be;
  --focus: #75ddff;
  --purple: #b5a2ff;
  --text: #f4f7ff;
  --muted: #b6c5df;
  --sidebar-width: 264px;
  --radius: 16px;
  --shadow: 0 16px 40px #02071840;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(120deg, #060b208c, #090e24b8), url("streaming-background.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, video, audio { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: #335caa; color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Sidebar: compact rows keep the existing navigation order and full labels. */
aside {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 28px 18px 20px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0c1736f7, #090f25fa);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #456492 #0b142c;
}
.brand {
  display: block;
  flex: none;
  width: 218px;
  max-width: 100%;
  height: 76px;
}
.brand img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}
.eyebrow {
  margin: 0 0 10px;
  color: #a9caff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  line-height: 1.6;
}
aside > .eyebrow { margin: 28px 12px 12px; }
aside nav { display: grid; gap: 6px; margin-bottom: auto; padding: 0 0 24px; }
aside nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  transition: background-color .15s, border-color .15s, color .15s;
}
aside nav a span { min-width: 0; overflow-wrap: anywhere; }
aside nav a:hover { background: #182d50; border-color: #315581; color: #fff; }
aside nav a.active, aside nav a[aria-current="page"] {
  background: linear-gradient(110deg, #17448a, #282659);
  border-color: #528ee5;
  color: #fff;
  box-shadow: inset 3px 0 0 #75ddff;
}
.nav-icon { width: 21px; height: 21px; flex: none; color: #9fc7ff; }
aside nav .active .nav-icon { color: var(--focus); }
/* Group wrappers, when present, use the same rhythm as the flat navigation. */
.nav-group, .nav-section { display: grid; gap: 6px; min-width: 0; }
.nav-group + .nav-group, .nav-section + .nav-section { margin-top: 12px; }
.nav-group-title, .nav-section-title, aside nav .eyebrow {
  margin: 10px 12px 4px;
  color: #a5b4d4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
aside > form { padding-top: 18px; border-top: 1px solid #263c60; }
aside > form button { width: 100%; }
aside > p.muted { margin: 16px 4px 0; font-size: 11px; line-height: 1.6; }

/* Shared page layout and cards. */
main { min-width: 0; max-width: 1760px; margin-left: var(--sidebar-width); padding: 40px clamp(24px, 3.4vw, 56px); }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
header > div { min-width: 0; }
header > .button { flex: none; }
h1, h2 { color: var(--text); overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.9px; font-weight: 750; }
h2 { margin: 0 0 20px; font-size: 21px; line-height: 1.35; letter-spacing: -.35px; }
p { overflow-wrap: anywhere; }
.page-intro { margin: 0 0 26px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.panel, .card {
  min-width: 0;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #142444f5, #101a34f7);
  box-shadow: var(--shadow);
}
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.grid, .asset-grid, .support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.asset-grid, .support-grid { align-items: start; }
.grid > *, .asset-grid > *, .support-grid > * { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
.badge { display: inline-block; max-width: 100%; padding: 5px 10px; border: 1px solid #52669b; border-radius: 999px; background: #1d294a; color: #d9d2ff; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.dashboard-metrics { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 24px; }
.dashboard-metrics .panel { margin: 0; }
.dashboard-metrics p { margin: 0 0 12px; min-height: 40px; color: var(--muted); font-size: 13px; }
.dashboard-metrics h2 { margin: 0; color: #b2d7ff; font-size: 34px; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Form primitives are shared by appearance, support, servers and music. */
label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; color: #d8e3f7; font-size: 13px; font-weight: 550; }
input, textarea, select { width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid #58749d; border-radius: 9px; background: #0a142b; color: var(--text); line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9cacc8; opacity: 1; }
textarea { resize: vertical; min-height: 112px; }
select { padding-right: 32px; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 2px; }
input:disabled, textarea:disabled, select:disabled { background: #15203a; color: #9aa9c3; cursor: not-allowed; }
input[readonly], textarea[readonly] { color: #c3d7f8; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0 7px 0 0; vertical-align: middle; accent-color: var(--accent); }
input[type="color"] { padding: 5px; cursor: pointer; }
input[type="range"] { padding: 0; accent-color: var(--accent); }
input[type="file"] { padding: 7px; font-size: 12px; overflow: hidden; }
input::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 1px solid #58749d; border-radius: 5px; background: #213960; color: #f4f7ff; cursor: pointer; font: inherit; }
input::file-selector-button:hover { background: #304d7a; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 18px;
  border: 1px solid #6497f5;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color .15s, border-color .15s;
}
button:hover, .button:hover { background: var(--accent-hover); border-color: #8ab8ff; }
button:active, .button:active { background: #1b479c; }
button.quiet, .button.quiet { background: #1c3052; border-color: #5775a2; color: #edf4ff; }
button.quiet:hover, .button.quiet:hover { background: #294571; border-color: #86b3f3; }
button.danger, .button.danger { background: #462039; border-color: #b76786; color: #ffe3ed; }
button.danger:hover, .button.danger:hover { background: #642947; border-color: #e794b4; }
button:disabled, .button[aria-disabled="true"] { background: #26344e; border-color: #526581; color: #b9c6db; cursor: not-allowed; }
.reset-form { display: inline-block; margin-top: 14px; }
.reset-form button { font-size: 12px; padding: 9px 12px; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.connection-code { display: block; min-height: 160px; margin-top: 18px; font: 13px/1.65 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
#connection-feedback:empty { display: none; }
code { color: #b8dbff; font-size: .9em; overflow-wrap: anywhere; }

/* Tables scroll inside their frame; no page-level horizontal scroll. */
.table-wrap { max-width: 100%; overflow: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: #0e1a32; scrollbar-width: thin; scrollbar-color: #58749d #0e1a32; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; line-height: 1.55; }
th, td { min-width: 112px; padding: 15px 16px; border-bottom: 1px solid #2c456c; vertical-align: middle; }
th { background: #1a2d50; color: #c8dafa; font-size: 12px; font-weight: 650; }
td { background: #0e1a32; color: #e0e9f9; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tbody tr:focus-within td { background: #192e51; }
td form { display: inline-block; margin: 4px; }
td .button, td button { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.notice { margin-bottom: 24px; padding: 15px 18px; border: 1px solid #5276ad; border-left: 4px solid #8cbcff; border-radius: 10px; background: #192d50; color: #e6efff; overflow-wrap: anywhere; }
.notice[role="alert"] { border-color: #b76786; border-left-color: #f3a9c5; background: #3e2036; color: #ffe3ed; }
.empty { padding: 24px; color: var(--muted); }

/* Preserve image proportions and the administrable preview src attributes. */
.asset-preview { display: flex; align-items: center; justify-content: center; height: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #08132c; }
.asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.asset-preview.logo img { object-fit: contain; padding: 24px; }
.panel video, .intro-preview { display: block; width: 320px; max-width: 100%; height: auto; max-height: 180px; object-fit: contain; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; background: #050a18; }
.panel audio, .card audio { display: block; width: 100%; max-width: 520px; margin: 16px 0; border: 1px solid var(--line); border-radius: 28px; }
.qr-card { text-align: center; }
.qr-preview { display: flex; justify-content: center; align-items: center; min-height: 270px; }
.qr-preview img { width: 250px; max-width: 100%; height: auto; aspect-ratio: 1; padding: 14px; border-radius: 12px; background: #fff; }
.server-avatar-preview { display: block; width: 96px; height: 96px; object-fit: cover; margin: 12px 0; border: 2px solid #83baff; border-radius: 50%; }
.profile-image-field p { color: var(--muted); font-size: 13px; }
.server-avatar-frame { position: relative; display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; overflow: hidden; margin: 12px 0; border: 2px solid #83baff; border-radius: 50%; background: #0a142b; }
.server-avatar-frame .server-avatar-preview { width: 100%; height: 100%; margin: 0; border: 0; object-fit: cover; }
.server-avatar-frame span { max-width: 76px; padding: 8px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.3; }
footer { padding: 22px 0 8px; color: #a5b6d5; font-size: 10px; letter-spacing: 1.8px; }
footer strong { color: #d6ddf4; font-weight: 600; }

/* Login inherits the exact supplied background from body. */
.login { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card { width: 440px; max-width: 100%; padding: 36px; border: 1px solid #4978b5; border-top: 3px solid #879bff; border-radius: 20px; background: #0e1933f2; box-shadow: 0 24px 80px #02071880; }
.login-card .brand { width: 280px; height: 92px; margin: 0 auto 24px; }
.login-card .brand img { object-position: center; }
.login-card h1 { margin: 12px 0; font-size: 28px; letter-spacing: -.6px; }
.login-card form { margin-top: 26px; }
.login-card button { width: 100%; }
.login-card > .muted:last-child { margin: 24px 0 0; text-align: center; font-size: 12px; }

@media (min-width: 1600px) {
  .asset-preview { height: 260px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 244px; }
  aside { padding-right: 14px; padding-left: 14px; }
  main { padding: 30px 24px; }
  .asset-grid, .support-grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .card { padding: 22px; }
}
@media (max-width: 900px) {
  .grid:not(.dashboard-metrics) { grid-template-columns: minmax(0, 1fr); }
  header { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  body { background-attachment: scroll; }
  aside { position: static; width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { width: 180px; height: 58px; }
  aside > .eyebrow { margin: 16px 4px 10px; font-size: 10px; }
  aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0 0 16px; }
  aside nav a { gap: 8px; padding: 10px; font-size: 12px; }
  .nav-icon { width: 18px; height: 18px; }
  .nav-group, .nav-section { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-group-title, .nav-section-title, aside nav .eyebrow { grid-column: 1 / -1; }
  .nav-group + .nav-group, .nav-section + .nav-section { margin-top: 4px; }
  aside > form { padding-top: 12px; }
  aside > form button { width: auto; font-size: 12px; }
  aside > p.muted { display: none; }
  main { margin-left: 0; padding: 26px 16px; }
  header { gap: 16px; margin-bottom: 24px; }
  header .eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .panel, .card { padding: 20px; border-radius: 13px; }
  .grid { gap: 0 16px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dashboard-metrics .panel { padding: 16px; }
  .dashboard-metrics h2 { font-size: 30px; }
  .asset-preview { height: 180px; }
  .asset-preview.logo img { padding: 18px; }
  .table-wrap table { min-width: 600px; }
  th, td { padding: 13px 14px; }
  input, select, textarea { font-size: 16px; }
  input[type="file"] { font-size: 12px; }
  .login { padding: 24px 16px; }
  .login-card { padding: 28px 24px; }
  .login-card .brand { height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .panel, .card, .login-card, .table-wrap { border-color: CanvasText; }
  aside nav a.active, aside nav a[aria-current="page"] { border-color: Highlight; outline: 1px solid Highlight; }
  button, .button { border-color: ButtonText; }
  :focus-visible { outline-color: Highlight; }
}
