:root {
  --bg: #07151c;
  --surface: #0d222b;
  --surface-2: #12303a;
  --surface-3: #173b46;
  --line: #264751;
  --line-soft: rgba(138, 220, 230, 0.12);
  --text: #f4f2eb;
  --muted: #98adb4;
  --coral: #f26a4b;
  --coral-soft: rgba(242, 106, 75, 0.13);
  --cyan: #55b7c5;
  --cyan-bright: #8adce6;
  --green: #66c89a;
  --yellow: #e5b35b;
  --red: #e56a6a;
  --sidebar: 248px;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: Inter, Roboto, "Segoe UI", sans-serif; line-height: 1.45; }
html { scrollbar-color: #3d6570 var(--bg); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg); }
*::-webkit-scrollbar-thumb { border: 2px solid var(--bg); border-radius: 999px; background: #3d6570; }
*::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
*::-webkit-scrollbar-thumb:active { background: var(--cyan-bright); }
button, input, select { font: inherit; }
button { color: inherit; }
/* Semantic hidden state must override component display declarations. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ambient { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .16; }
.ambient-one { width: 380px; height: 380px; background: var(--cyan); top: -180px; right: 12%; }
.ambient-two { width: 280px; height: 280px; background: var(--coral); bottom: -170px; left: 3%; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, 540px) 1fr; position: relative; }
.login-card { padding: clamp(42px, 8vh, 90px) clamp(34px, 7vw, 96px); display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line-soft); background: rgba(7, 21, 28, .88); backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .08em; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-family: "Arial Narrow", "Roboto Condensed", sans-serif; font-size: 21px; letter-spacing: .17em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .28em; }
.brand-mark { width: 35px; height: 35px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 8px; border: 1px solid rgba(242, 106, 75, .45); border-radius: 50%; background: var(--coral-soft); }
.brand-mark i { display: block; width: 3px; background: var(--coral); border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 7px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 14px; }
.brand-mark i:nth-child(3) { height: 10px; opacity: .78; }
.brand-login { margin-bottom: clamp(52px, 10vh, 100px); }
.login-intro h1 { margin: 9px 0 14px; max-width: 420px; font: 800 clamp(38px, 5vw, 58px)/.98 "Arial Narrow", "Roboto Condensed", sans-serif; letter-spacing: -.025em; }
.login-intro > p:last-child { margin: 0; max-width: 430px; color: var(--muted); font-size: 15px; }
.eyebrow, .panel-kicker { margin: 0; color: var(--cyan-bright); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow span { width: 18px; height: 2px; background: currentColor; }
.form-stack { display: grid; gap: 18px; }
.login-card .form-stack { margin-top: 40px; }
label > span, fieldset legend { display: block; margin-bottom: 7px; color: #c4d0d3; font-size: 12px; font-weight: 700; }
input, select { width: 100%; min-height: 46px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; outline: 0; padding: 0 13px; background: rgba(16, 43, 53, .82); transition: border-color .16s, box-shadow .16s, background .16s; }
input:hover, select:hover { border-color: #3f6470; }
input:focus, select:focus { border-color: var(--cyan-bright); box-shadow: 0 0 0 3px rgba(138, 220, 230, .12); background: var(--surface-2); }
input::placeholder { color: #718990; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.form-error { min-height: 19px; margin: -7px 0 0; color: var(--red); font-size: 12px; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; cursor: pointer; font-weight: 800; font-size: 12px; letter-spacing: .025em; transition: transform .14s, background .14s, border-color .14s, opacity .14s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .nav-item:focus-visible, .icon-button:focus-visible, .text-button:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: 3px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { color: #1b1714; background: var(--coral); }
.button-primary:hover { background: #ff8061; }
.button-secondary { border-color: var(--line); background: var(--surface-2); }
.button-secondary:hover { border-color: var(--cyan); }
.button-ghost { color: var(--muted); background: transparent; }
.button-ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }
.button-danger { background: var(--red); color: #251313; }
.button-danger-outline { color: #f08c8c; border-color: rgba(229,106,106,.38); background: rgba(229,106,106,.055); }
.button-danger-outline:hover { color: #ffdede; border-color: var(--red); background: rgba(229,106,106,.11); }
.button-warning { color: #241d0d; background: var(--yellow); }
.button-success { color: #09251a; background: var(--green); }
.button-success:hover { background: #7bd4aa; }
.button-wide { width: 100%; justify-content: space-between; min-height: 49px; }
.button-compact { min-height: 36px; padding: 0 11px; font-size: 10px; }
.login-note { margin: 23px 0 0; display: flex; gap: 8px; align-items: center; color: #70868d; font-size: 11px; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(102, 200, 154, .09); }
.login-visual { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at center, #12303a 0, #091b23 38%, #07151c 72%); }
.login-visual::before { content: ""; position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle, black 0, transparent 70%); }
.signal-orbit { position: relative; width: min(50vw, 600px); aspect-ratio: 1; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(85, 183, 197, .2); border-radius: 50%; }
.orbit-one { inset: 11%; }
.orbit-two { inset: 27%; border-style: dashed; animation: rotate 22s linear infinite; }
.orbit-three { inset: 39%; border-color: rgba(242, 106, 75, .3); }
.orbit-core { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 106, 75, .08); box-shadow: 0 0 70px rgba(242, 106, 75, .2); }
.orbit-core span { width: 16px; height: 16px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 10px rgba(242, 106, 75, .08), 0 0 35px var(--coral); }
.signal-orbit::before, .signal-orbit::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 15px var(--cyan); }
.signal-orbit::before { top: 24%; right: 23%; }
.signal-orbit::after { bottom: 18%; left: 31%; }
.visual-caption { position: absolute; bottom: 8%; right: 8%; display: grid; text-align: right; }
.visual-caption strong { color: var(--coral); letter-spacing: .18em; font-size: 11px; }
.visual-caption span { color: var(--muted); font-size: 11px; }
@keyframes rotate { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; width: var(--sidebar); padding: 30px 18px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line-soft); background: rgba(8, 24, 31, .96); backdrop-filter: blur(18px); }
.sidebar > .brand { padding: 0 10px 34px; }
.nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 46px; padding: 0 12px; display: flex; gap: 12px; align-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.is-active { color: var(--text); border-color: rgba(242, 106, 75, .17); background: var(--coral-soft); }
.nav-item.is-active .nav-icon { color: var(--coral); }
.nav-icon { width: 20px; color: #6f8b93; text-align: center; font-size: 19px; line-height: 1; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; border-radius: 999px; padding: 0 6px; display: grid; place-items: center; color: #211410; background: var(--coral); font-size: 10px; }
.sidebar-status { margin: auto 8px 18px; padding: 14px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(16, 43, 53, .55); }
.sidebar-status > div { display: grid; }
.sidebar-status strong { font-size: 11px; }
.sidebar-status small { color: var(--muted); font-size: 9px; }
.pulse { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(102,200,154,.08); }
.logout { margin-top: 0; }
.workspace { grid-column: 2; min-width: 0; padding: 0 clamp(24px, 4vw, 62px) 60px; }
.topbar { min-height: 116px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.topbar h1 { margin: 4px 0 0; font: 800 27px/1 "Arial Narrow", "Roboto Condensed", sans-serif; letter-spacing: -.01em; }
.operator { display: flex; align-items: center; gap: 11px; }
.operator > span:last-child { display: grid; }
.operator strong { max-width: 200px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.operator small { color: var(--muted); font-size: 9px; }
.operator-avatar { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--cyan-bright); background: var(--surface); font: 800 9px/1 monospace; }
.page-section { display: none; padding-top: 30px; }
.page-section.is-active { display: block; }
.hero-panel { min-height: 300px; padding: clamp(28px, 4vw, 54px); display: grid; grid-template-columns: minmax(340px, .95fr) 1fr; align-items: center; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(120deg, rgba(18, 48, 58, .96), rgba(10, 30, 38, .96)); }
.hero-panel::before { content: ""; position: absolute; width: 4px; inset: 30px auto 30px 0; background: var(--coral); box-shadow: 0 0 20px rgba(242,106,75,.32); }
.hero-label { margin: 0 0 12px; color: var(--coral); font: 800 9px/1 monospace; letter-spacing: .22em; }
.hero-panel h2 { margin: 0; font: 800 clamp(35px, 4.2vw, 55px)/.98 "Arial Narrow", "Roboto Condensed", sans-serif; letter-spacing: -.025em; }
.hero-panel p:not(.hero-label) { max-width: 540px; margin: 18px 0 24px; color: var(--muted); font-size: 13px; }
.hero-radar { justify-self: center; position: relative; width: min(29vw, 310px); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(85,183,197,.24); border-radius: 50%; background: radial-gradient(circle, rgba(85,183,197,.11) 0 1px, transparent 2px), repeating-radial-gradient(circle, transparent 0 48px, rgba(85,183,197,.12) 49px 50px); }
.radar-grid { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49.7%, rgba(85,183,197,.15) 50%, transparent 50.3%), linear-gradient(transparent 49.7%, rgba(85,183,197,.15) 50%, transparent 50.3%); }
.radar-sweep { position: absolute; inset: 50% 50% 0 0; transform-origin: bottom right; background: conic-gradient(from 90deg at 100% 100%, rgba(85,183,197,.38), transparent 32deg); animation: rotate 7s linear infinite; }
.radar-center { position: absolute; left: calc(50% - 6px); top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 7px rgba(242,106,75,.1), 0 0 24px var(--coral); }
.radar-node { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 12px var(--cyan); }
.node-a { left: 30%; top: 35%; }.node-b { right: 22%; top: 48%; }.node-c { left: 47%; bottom: 18%; }
.metric-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { min-height: 120px; padding: 20px; position: relative; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(13,34,43,.78); }
.metric::after { content: ""; position: absolute; right: -20px; bottom: -25px; width: 75px; height: 75px; border: 1px solid var(--line-soft); border-radius: 50%; }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-value { margin-top: 15px; display: block; font: 800 32px/1 monospace; }
.metric-accent { position: absolute; left: 0; top: 20px; width: 3px; height: 24px; background: var(--cyan); }
.metric.is-coral .metric-accent { background: var(--coral); }.metric.is-green .metric-accent { background: var(--green); }.metric.is-yellow .metric-accent { background: var(--yellow); }
.split-grid { margin-top: 18px; display: grid; grid-template-columns: 1.35fr .8fr; gap: 18px; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(13,34,43,.74); }
.panel-heading { min-height: 80px; padding: 20px 23px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2 { margin: 5px 0 0; font: 800 19px/1 "Arial Narrow", sans-serif; }
.text-button { border: 0; padding: 8px; color: var(--cyan-bright); background: none; cursor: pointer; font-size: 11px; font-weight: 800; }
.activity-list { min-height: 220px; }
.activity-item { min-height: 70px; padding: 13px 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line-soft); }
.activity-item:last-child { border-bottom: 0; }
.device-glyph { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--cyan-bright); background: var(--surface-2); font-size: 16px; }
.activity-copy { min-width: 0; display: grid; }
.activity-copy strong { font: 700 12px/1.3 monospace; letter-spacing: .04em; }
.activity-copy small { color: var(--muted); font-size: 10px; }
.activity-time { color: #718990; font-size: 9px; }
.flow-list { margin: 0; padding: 8px 22px 20px; list-style: none; }
.flow-list li { padding: 16px 0; display: grid; grid-template-columns: 32px 1fr; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.flow-list li:last-child { border-bottom: 0; }
.flow-list > li > span { color: var(--coral); font: 800 10px/1.5 monospace; }
.flow-list div { display: grid; }
.flow-list strong { font-size: 11px; }.flow-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.section-lead { min-height: 96px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-lead h2 { margin: 5px 0; font: 800 30px/1 "Arial Narrow", sans-serif; }
.section-lead p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.toolbar { padding: 14px; display: grid; grid-template-columns: minmax(260px, 1fr) 220px auto; gap: 10px; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: 12px 12px 0 0; background: rgba(13,34,43,.78); }
.search-box { position: relative; }
.search-box > span:first-child { position: absolute; left: 14px; top: 11px; z-index: 1; color: var(--muted); font-size: 19px; }
.search-box input { padding-right: 42px; padding-left: 41px; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; font-size: 19px; line-height: 1; }
.search-clear:hover { color: var(--text); background: rgba(85,183,197,.09); }
.search-clear:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: -2px; }
.search-clear[hidden] { display: none; }
.select-box span { margin: 0; }
.table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: 0 0 12px 12px; background: rgba(13,34,43,.56); }
.table-wrap-rounded { border-radius: 12px; }
table { width: 100%; min-width: 800px; border-collapse: collapse; }
th { height: 45px; padding: 0 17px; color: #769098; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
td { height: 70px; padding: 10px 17px; border-bottom: 1px solid var(--line-soft); color: #dce3e2; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(85,183,197,.035); }
.device-cell { display: flex; align-items: center; gap: 11px; }
.device-cell > div { min-width: 0; display: grid; }
.device-cell strong { font: 700 11px/1.4 monospace; letter-spacing: .045em; }
.device-cell small { color: var(--muted); font-size: 10px; }
.admin-cell { display: grid; }
.admin-cell strong { font-size: 11px; }
.admin-cell small { color: var(--muted); font-size: 10px; }
.role-badge { width: max-content; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan-bright); background: rgba(85,183,197,.055); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.role-badge.is-owner { color: var(--yellow); border-color: rgba(229,179,91,.24); background: rgba(229,179,91,.07); }
.admin-actions { display: flex; justify-content: flex-end; gap: 7px; }
.admin-protected { color: var(--muted); font-size: 9px; }
.status { width: max-content; padding: 5px 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-active { color: var(--green); border-color: rgba(102,200,154,.24); background: rgba(102,200,154,.07); }
.status-pending { color: var(--yellow); border-color: rgba(229,179,91,.24); background: rgba(229,179,91,.07); }
.status-blocked, .status-expired { color: var(--red); border-color: rgba(229,106,106,.24); background: rgba(229,106,106,.07); }
.row-action { min-height: 35px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; color: var(--cyan-bright); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.row-action:hover { border-color: var(--cyan); background: rgba(85,183,197,.06); }
.key-flag { margin-left: 6px; color: var(--yellow); font-size: 9px; }
.empty-state { padding: 54px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.playlist-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 15px; }
.playlist-card { min-height: 190px; padding: 20px; display: flex; flex-direction: column; position: relative; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(13,34,43,.78); }
.playlist-card::before { content: ""; position: absolute; left: 0; top: 20px; width: 3px; height: 35px; background: var(--cyan); }
.playlist-card.is-file::before { background: var(--coral); }
.playlist-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.playlist-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--cyan-bright); background: var(--surface-2); font-size: 18px; }
.playlist-type { color: var(--muted); font: 800 9px/1 monospace; letter-spacing: .1em; }
.playlist-card h3 { margin: 22px 0 4px; font: 800 18px/1.2 "Arial Narrow", sans-serif; }
.playlist-meta { color: var(--muted); font-size: 10px; }
.playlist-bottom { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-soft); }
.assignment-count { color: var(--cyan-bright); font-size: 10px; font-weight: 700; }
.archive-button { border: 0; color: #708990; background: transparent; cursor: pointer; font-size: 10px; }
.archive-button:hover { color: var(--red); }

.dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; color: var(--text); border: 1px solid var(--line); border-radius: 16px; background: #0b2029; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(2, 9, 12, .76); backdrop-filter: blur(4px); }
.dialog-wide { width: min(850px, calc(100vw - 32px)); }
.dialog-small { width: min(430px, calc(100vw - 32px)); }
.dialog-head { min-height: 88px; padding: 21px 24px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.dialog-head h2 { margin: 5px 0 2px; font: 800 24px/1 "Arial Narrow", sans-serif; }
.dialog-head code { color: var(--muted); font-size: 10px; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }
.icon-button:hover { color: var(--text); border-color: var(--cyan); }
.dialog-content { padding: 24px; }
.dialog-actions { padding: 16px 24px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); }
.dialog-actions-split { justify-content: space-between; }
.dialog-action-group { display: flex; justify-content: flex-end; gap: 8px; }
.device-dialog-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(260px, 1fr); gap: 28px; }
.device-dialog-side { min-width: 0; display: grid; align-content: start; gap: 18px; }
.assignment-box { margin: 0; min-width: 0; padding: 17px; border: 1px solid var(--line-soft); border-radius: 12px; }
.assignment-box legend { padding: 0 6px; color: var(--text); font-size: 12px; }
.assignment-intro { margin-bottom: 12px; display: grid; gap: 10px; }
.assignment-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.assignment-intro .button { justify-self: start; }
.assignment-status { min-height: 15px; margin: 8px 0 0; color: var(--green); font-size: 9px; }
.check-list { display: grid; max-height: 230px; overflow: auto; }
.check-item { padding: 10px 4px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.check-item:last-child { border-bottom: 0; }
.check-item input { appearance: none; width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; border-radius: 5px; }
.check-item input:checked { border-color: var(--coral); background: var(--coral); box-shadow: inset 0 0 0 4px #0b2029; }
.check-item span { margin: 0; display: grid; }
.check-item strong { font-size: 10px; }.check-item small { color: var(--muted); font-size: 9px; }
.warning-box { padding: 14px; border: 1px solid rgba(229,179,91,.27); border-radius: 10px; background: rgba(229,179,91,.07); }
.warning-box strong { color: var(--yellow); font-size: 11px; }
.warning-box p { margin: 4px 0 12px; color: var(--muted); font-size: 10px; }
.manual-release-box { padding: 15px; border: 1px solid rgba(102,200,154,.28); border-radius: 12px; background: rgba(102,200,154,.065); }
.manual-release-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.manual-release-head > div { display: flex; align-items: center; gap: 9px; }
.manual-release-head strong { font-size: 12px; }
.manual-release-icon { min-width: 39px; height: 30px; padding: 0 6px; display: grid; place-items: center; border: 1px solid rgba(102,200,154,.3); border-radius: 8px; color: var(--green); background: rgba(102,200,154,.08); font: 800 10px/1 monospace; }
.access-badge { flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(229,179,91,.25); border-radius: 999px; color: var(--yellow); background: rgba(229,179,91,.06); font: 800 8px/1 monospace; letter-spacing: .07em; }
.manual-release-box > p { margin: 10px 0 13px; color: var(--muted); font-size: 10px; }
.manual-release-box label { display: block; margin-bottom: 10px; }
.manual-release-box small { display: block; margin-top: 9px; color: #789198; font-size: 9px; }
.access-history { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(7,21,28,.3); }
.access-history-head { min-height: 61px; padding: 14px 16px; display: flex; align-items: center; border-bottom: 1px solid var(--line-soft); }
.access-history-head h3 { margin: 4px 0 0; font: 800 14px/1 "Arial Narrow", sans-serif; }
.access-grant-list { max-height: 220px; overflow: auto; }
.access-grant-item { padding: 12px 14px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 9px; align-items: start; border-bottom: 1px solid var(--line-soft); }
.access-grant-item:last-child { border-bottom: 0; }
.access-grant-mark { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #09251a; background: var(--green); font-size: 11px; font-weight: 900; }
.access-grant-item > div { min-width: 0; display: grid; }
.access-grant-item strong { font-size: 10px; }
.access-grant-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.access-grant-item p { margin: 5px 0 0; overflow-wrap: anywhere; color: #a9babf; font-size: 9px; }
.access-grant-expiry { color: var(--green); font-size: 8px; font-weight: 800; white-space: nowrap; }
.access-history-empty { padding: 25px 16px; color: var(--muted); text-align: center; font-size: 10px; }
.segmented { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.segmented button { min-height: 38px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.segmented button.is-active { color: var(--text); background: var(--surface-2); }
.playlist-device-context { margin-bottom: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(102,200,154,.24); border-radius: 10px; background: rgba(102,200,154,.06); }
.playlist-device-context[hidden] { display: none; }
.playlist-device-context p { margin: 0; color: var(--muted); font-size: 10px; }
.playlist-device-context strong { color: var(--green); font-size: 11px; }
.dialog-fields { margin-top: 20px; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.password-control { margin: 0; display: block; position: relative; }
.password-control input { padding-right: 78px; }
.password-toggle { position: absolute; inset: 1px 1px 1px auto; z-index: 1; min-width: 68px; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line); border-radius: 0 9px 9px 0; color: var(--cyan-bright); background: rgba(16,43,53,.96); cursor: pointer; font-size: 9px; font-weight: 800; }
.password-toggle:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: -3px; }
.privacy-note { margin-top: 20px; padding: 12px 14px; display: flex; gap: 10px; border-radius: 9px; color: var(--muted); background: rgba(85,183,197,.055); font-size: 10px; }
.privacy-note > span { color: var(--cyan); }.privacy-note p { margin: 0; }.privacy-note strong { color: #c7d8da; }
.toast-region { position: fixed; z-index: 20; right: 24px; bottom: 24px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 280px; max-width: 420px; padding: 14px 16px; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 10px; color: var(--text); background: #102a34; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease-out; }
.toast.is-error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  :root { --sidebar: 210px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .playlist-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .hero-panel { grid-template-columns: 1fr .65fr; }
}
@media (max-width: 780px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-card { border-right: 0; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .sidebar > .brand { padding: 0; }.brand small { display: none; }
  .nav { display: flex; justify-content: center; }
  .nav-item { width: auto; min-height: 40px; padding: 0 10px; }
  .nav-item span:not(.nav-icon):not(.nav-badge) { display: none; }
  .sidebar-status { display: none; }.logout { margin: 0; }
  .workspace { padding: 0 18px 42px; }
  .topbar { min-height: 92px; }
  .operator > span:last-child { display: none; }
  .hero-panel { grid-template-columns: 1fr; }.hero-radar { display: none; }
  .split-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; border-bottom: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: 10px; }
  .device-dialog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .login-card { padding: 36px 24px; }
  .brand-login { margin-bottom: 60px; }
  .metric-grid, .playlist-grid { grid-template-columns: 1fr; }
  .topbar { align-items: center; }.topbar h1 { font-size: 23px; }
  .hero-panel { min-height: 0; padding: 34px 27px; }.hero-panel h2 { font-size: 36px; }
  .section-lead { flex-direction: column; padding-bottom: 20px; }
  .section-lead .button { width: 100%; }
  .dialog-actions .button { flex: 1; }
  .dialog-actions-split { align-items: stretch; flex-direction: column-reverse; }
  .dialog-action-group { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  /* Accessibility preference must override every decorative motion rule. */
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
