@charset "UTF-8";

:root {
  color-scheme: light;
  --nav: #101a2d;
  --nav-deep: #0c1424;
  --page: #f3f6fb;
  --surface: #ffffff;
  --ink: #17243b;
  --muted: #65758b;
  --line: #e3e9f2;
  --primary: #2468e8;
  --primary-hover: #1552c2;
  --cyan: #39c8e4;
  --green: #087a53;
  --red: #bf3848;
  --amber: #8e5b00;
  --radius: 14px;
  --shadow: 0 5px 24px #20375808;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); font: 14px/1.55 Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a, button, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #77a8ff; }
button:disabled, .btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .48; }
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
video { display: block; width: 100%; background: #080f1c; border-radius: 10px; }
iframe { display: block; width: 100%; border: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(24px, 2.5vw, 32px); line-height: 1.18; letter-spacing: -.8px; font-weight: 750; }
h2 { margin-bottom: 12px; font-size: 19px; line-height: 1.3; letter-spacing: -.3px; }
h3 { margin-bottom: 10px; font-size: 16px; line-height: 1.4; }
p { margin-bottom: 14px; }
small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
ul, ol { padding-left: 22px; }
code, pre, .code { font: 12px/1.6 Consolas, "SFMono-Regular", monospace; }
code { overflow-wrap: anywhere; color: #244a83; background: #edf3fc; padding: 3px 6px; border-radius: 5px; }
pre, .code { display: block; max-width: 100%; overflow: auto; margin: 10px 0; padding: 14px 16px; color: #ccddf4; background: #142139; border: 1px solid #253a59; border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 246px; overflow-y: auto; color: #a9b8cf; background: linear-gradient(160deg, var(--nav), var(--nav-deep)); border-right: 1px solid #1b2b45; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; min-height: 88px; padding: 22px 25px; color: #fff; font-size: 21px; font-weight: 760; letter-spacing: -.5px; }
a.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 33px; width: 33px; height: 36px; color: white; background: linear-gradient(145deg, #35d2e5, #2873ee); border-radius: 9px; font-size: 18px; font-weight: 800; box-shadow: 0 4px 15px #17a8df24; }
.brand small { display: block; color: #6c819f; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-group { margin: 17px 0 7px; padding: 0 25px; color: #6f829e; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 44px; margin: 3px 12px; padding: 11px 13px; color: #adbbd0; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 550; transition: background .15s, color .15s; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { color: white; background: #ffffff09; text-decoration: none; }
.nav-link.active, .nav-link[aria-current="page"] { color: #fff; background: #2468e8; border-color: #3a7af2; box-shadow: 0 4px 15px #00000018; }
.sidebar .footer { margin-top: auto; padding: 25px; color: #7386a4; font-size: 11px; border-top: 1px solid #ffffff0a; }
.workspace { flex: 1; width: calc(100% - 246px); min-width: 0; margin-left: 246px; }
.topbar { position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 76px; padding: 14px 36px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { min-width: 0; color: #738298; font-size: 12px; overflow-wrap: anywhere; }
.breadcrumb a { color: #738298; }
.breadcrumb span { padding: 0 8px; color: #b0bdce; }
.user-pill { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #41536e; font-size: 12px; }
.user-pill strong { display: block; color: #1d2d47; font-size: 13px; }
.user-pill small { color: var(--muted); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 35px; width: 35px; height: 35px; color: #2461b5; background: #eaf1fd; border: 1px solid #dce8fb; border-radius: 50%; font-size: 12px; font-weight: 750; }
.main { width: 100%; max-width: 1700px; margin: 0 auto; padding: 32px 36px 50px; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 28px; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { margin-bottom: 9px; color: #7789a2; font-size: 10px; font-weight: 750; letter-spacing: 1.5px; text-transform: uppercase; }
.toolbar, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.toolbar { margin-bottom: 18px; }
.page-head .toolbar { margin-bottom: 0; }
.actions form, .toolbar form { margin: 0; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 9px 15px; color: #42536c; background: #fff; border: 1px solid #d7e0ed; border-radius: 8px; font-size: 12px; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; box-shadow: 0 1px 2px #17243b05; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { color: #193961; background: #f6f9fe; border-color: #bdcde3; text-decoration: none; }
.btn-primary { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 10px #2468e820; }
.btn-primary:hover { color: white; background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: #b62e40; background: #fff3f4; border-color: #f1d2d7; }
.btn-danger:hover { color: #a41f31; background: #ffe6ea; border-color: #eab7c0; }
.btn-ghost { color: #61728a; background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { color: #223a5b; background: #e8eef7; border-color: transparent; }
.btn-small { min-height: 31px; padding: 6px 10px; font-size: 11px; border-radius: 6px; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 25px; }
.stat { position: relative; min-width: 0; padding: 22px 23px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; color: #6c7c93; font-size: 11px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; }
.stat-label svg { width: 19px; height: 19px; color: #96aaca; }
.stat-value { margin-bottom: 3px; color: #172a47; font-size: 31px; line-height: 1.2; font-weight: 740; letter-spacing: -.9px; overflow-wrap: anywhere; }
.stat-note { margin-top: 7px; color: #7b8aa0; font-size: 11px; }
.stat-note strong { color: var(--green); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { min-width: 0; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 66px; padding: 18px 24px; border-bottom: 1px solid #e9eef5; }
.card-head h2, .card-head h3, .card-head p { margin: 0; }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-body { padding: 24px; }
.card-body > :last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px; color: #506681; background: #edf2f8; border: 1px solid #e0e7f1; border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: .2px; white-space: nowrap; }
.badge-live { color: #08764e; background: #e7f8ef; border-color: #c6ecd9; }
.badge-offline { color: #758297; background: #f1f4f8; border-color: #e2e8f0; }
.badge-warn { color: #936105; background: #fff6df; border-color: #f4e3b5; }
.status-dot { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; color: var(--green); background: currentColor; border-radius: 50%; }
.badge-live .status-dot { box-shadow: 0 0 0 3px #0d9b6612; }
.badge-offline .status-dot { color: #8b98aa; }
.badge-warn .status-dot { color: #c58b18; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 20px; color: #7b8ba3; background: #f9fbfe; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 20px; border-bottom: 1px solid #edf1f7; color: #4a5d77; font-size: 12px; vertical-align: middle; }
td strong { color: #243b5b; font-weight: 650; }
td small { display: block; margin-top: 3px; color: #8492a7; font-size: 10px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
td .actions { flex-wrap: nowrap; }
td .actions .btn { white-space: nowrap; }
.empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; min-height: 220px; padding: 38px 24px; color: #8694a9; text-align: center; }
.empty h2, .empty h3 { margin: 0; color: #405570; }
.empty p { max-width: 430px; margin: 0; color: #7c8ca3; font-size: 12px; }
.empty .btn { margin-top: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.field { min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
label { display: block; margin: 0 0 7px; color: #425773; font-size: 12px; font-weight: 650; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; color: #29405e; background: #fff; border: 1px solid #d8e1ed; border-radius: 7px; font-size: 13px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: #699aee; outline: none; box-shadow: 0 0 0 3px #2468e814; }
input::placeholder, textarea::placeholder { color: #98a6b9; }
input[readonly] { color: #71839d; background: #f4f7fb !important; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0 7px 0 0; vertical-align: middle; accent-color: var(--primary); }
input[type="file"] { padding: 8px 10px !important; font-size: 12px !important; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 6px 10px; color: #335783; background: #eef4fd; border: 0; border-radius: 5px; cursor: pointer; }
textarea { min-height: 105px; resize: vertical; }
select[multiple] { min-height: 130px; }
select { padding-right: 30px; }
.help, .helptext { display: block; margin: 6px 0 0; color: #8695ab; font-size: 11px; font-weight: 400; }
.errorlist { margin: 5px 0 0; padding-left: 16px; color: #b82d43; font-size: 12px; }
.field:has(.errorlist) input, .field:has(.errorlist) select, .field:has(.errorlist) textarea { border-color: #dc7180; }
.messages { display: grid; gap: 10px; margin-bottom: 22px; }
.message, .alert { padding: 13px 17px; color: #305d88; background: #eaf3fe; border: 1px solid #d0e2f7; border-radius: 8px; font-size: 12px; }
.message.success { color: #14724f; background: #eaf8ef; border-color: #c9e9d7; }
.message.error, .alert.error { color: #a13548; background: #fff0f2; border-color: #f0d0d6; }
.message.warning, .alert.warning { color: #8a6318; background: #fff8e7; border-color: #f0e0b5; }
.stream-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stream-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.stream-top h3 { margin: 0; font-size: 13px; }
.stream-preview { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; min-height: 140px; color: #9cafc9; background: radial-gradient(ellipse at 25% 25%, #1e3552 0, #101c31 55%, #0b1526 100%); }
.stream-preview video, .stream-preview iframe { height: 100%; aspect-ratio: 16 / 9; border-radius: 0; }
.stream-preview > .badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.stream-info { padding: 17px 18px 20px; }
.stream-info h3 { margin: 0 0 5px; }
.stream-info p { margin: 0 0 15px; color: #8593a8; font-size: 11px; }
.stream-info .actions { padding-top: 13px; border-top: 1px solid #edf1f7; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 0 23px; padding-bottom: 10px; border-bottom: 1px solid #dde5f0; }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 13px; color: #6f819c; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tab:hover { color: #2a5da5; background: #e8eff9; text-decoration: none; }
.tab.active, .tab[aria-current="page"] { color: #2162d6; background: #e6eefc; }
.progress { height: 6px; margin: 12px 0 4px; overflow: hidden; background: #edf1f7; border-radius: 9px; }
.progress-bar { height: 100%; max-width: 100%; background: linear-gradient(90deg, #2e78ef, #46b7eb); border-radius: inherit; }
.progress-bar.warning { background: #dca936; }
.progress-bar.danger { background: #d75a6e; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 0; }
.inline-form .field { flex: 1 1 160px; }
.content-stack { display: grid; gap: 20px; }
.content-stack > .card { margin-bottom: 0; }
.footer { margin-top: 30px; color: #8a98ad; font-size: 11px; }
.footer a { color: #7187a5; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 28px 18px; background: radial-gradient(ellipse at 16% 15%, #193555 0, transparent 50%), radial-gradient(ellipse at 85% 90%, #142e4d 0, transparent 45%), #0d1729; }
.login-card { width: 100%; max-width: 420px; padding: 34px 34px 28px; background: #fff; border: 1px solid #d9e2ed; border-radius: 18px; box-shadow: 0 25px 80px #00000038; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; color: #182e4e; font-size: 23px; font-weight: 760; letter-spacing: -.6px; }
.login-card h1 { margin-bottom: 8px; font-size: 25px; }
.login-card > p { margin-bottom: 25px; color: #8390a4; font-size: 12px; }
.login-card .field { margin-bottom: 18px; }
.login-card .btn-primary { width: 100%; min-height: 43px; margin-top: 7px; }
.login-card .footer { margin-top: 25px; font-size: 10px; text-align: center; }

@media (min-width: 1600px) {
  .main { padding-top: 38px; }
  .stats { gap: 22px; }
  .stat { padding: 25px 27px; }
}
@media (max-width: 1150px) {
  .sidebar { width: 218px; }
  .workspace { width: calc(100% - 218px); margin-left: 218px; }
  .brand { padding-left: 22px; }
  .main { padding: 28px 25px 40px; }
  .topbar { padding: 14px 25px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { gap: 18px; }
  .card-head { padding: 17px 20px; }
  .card-body { padding: 20px; }
}
@media (max-width: 800px) {
  .app { display: block; }
  .sidebar { position: relative; width: 100%; min-height: 0; max-height: none; overflow: visible; border-right: 0; }
  .brand { min-height: 66px; padding: 16px 20px; font-size: 20px; }
  .brand-mark { height: 33px; }
  .sidebar nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: thin; scrollbar-color: #364763 transparent; }
  .sidebar .nav-group, .sidebar .footer { display: none; }
  .nav-link { flex: 0 0 auto; min-height: 37px; margin: 2px 0; padding: 8px 12px; font-size: 12px; }
  .nav-link svg { width: 16px; height: 16px; }
  .workspace { width: 100%; margin-left: 0; }
  .topbar { min-height: 61px; padding: 11px 20px; }
  .main { padding: 25px 20px 35px; }
  .page-head { margin-bottom: 22px; }
  .page-head h1 { font-size: 27px; }
  .grid-2 { grid-template-columns: 1fr; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  th, td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 540px) {
  .topbar { gap: 10px; padding: 10px 16px; }
  .breadcrumb { font-size: 10px; }
  .user-pill { gap: 7px; font-size: 10px; }
  .user-pill strong { font-size: 11px; }
  .avatar { flex-basis: 29px; width: 29px; height: 29px; font-size: 10px; }
  .main { padding: 23px 16px 30px; }
  .page-head { gap: 15px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 12px; }
  .page-head .toolbar, .page-head > .btn { width: 100%; }
  .page-head .toolbar .btn { flex: 1; }
  .stats { gap: 10px; margin-bottom: 20px; }
  .stat { padding: 17px 14px; border-radius: 11px; }
  .stat-label { min-height: 28px; margin-bottom: 8px; font-size: 9px; line-height: 1.4; letter-spacing: .2px; }
  .stat-label svg { width: 16px; height: 16px; }
  .stat-value { font-size: 25px; }
  .stat-note { font-size: 10px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .card { margin-bottom: 18px; border-radius: 11px; }
  .card-head { min-height: 60px; padding: 16px; }
  .card-body { padding: 18px 16px; }
  .card-head h2 { font-size: 14px; }
  .table-wrap { border-radius: 0 0 11px 11px; }
  .tabs { gap: 2px; }
  .tab { padding: 7px 9px; font-size: 11px; }
  .login-card { padding: 29px 25px 25px; }
  .login-brand { margin-bottom: 27px; }
  .inline-form .field { flex-basis: 100%; }
  .inline-form > .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .sidebar, .topbar, .toolbar, .actions, .btn, .messages { display: none !important; }
  .workspace { width: 100%; margin: 0; }
  .main { padding: 0; }
  body { background: white; color: black; font-size: 11px; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .table-wrap { overflow: visible; }
  th, td { padding: 8px; font-size: 10px; }
  a { color: inherit; }
}
/* Ensure semantic inline elements keep the visual rhythm of metric cards. */
.stat-value,.stat-note,.user-pill small,.brand small{display:block}
