/* ============================================================
   MEGA ALL STAR ARENA — VISUAL/AUDIO MONITORING DASHBOARD
   Theme: premium dark control room, teal signal accents
   Works with dashboard_mega_all_star_arena.html
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #080d14;
    --bg-soft: #0b121c;
    --panel: rgba(17, 27, 40, 0.94);
    --panel-solid: #111b28;
    --panel-raised: #162333;
    --panel-hover: #192a3b;
    --line: rgba(145, 171, 194, 0.15);
    --line-strong: rgba(145, 171, 194, 0.26);
    --text: #edf4fb;
    --text-soft: #bdcad7;
    --muted: #8092a5;
    --accent: #5be5c3;
    --accent-strong: #22cda9;
    --accent-blue: #72b9ff;
    --warning: #f4c875;
    --danger: #ff7886;
    --success: #62e4ac;
    --unknown: #a4b1c0;
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 21px;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.16);
    --sidebar-width: 258px;
    --header-height: 94px;
    --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
    --sans: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
    background: var(--bg);
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse at 18% -10%, rgba(43, 112, 120, 0.19), transparent 42rem),
        radial-gradient(ellipse at 94% 22%, rgba(40, 80, 133, 0.14), transparent 35rem),
        linear-gradient(180deg, #0a111a 0%, var(--bg) 58%, #080c12 100%);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(rgba(135, 165, 190, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(135, 165, 190, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 80%);
}

::selection {
    color: #041511;
    background: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

a:hover {
    color: #a2f5e2;
}

p {
    margin: 0 0 0.7rem;
    color: var(--text-soft);
}

h1, h2, h3, h4, h5 {
    margin-top: 0;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.035em;
}

h1 { font-size: clamp(1.25rem, 1.7vw, 1.65rem); }
h2 { font-size: clamp(1.08rem, 1.35vw, 1.34rem); }
h3 { font-size: 0.98rem; }
h4 { font-size: 0.82rem; }

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid rgba(91, 229, 195, 0.23);
    border-radius: 10px;
    color: #dffcf4;
    background: linear-gradient(180deg, rgba(36, 104, 99, 0.34), rgba(20, 65, 65, 0.3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(91, 229, 195, 0.58);
    background: linear-gradient(180deg, rgba(41, 137, 119, 0.45), rgba(22, 81, 76, 0.42));
    box-shadow: 0 7px 18px rgba(21, 170, 138, 0.09);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    color: #657586;
    background: rgba(100, 120, 140, 0.08);
    border-color: var(--line);
    cursor: not-allowed;
    box-shadow: none;
}

button[type="reset"],
button[data-action="toggle-grid-density"] {
    color: var(--text-soft);
    border-color: var(--line-strong);
    background: rgba(124, 145, 167, 0.07);
}

button[type="reset"]:hover:not(:disabled),
button[data-action="toggle-grid-density"]:hover:not(:disabled) {
    color: var(--text);
    background: rgba(124, 145, 167, 0.14);
    border-color: rgba(165, 189, 210, 0.38);
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid rgba(137, 163, 187, 0.22);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background-color: #0b1420;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #617487;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(137, 205, 196, 0.38);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(91, 229, 195, 0.8);
    box-shadow: 0 0 0 3px rgba(91, 229, 195, 0.09);
}

select {
    padding-right: 30px;
    cursor: pointer;
}

input[type="datetime-local"] {
    color-scheme: dark;
}

label {
    display: block;
    color: #9eb0c1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.015em;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

legend {
    padding: 0 8px;
    color: #d9e6f0;
    font-size: 0.8rem;
    font-weight: 800;
}

/* Accessibility: the skip link only appears when keyboard-focused. */
body > a[href="#main-content"] {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    transform: translateY(-160%);
    border-radius: 10px;
    color: #051710;
    background: var(--accent);
    font-weight: 800;
}

body > a[href="#main-content"]:focus {
    transform: translateY(0);
}

/* Top command bar */
.app-header {
    position: sticky;
    z-index: 50;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: var(--header-height);
    padding: 16px clamp(20px, 3vw, 42px);
    border-bottom: 1px solid rgba(132, 165, 190, 0.15);
    background: rgba(8, 14, 22, 0.86);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand {
    position: relative;
    min-width: 0;
    padding-left: 52px;
}

.brand::before {
    position: absolute;
    top: 4px;
    left: 0;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    content: "MA";
    border: 1px solid rgba(91, 229, 195, 0.5);
    border-radius: 12px;
    color: #cafff1;
    background: linear-gradient(145deg, rgba(91, 229, 195, 0.23), rgba(59, 128, 186, 0.15));
    box-shadow: 0 0 25px rgba(40, 221, 179, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: var(--mono);
    font-size: 0.77rem;
    font-weight: 500;
    letter-spacing: -0.08em;
}

.brand h1 {
    margin: 0 0 3px;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
}

.brand > p:last-child {
    margin: 0;
    color: #91a4b7;
    font-size: 0.68rem;
    letter-spacing: 0.005em;
}

.brand__eyebrow {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.app-header__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 15px;
    flex-wrap: wrap;
    max-width: 65%;
}

.app-header__meta p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #8ea0b2;
    font-size: 0.68rem;
}

.app-header__meta time,
.app-header__meta #current-user,
.app-header__meta #current-user-role {
    color: #dbe6ef;
    font-family: var(--mono);
    font-size: 0.69rem;
}

.app-header__meta button {
    min-height: 33px;
    padding: 6px 10px;
    font-size: 0.7rem;
}

#notification-count {
    display: inline-grid;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    place-items: center;
    border-radius: 6px;
    color: #071713;
    background: var(--accent);
    font-family: var(--mono);
    font-size: 0.65rem;
}

/* Main two-column application frame */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    align-items: start;
    gap: 0;
    max-width: 1920px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: var(--header-height);
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: calc(100vh - var(--header-height));
    max-height: calc(100vh - var(--header-height));
    padding: 25px 15px 20px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background: rgba(9, 16, 25, 0.74);
    scrollbar-color: #304354 transparent;
    scrollbar-width: thin;
}

.sidebar nav h2,
.sidebar__system-note h2 {
    margin: 0 10px 12px;
    color: #71869a;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sidebar nav ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 41px;
    padding: 9px 11px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #9baebe;
    font-size: 0.76rem;
    font-weight: 600;
    transition: all 160ms ease;
}

.sidebar nav a::before {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    content: "";
    border: 1px solid #536b7f;
    border-radius: 2px;
    background: transparent;
    transform: rotate(45deg);
    transition: all 160ms ease;
}

.sidebar nav a:hover {
    border-color: rgba(136, 173, 195, 0.1);
    color: #e4f0f8;
    background: rgba(111, 150, 180, 0.08);
}

.sidebar nav a[aria-current="page"] {
    border-color: rgba(91, 229, 195, 0.18);
    color: #dffff5;
    background: linear-gradient(90deg, rgba(45, 151, 126, 0.2), rgba(43, 101, 119, 0.08));
    box-shadow: inset 3px 0 0 var(--accent-strong);
}

.sidebar nav a[aria-current="page"]::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 10px rgba(91, 229, 195, 0.55);
}

.sidebar__system-note {
    margin-top: auto;
    padding: 15px 13px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(23, 39, 55, 0.72), rgba(12, 22, 33, 0.72));
}

.sidebar__system-note h2 {
    margin: 0 0 14px;
}

.sidebar__system-note p {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 9px 0 0;
    color: #8297a9;
    font-size: 0.68rem;
}

.sidebar__system-note strong {
    color: #dbe6ef;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
}

.main-content {
    min-width: 0;
    padding: clamp(17px, 2.3vw, 34px);
}

.main-content > section {
    min-width: 0;
    margin: 0 0 24px;
    padding: clamp(18px, 2vw, 27px);
    scroll-margin-top: calc(var(--header-height) + 18px);
    border: 1px solid rgba(137, 164, 189, 0.14);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(17, 27, 40, 0.92), rgba(12, 21, 32, 0.93));
    box-shadow: var(--shadow-soft);
}

.main-content > section:first-child {
    border-color: rgba(91, 229, 195, 0.18);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(44, 125, 126, 0.10), transparent 38%),
        linear-gradient(145deg, rgba(18, 31, 43, 0.96), rgba(12, 21, 32, 0.96));
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 21px;
    padding: 0 0 17px;
    border-bottom: 1px solid var(--line);
}

.section-header > div:first-child {
    min-width: 0;
}

.section-header h2 {
    margin: 0 0 6px;
    font-size: clamp(1.06rem, 1.4vw, 1.36rem);
    letter-spacing: -0.045em;
}

.section-header p {
    max-width: 740px;
    margin: 0;
    color: #8da1b4;
    font-size: 0.76rem;
    line-height: 1.7;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-eyebrow::before {
    width: 19px;
    height: 2px;
    content: "";
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(91, 229, 195, 0.4);
}

.section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.section-actions label {
    align-self: center;
    margin-left: 7px;
}

.section-actions select {
    width: auto;
    max-width: 190px;
    min-height: 35px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 0.72rem;
}

/* Overview metrics */
.summary-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.metric-card {
    position: relative;
    min-width: 0;
    padding: 17px 16px 15px;
    overflow: hidden;
    border: 1px solid rgba(132, 166, 191, 0.15);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(26, 42, 58, 0.73), rgba(17, 29, 42, 0.78));
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.metric-card::after {
    position: absolute;
    right: -22px;
    bottom: -40px;
    width: 110px;
    height: 110px;
    content: "";
    border: 1px solid rgba(91, 229, 195, 0.07);
    border-radius: 50%;
    box-shadow: 0 0 0 12px rgba(91, 229, 195, 0.018), 0 0 0 25px rgba(91, 229, 195, 0.012);
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 229, 195, 0.25);
}

.metric-card dt {
    color: #93a7b8;
    font-size: 0.72rem;
    font-weight: 700;
}

.metric-card dd {
    position: relative;
    z-index: 1;
    margin: 9px 0 7px;
    color: #f5f9fd;
    font-family: var(--mono);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.07em;
}

.metric-card dd small {
    color: #8296a9;
    font-size: 0.85rem;
    letter-spacing: 0;
}

.metric-card dd .status {
    vertical-align: middle;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0;
}

.metric-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #7e94a7;
    font-size: 0.66rem;
    line-height: 1.55;
}

.system-notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(114, 185, 255, 0.2);
    border-radius: 13px;
    background: linear-gradient(100deg, rgba(43, 91, 132, 0.16), rgba(33, 64, 93, 0.08));
}

.system-notice::before {
    display: grid;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    content: "i";
    place-items: center;
    border: 1px solid rgba(114, 185, 255, 0.35);
    border-radius: 8px;
    color: var(--accent-blue);
    font-family: Georgia, serif;
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 700;
}

.system-notice h3 {
    margin: 1px 0 3px;
    color: #c3e0fb;
    font-size: 0.8rem;
    letter-spacing: 0;
}

.system-notice p {
    margin: 0;
    color: #91a9bf;
    font-size: 0.73rem;
}

/* 24 camera tiles */
.station-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

/* Ukuran tile dapat diubah langsung dari kontrol dashboard. */
.station-grid.station-grid--size-small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)) !important;
    gap: 9px !important;
}

.station-grid--size-small .station-card { padding: 9px; border-radius: 12px; }
.station-grid--size-small .station-card__header h3 { font-size: 0.76rem; }
.station-grid--size-small .station-card__header p,
.station-grid--size-small .station-card__footer > span { font-size: 0.62rem; }
.station-grid--size-small .camera-feed { min-height: 100px; }
.station-grid--size-small .station-card__audio { padding: 8px; }
.station-grid--size-small .audio-waveform { min-height: 30px; }

.station-grid.station-grid--size-medium {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr)) !important;
    gap: 13px !important;
}

.station-grid.station-grid--size-large {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 355px), 1fr)) !important;
    gap: 16px !important;
}

.station-grid--size-large .station-card { padding: 16px; border-radius: 18px; }
.station-grid--size-large .station-card__header h3 { font-size: 0.95rem; }
.station-grid--size-large .camera-feed { min-height: 205px; }
.station-grid--size-large .station-card__audio { padding: 15px 0 0; }
.station-grid--size-large .audio-waveform { min-height: 56px; }
.station-card[hidden] { display: none !important; }

.station-grid-summary {
    margin: -5px 0 13px;
    color: var(--muted, #8092a5);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.station-range-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 5px;
    border: 1px solid rgba(137, 163, 187, 0.16);
    border-radius: 12px;
    background: rgba(7, 15, 24, 0.44);
}

.section-actions .station-range-controls label {
    margin: 0 0 0 3px;
    color: var(--muted, #8092a5);
    font-size: 0.68rem;
}

.station-range-controls input[type="number"] {
    flex: 0 0 62px;
    width: 62px;
    min-height: 34px;
    padding: 6px 7px;
    text-align: center;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.station-range-controls button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.7rem;
}

.station-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(132, 164, 190, 0.17);
    border-radius: 16px;
    background: linear-gradient(155deg, rgba(24, 38, 53, 0.92), rgba(15, 25, 37, 0.96));
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.station-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 229, 195, 0.3);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2);
}

.station-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    margin-bottom: 10px;
}

.station-card__header > div {
    min-width: 0;
}

.station-card__header h3 {
    margin: 0 0 3px;
    font-size: 0.82rem;
    letter-spacing: -0.025em;
}

.station-card__header p {
    margin: 0;
    color: #7f94a8;
    font-family: var(--mono);
    font-size: 0.58rem;
    line-height: 1.55;
}

.station-card__header > .status {
    flex-shrink: 0;
    max-width: 115px;
    text-align: center;
}

.camera-feed,
.focus-view-panel__video {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    aspect-ratio: 16 / 9;
    min-height: 112px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(120, 164, 186, 0.14);
    border-radius: 11px;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(51, 103, 111, 0.17), transparent 43%),
        linear-gradient(rgba(106, 150, 175, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 150, 175, 0.045) 1px, transparent 1px),
        linear-gradient(145deg, #0b1521, #0a111b 72%);
    background-size: auto, 20px 20px, 20px 20px, auto;
    text-align: center;
}

.camera-feed::before,
.focus-view-panel__video::before {
    position: absolute;
    inset: 10px;
    content: "";
    border: 1px solid rgba(101, 166, 171, 0.12);
    border-radius: 7px;
    pointer-events: none;
}

.camera-feed::after,
.focus-view-panel__video::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    content: "";
    border: 1px solid rgba(91, 229, 195, 0.18);
    border-radius: 50%;
    box-shadow: 0 0 0 7px rgba(91, 229, 195, 0.025), 0 0 22px rgba(91, 229, 195, 0.05);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.camera-feed__placeholder {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #7895a7;
    font-size: 0.64rem;
    font-weight: 600;
}

.camera-feed__placeholder::before {
    display: block;
    margin-bottom: 5px;
    color: rgba(91, 229, 195, 0.6);
    content: "◉";
    font-size: 1.15rem;
}

.camera-feed__timestamp {
    position: absolute;
    z-index: 1;
    right: 8px;
    bottom: 5px;
    left: 8px;
    margin: 0;
    color: #5d7589;
    font-family: var(--mono);
    font-size: 0.53rem;
    text-align: right;
}

.station-card__audio {
    margin-top: 11px;
    padding: 10px;
    border: 1px solid rgba(132, 164, 190, 0.11);
    border-radius: 10px;
    background: rgba(7, 15, 24, 0.42);
}

.station-card__audio-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.station-card__audio-heading h4 {
    margin: 0;
    color: #d8e5ee;
    font-size: 0.69rem;
    letter-spacing: 0;
}

.station-card__audio-heading .status {
    max-width: 140px;
}

.audio-waveform {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    overflow: hidden;
    border: 1px solid rgba(91, 229, 195, 0.08);
    border-radius: 8px;
    color: #74998f;
    background:
        repeating-linear-gradient(90deg, transparent 0 5px, rgba(91, 229, 195, 0.14) 5px 7px, transparent 7px 11px),
        linear-gradient(180deg, rgba(36, 120, 104, 0.07), rgba(12, 38, 37, 0.16));
    font-family: var(--mono);
    font-size: 0.55rem;
    text-align: center;
    text-shadow: 0 1px 4px #07110f;
}

.audio-waveform::after {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    content: "";
    background: rgba(91, 229, 195, 0.16);
}

.audio-levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 9px 0 0;
}

.audio-levels > div {
    min-width: 0;
    padding: 6px 7px;
    border-radius: 7px;
    background: rgba(130, 157, 180, 0.055);
}

.audio-levels dt {
    margin-bottom: 2px;
    color: #768da1;
    font-size: 0.58rem;
    font-weight: 700;
}

.audio-levels dd {
    margin: 0;
    color: #c6d8e5;
    font-family: var(--mono);
    font-size: 0.62rem;
    overflow-wrap: anywhere;
}

.station-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 11px;
}

.station-card__footer > span {
    min-width: 0;
    color: #71879a;
    font-family: var(--mono);
    font-size: 0.53rem;
    line-height: 1.5;
}

.station-card__footer button {
    flex-shrink: 0;
    min-height: 29px;
    padding: 5px 8px;
    font-size: 0.61rem;
}

/* Reusable state labels. Unknown is intentionally neutral so the UI
   does not imply real devices are online before integration. */
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(156, 175, 193, 0.2);
    border-radius: 7px;
    color: var(--unknown);
    background: rgba(134, 153, 172, 0.09);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.35;
}

.status::before {
    flex: 0 0 5px;
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
}

.status--unknown {
    border-color: rgba(164, 177, 192, 0.18);
    color: #a5b3c1;
    background: rgba(143, 160, 176, 0.075);
}

.status--online,
.status--active,
.status--healthy,
.status--success,
.status--connected {
    border-color: rgba(98, 228, 172, 0.23);
    color: #78edbd;
    background: rgba(60, 183, 129, 0.1);
}

.status--warning,
.status--degraded,
.status--clipping {
    border-color: rgba(244, 200, 117, 0.25);
    color: #f1cc81;
    background: rgba(194, 137, 41, 0.1);
}

.status--offline,
.status--error,
.status--critical,
.status--no-signal {
    border-color: rgba(255, 120, 134, 0.25);
    color: #ff9ca6;
    background: rgba(201, 66, 85, 0.1);
}

/* Focus view */
#focus-view-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 17px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(8, 15, 24, 0.42);
}

#focus-view-form label {
    align-self: center;
    margin-left: 3px;
}

#focus-view-form select {
    width: min(270px, 100%);
}

.focus-view-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr);
    gap: 14px;
}

.focus-view-panel__video {
    min-height: 260px;
    aspect-ratio: 16 / 9;
}

.focus-view-panel__video p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #9bb0bf;
    font-size: 0.78rem;
}

.focus-view-panel__video p:last-child {
    color: #6f899b;
    font-family: var(--mono);
    font-size: 0.63rem;
}

.focus-view-panel__audio {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(7, 15, 24, 0.4);
}

.focus-view-panel__audio h3 {
    margin-bottom: 10px;
}

.focus-view-panel__audio > p {
    display: flex;
    align-items: center;
    min-height: 56px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid rgba(91, 229, 195, 0.12);
    border-radius: 9px;
    color: #7ea99d;
    background: repeating-linear-gradient(90deg, rgba(91, 229, 195, 0.08) 0 2px, transparent 2px 8px), #0b171f;
    font-family: var(--mono);
    font-size: 0.68rem;
}

.focus-view-panel__audio dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.focus-view-panel__audio dl > div {
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(136, 157, 177, 0.045);
}

.focus-view-panel__audio dt {
    color: #8298aa;
    font-size: 0.66rem;
}

.focus-view-panel__audio dd {
    margin: 3px 0 0;
    color: #e2edf5;
    font-family: var(--mono);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

/* Tables — restrained density for operations screens */
.table-wrapper {
    width: 100%;
    overflow: auto;
    border: 1px solid rgba(132, 164, 190, 0.15);
    border-radius: 13px;
    background: rgba(7, 14, 22, 0.35);
    scrollbar-color: #304a5d transparent;
    scrollbar-width: thin;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #bdcbd7;
    font-size: 0.73rem;
    text-align: left;
}

table caption {
    padding: 13px 15px;
    color: #8ca2b5;
    font-size: 0.68rem;
    text-align: left;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid rgba(136, 166, 189, 0.2);
    color: #a5bacb;
    background: #162332;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

tbody td,
tbody th[scope="row"] {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(137, 164, 187, 0.085);
    font-weight: 500;
    white-space: nowrap;
}

tbody tr:last-child td,
tbody tr:last-child th {
    border-bottom: 0;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: rgba(91, 229, 195, 0.045);
}

tbody th[scope="row"] {
    color: #d9e8f1;
    font-family: var(--mono);
    font-size: 0.68rem;
}

tbody td[colspan] {
    padding: 25px 18px;
    color: #7f94a8;
    text-align: center;
    white-space: normal;
}

.technical-note,
.security-note {
    margin: 13px 0 0;
    padding: 11px 13px;
    border-left: 2px solid rgba(114, 185, 255, 0.45);
    border-radius: 0 8px 8px 0;
    color: #8198aa;
    background: rgba(114, 185, 255, 0.045);
    font-size: 0.7rem;
    line-height: 1.7;
}

/* Forms, filters, search and pagination */
#history-search-form fieldset {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 17px;
    background: rgba(7, 15, 24, 0.3);
}

.form-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

#history-search-form fieldset > button {
    align-self: end;
}

#session-filter-form,
#audit-filter-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(7, 15, 24, 0.3);
}

#session-filter-form label,
#audit-filter-form label {
    margin-left: 3px;
}

#session-filter-form select,
#session-filter-form input {
    width: auto;
    min-width: 180px;
    max-width: 260px;
}

#audit-filter-form input,
#audit-filter-form select {
    width: auto;
    min-width: 155px;
    max-width: 240px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 13px;
}

.pagination span {
    color: #8095a7;
    font-family: var(--mono);
    font-size: 0.68rem;
}

.pagination button {
    min-height: 31px;
    font-size: 0.66rem;
}

/* Device health, storage and administration */
.device-health-grid,
.administration-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.device-card,
.administration-grid article {
    position: relative;
    min-width: 0;
    padding: 15px;
    overflow: hidden;
    border: 1px solid rgba(132, 164, 190, 0.15);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(25, 41, 57, 0.76), rgba(14, 25, 37, 0.88));
    transition: border-color 160ms ease, transform 160ms ease;
}

.device-card:hover,
.administration-grid article:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 229, 195, 0.26);
}

.device-card h3,
.administration-grid article h3 {
    margin: 0 0 9px;
    color: #e5eef5;
    font-size: 0.83rem;
    letter-spacing: -0.02em;
}

.device-card p,
.administration-grid article p {
    margin: 6px 0 0;
    color: #8399ab;
    font-size: 0.69rem;
    line-height: 1.65;
}

.device-card p .status {
    margin-top: 3px;
}

.administration-grid article button {
    margin-top: 13px;
}

.storage-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.storage-summary > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid rgba(132, 164, 190, 0.13);
    border-radius: 12px;
    background: rgba(21, 35, 49, 0.65);
}

.storage-summary dt {
    color: #8ca0b2;
    font-size: 0.68rem;
    font-weight: 700;
}

.storage-summary dd {
    margin: 6px 0 0;
    color: #e0ebf4;
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.security-note {
    border-left-color: rgba(244, 200, 117, 0.5);
    background: rgba(244, 200, 117, 0.045);
}

/* Footer */
.app-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 22px;
    flex-wrap: wrap;
    padding: 4px 4px 20px;
}

.app-footer p {
    margin: 0;
    color: #65798c;
    font-size: 0.63rem;
}

.app-footer p:first-child {
    color: #9aacbc;
    font-weight: 700;
}

/* Responsive layout */
@media (max-width: 1550px) {
    :root { --sidebar-width: 238px; }
    .station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-card:last-child { grid-column: span 1; }
    .device-health-grid,
    .administration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
    :root { --sidebar-width: 215px; --header-height: 86px; }
    .app-header { gap: 16px; padding-inline: 20px; }
    .app-header__meta { max-width: 60%; gap: 8px 10px; }
    .app-header__meta p:nth-child(3) { display: none; }
    .main-content { padding: 20px; }
    .main-content > section { padding: 19px; }
    .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .focus-view-panel { grid-template-columns: minmax(0, 1fr); }
    .focus-view-panel__video { min-height: 250px; }
    #history-search-form fieldset { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .device-health-grid,
    .administration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .storage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    :root { --header-height: auto; }
    .app-header {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 17px 17px 15px;
    }
    .brand { padding-left: 48px; }
    .brand::before { width: 36px; height: 36px; }
    .brand h1 { font-size: 1.15rem; }
    .brand > p:last-child { max-width: 500px; line-height: 1.5; }
    .app-header__meta {
        justify-content: flex-start;
        max-width: 100%;
        width: 100%;
    }
    .app-header__meta p:nth-child(3) { display: flex; }
    .app-layout { display: block; }
    .sidebar {
        position: relative;
        top: auto;
        min-height: 0;
        max-height: none;
        gap: 13px;
        padding: 12px 15px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar nav h2 { margin-bottom: 7px; }
    .sidebar nav ul {
        display: flex;
        gap: 6px;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .sidebar nav li { flex: 0 0 auto; }
    .sidebar nav a { min-height: 34px; padding: 7px 10px; font-size: 0.69rem; }
    .sidebar nav a::before { width: 5px; height: 5px; flex-basis: 5px; }
    .sidebar__system-note { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; margin-top: 0; padding: 10px 12px; }
    .sidebar__system-note h2 { grid-column: 1 / -1; margin: 0 0 2px; }
    .sidebar__system-note p { margin-top: 4px; }
    .main-content { padding: 14px; }
    .main-content > section { margin-bottom: 14px; padding: 17px; border-radius: 16px; }
    .section-header { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 16px; }
    .section-actions { justify-content: flex-start; width: 100%; }
    .section-actions select { flex: 1 1 150px; max-width: none; }
    #station-size { flex-basis: 160px; }
    .station-range-controls { flex: 1 1 auto; justify-content: flex-start; }
    .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .metric-card { padding: 13px; }
    .metric-card dd { font-size: 1.55rem; }
    .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .station-card { padding: 9px; border-radius: 12px; }
    .station-card__header { flex-direction: column; }
    .station-card__header > .status { align-self: flex-start; }
    .camera-feed { min-height: 100px; }
    .station-card__audio { padding: 8px; }
    .station-card__audio-heading { align-items: flex-start; flex-direction: column; }
    .audio-levels { gap: 4px; }
    .audio-levels > div { padding: 5px; }
    .station-card__footer { align-items: flex-start; flex-direction: column; }
    .station-card__footer button { width: 100%; }
    #history-search-form fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
    #session-filter-form,
    #audit-filter-form,
    #focus-view-form { align-items: stretch; }
    #session-filter-form label,
    #audit-filter-form label,
    #focus-view-form label { align-self: auto; margin: 4px 0 -6px; }
    #session-filter-form select,
    #session-filter-form input,
    #audit-filter-form input,
    #audit-filter-form select { flex: 1 1 180px; width: 100%; min-width: 0; max-width: none; }
    #focus-view-form select { flex: 1 1 190px; width: auto; }
    .device-health-grid,
    .administration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .storage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-footer { display: grid; gap: 5px; }
}

@media (max-width: 480px) {
    body { font-size: 12px; }
    .app-header__meta { gap: 7px; }
    .app-header__meta p { font-size: 0.62rem; }
    .app-header__meta p:nth-child(3) { display: none; }
    .app-header__meta button { flex: 1 1 auto; }
    .sidebar { padding-inline: 10px; }
    .sidebar__system-note { grid-template-columns: 1fr; }
    .main-content { padding: 9px; }
    .main-content > section { padding: 13px; }
    .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card dt { font-size: 0.65rem; }
    .metric-card dd { font-size: 1.38rem; }
    .metric-card p { font-size: 0.61rem; }
    .station-grid { grid-template-columns: minmax(0, 1fr); }
    .station-card__header { flex-direction: row; }
    .station-card__audio-heading { align-items: center; flex-direction: row; }
    .station-card__footer { align-items: center; flex-direction: row; }
    .station-card__footer button { width: auto; }
    .camera-feed { min-height: 145px; }
    #history-search-form fieldset { grid-template-columns: minmax(0, 1fr); }
    .focus-view-panel__video { min-height: 190px; }
    .device-health-grid,
    .administration-grid,
    .storage-summary { grid-template-columns: minmax(0, 1fr); }
    .pagination { justify-content: space-between; gap: 6px; }
    .pagination button { padding-inline: 7px; font-size: 0.6rem; }
    .pagination span { font-size: 0.59rem; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ============================================================
   Monitoring toolbar refinements
   Keeps filter, card size, and station range controls aligned.
   ============================================================ */
#monitoring-grid > .section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 18px;
}

#monitoring-grid > .section-header > .section-actions {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(300px, 1.55fr);
    grid-template-rows: auto auto;
    align-items: end;
    justify-content: stretch;
    gap: 7px 12px;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(137, 163, 187,  0.15);
    border-radius: 15px;
    background: rgba(7, 14, 22, 0.38);
}

#monitoring-grid > .section-header > .section-actions > label {
    align-self: end;
    margin: 0 0 1px 2px;
    color: #91a5b7;
    font-size: 0.68rem;
    line-height: 1.3;
}

#monitoring-grid > .section-header > .section-actions > label:nth-child(1) { grid-column: 1; grid-row: 1; }
#monitoring-grid > .section-header > .section-actions > select:nth-child(2) { grid-column: 1; grid-row: 2; }
#monitoring-grid > .section-header > .section-actions > label:nth-child(3) { grid-column: 2; grid-row: 1; }
#monitoring-grid > .section-header > .section-actions > select:nth-child(4) { grid-column: 2; grid-row: 2; }
#monitoring-grid > .section-header > .section-actions > label:nth-child(5) { grid-column: 3; grid-row: 1; }
#monitoring-grid > .section-header > .section-actions > select:nth-child(6) { grid-column: 3; grid-row: 2; }

#monitoring-grid > .section-header > .section-actions > select {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 40px;
    padding: 8px 30px 8px 11px;
    font-size: 0.74rem;
}

#monitoring-grid > .section-header > .section-actions > .station-range-controls {
    display: grid;
    grid-column: 4;
    grid-row: 1 / 3;
    grid-template-columns: max-content minmax(54px, 1fr) max-content minmax(54px, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 75px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(91, 229, 195, 0.14);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(22, 42, 52, 0.72), rgba(9, 20, 29, 0.72));
}

#monitoring-grid .station-range-controls label {
    margin: 0;
    color: #a4b5c4;
    font-size: 0.68rem;
    white-space: nowrap;
}

#monitoring-grid .station-range-controls input[type="number"] {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 7px 5px;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

#monitoring-grid .station-range-controls button {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 0.7rem;
}

#monitoring-grid .station-grid-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 14px;
    padding: 7px 11px;
    border: 1px solid rgba(132, 164, 190, 0.13);
    border-radius: 9px;
    color: #9aafc0;
    background: rgba(8, 16, 25, 0.46);
    font-size: 0.7rem;
    line-height: 1.5;
}

#monitoring-grid .station-grid {
    align-items: stretch;
    grid-auto-flow: row;
}

#monitoring-grid .station-card {
    height: 100%;
}

@media (max-width: 1400px) {
    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto auto auto;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: start;
        width: fit-content;
        max-width: 100%;
        min-height: 0;
        grid-template-columns: max-content minmax(64px, 86px) max-content minmax(64px, 86px) auto;
    }
}

@media (max-width: 780px) {
    #monitoring-grid > .section-header {
        gap: 14px;
    }

    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto auto auto auto;
        gap: 7px 10px;
        padding: 11px;
    }

    #monitoring-grid > .section-header > .section-actions > label:nth-child(1) { grid-column: 1; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(2) { grid-column: 1; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(3) { grid-column: 2; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(4) { grid-column: 2; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(5) { grid-column: 1; grid-row: 3; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(6) { grid-column: 1; grid-row: 4; }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-column: 1 / -1;
        grid-row: 5;
        justify-self: stretch;
        width: 100%;
        max-width: none;
        grid-template-columns: max-content minmax(54px, 1fr) max-content minmax(54px, 1fr) auto;
    }

    #monitoring-grid .station-grid-summary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 10px;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-template-columns: max-content minmax(40px, 1fr) max-content minmax(40px, 1fr);
        gap: 7px 6px;
        padding: 9px;
    }

    #monitoring-grid .station-range-controls button {
        grid-column: 1 / -1;
        width: 100%;
    }

    #monitoring-grid .station-grid-summary {
        align-items: flex-start;
        font-size: 0.66rem;
    }
}

/* ============================================================
   COMPACT TILE REFINEMENT — ukuran gantangan "Kecil"
   Keeps metadata, status badges and audio meters aligned inside
   narrow cards without changing Medium/Large layouts.
   ============================================================ */
#monitoring-grid .station-grid.station-grid--size-small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 218px), 1fr)) !important;
    align-items: stretch;
    gap: 10px !important;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card {
    min-width: 0;
    height: 100%;
    padding: 10px;
    gap: 0;
    border-radius: 13px;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: 6px;
    margin-bottom: 8px;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header > div {
    width: 100%;
    min-width: 0;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header h3 {
    margin: 0 0 3px;
    font-size: 0.78rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header p {
    margin: 0;
    font-size: 0.56rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header > .status {
    justify-self: start;
    align-self: start;
    width: fit-content;
    max-width: 100%;
    padding: 3px 6px;
    gap: 4px;
    font-size: 0.54rem;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__header > .status::before {
    flex-basis: 4px;
    width: 4px;
    height: 4px;
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed {
    min-width: 0;
    min-height: 88px;
    max-height: 145px;
    padding: 8px 7px 20px;
    gap: 4px;
    border-radius: 9px;
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed::before {
    inset: 7px;
    border-radius: 6px;
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed::after {
    width: 19px;
    height: 19px;
    box-shadow: 0 0 0 5px rgba(91, 229, 195, 0.025), 0 0 15px rgba(91, 229, 195, 0.05);
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed__placeholder {
    max-width: 100%;
    font-size: 0.55rem;
    line-height: 1.35;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed__placeholder::before {
    margin-bottom: 3px;
    font-size: 0.95rem;
}

#monitoring-grid .station-grid.station-grid--size-small .camera-feed__timestamp {
    right: 6px;
    bottom: 4px;
    left: 6px;
    font-size: 0.46rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__audio {
    min-width: 0;
    margin-top: 8px;
    padding: 7px;
    border-radius: 9px;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: 5px;
    margin-bottom: 7px;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading h4 {
    font-size: 0.62rem;
    line-height: 1.35;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading .status {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    padding: 3px 5px;
    gap: 4px;
    font-size: 0.5rem;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading .status::before {
    flex-basis: 4px;
    width: 4px;
    height: 4px;
}

#monitoring-grid .station-grid.station-grid--size-small .audio-waveform {
    min-width: 0;
    min-height: 29px;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 0.46rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

#monitoring-grid .station-grid.station-grid--size-small .audio-levels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: 7px;
}

#monitoring-grid .station-grid.station-grid--size-small .audio-levels > div {
    min-width: 0;
    padding: 5px 4px;
    border-radius: 6px;
}

#monitoring-grid .station-grid.station-grid--size-small .audio-levels dt {
    margin-bottom: 3px;
    font-size: 0.5rem;
    line-height: 1.25;
}

#monitoring-grid .station-grid.station-grid--size-small .audio-levels dd {
    font-size: 0.52rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 7px;
    margin-top: auto;
    padding-top: 8px;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__footer > span {
    min-width: 0;
    font-size: 0.48rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-small .station-card__footer button {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 0.56rem;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
}

@media (max-width: 780px) {
    #monitoring-grid .station-grid.station-grid--size-small {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)) !important;
        gap: 9px !important;
    }
}

@media (max-width: 480px) {
    #monitoring-grid .station-grid.station-grid--size-small {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #monitoring-grid .station-grid.station-grid--size-small .camera-feed {
        min-height: 96px;
        max-height: none;
        aspect-ratio: 16 / 8;
    }
}

@media print {
    :root { color-scheme: light; }
    body { color: #111; background: #fff; }
    body::before { display: none; }
    .app-header { position: static; color: #111; background: #fff; }
    .sidebar { position: static; max-height: none; background: #fff; }
    .app-layout { display: block; }
    .main-content > section,
    .station-card,
    .device-card,
    .administration-grid article { color: #111; background: #fff; box-shadow: none; break-inside: avoid; }
    .sidebar nav a, p, h1, h2, h3, h4, table, tbody td, tbody th { color: #111; }
    button { display: none; }
}

/* ============================================================
   RESPONSIVE UX PASS — tablet/mobile navigation, touch targets,
   fluid panels, legible tables and consistent control spacing.
   ============================================================ */

:root {
    --focus-ring: 0 0 0 3px rgba(91, 229, 195, 0.14);
    --content-gutter: clamp(12px, 2.2vw, 30px);
}

html {
    scroll-padding-top: 18px;
    scrollbar-gutter: stable;
}

body {
    overflow-x: clip;
}

.app-header,
.app-layout,
.main-content,
.main-content > section,
.section-header,
.section-actions,
.station-grid,
.station-card,
.focus-view-panel,
.device-health-grid,
.administration-grid,
.storage-summary,
.table-wrapper {
    min-width: 0;
}

.app-header {
    gap: clamp(14px, 2vw, 30px);
}

.app-header__meta {
    min-width: 0;
}

.app-header__meta p {
    min-width: 0;
    flex-wrap: wrap;
}

.app-header__meta .status {
    white-space: normal;
}

.main-content {
    padding: var(--content-gutter);
}

.main-content > section {
    scroll-margin-top: 18px;
    overflow: clip;
}

.section-header {
    min-width: 0;
}

.section-header > div,
.section-header > div:first-child {
    min-width: 0;
}

.section-header p {
    overflow-wrap: anywhere;
}

/* More forgiving touch targets and form alignment. */
button,
select,
input:not([type="checkbox"]):not([type="radio"]),
textarea {
    max-width: 100%;
}

button,
select,
input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 40px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

.section-actions {
    min-width: 0;
}

.section-actions select,
.section-actions input {
    min-width: 0;
}

/* Navigation toggle is injected by dashboard.js and only shown on compact screens. */
.mobile-nav-toggle {
    display: none;
}

/* Avoid oversized hover movement on touch-first devices. */
@media (hover: none) {
    .station-card:hover,
    .metric-card:hover,
    .device-card:hover,
    .administration-grid article:hover,
    button:hover:not(:disabled) {
        transform: none;
    }
}

/* Desktop and laptop: allow the cards to use available horizontal space. */
@media (min-width: 781px) {
    .app-layout {
        width: 100%;
    }

    .main-content > section {
        overflow: visible;
    }

    .sidebar {
        align-self: stretch;
    }

    .table-wrapper {
        overscroll-behavior-x: contain;
    }
}

@media (max-width: 1280px) {
    .app-header {
        align-items: flex-start;
    }

    .brand {
        flex: 1 1 320px;
    }

    .app-header__meta {
        flex: 1 1 420px;
        max-width: none;
    }

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

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 205px;
    }

    .app-header {
        padding-inline: 18px;
    }

    .app-header__meta {
        gap: 8px;
    }

    .app-header__meta p {
        font-size: 0.65rem;
    }

    .main-content > section {
        padding: clamp(14px, 2vw, 20px);
        border-radius: 16px;
    }

    .device-health-grid,
    .administration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-wrapper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 780px) {
    :root {
        --header-height: auto;
        --content-gutter: 12px;
    }

    .app-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 12px;
        padding: 15px 14px 13px;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        padding-left: 45px;
    }

    .brand::before {
        top: 3px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand__eyebrow {
        font-size: 0.58rem;
        letter-spacing: 0.11em;
    }

    .brand h1 {
        font-size: clamp(1rem, 3.4vw, 1.2rem);
        overflow-wrap: anywhere;
    }

    .brand > p:last-child {
        max-width: 100%;
        font-size: 0.63rem;
        line-height: 1.5;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        min-height: 42px;
        padding: 8px 11px;
        border-color: rgba(91, 229, 195, 0.30);
        border-radius: 11px;
        white-space: nowrap;
    }

    .app-header__meta {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: none;
        padding-top: 11px;
        border-top: 1px solid var(--line);
    }

    .app-header__meta p {
        align-items: flex-start;
        gap: 5px;
        min-width: 0;
        font-size: 0.63rem;
        line-height: 1.5;
    }

    .app-header__meta p:first-child {
        grid-column: 1 / -1;
    }

    .app-header__meta p:nth-child(3) {
        display: none;
    }

    .app-header__meta time {
        overflow-wrap: anywhere;
        font-size: 0.62rem;
    }

    .app-header__meta button {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 7px 9px;
        font-size: 0.68rem;
    }

    .app-layout {
        display: block;
        width: 100%;
    }

    .sidebar {
        position: relative;
        top: auto;
        display: block;
        width: 100%;
        min-height: 0;
        max-height: none;
        padding: 13px 14px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(9, 16, 25, 0.98);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
    }

    .sidebar.is-collapsed {
        display: none;
    }

    .sidebar nav h2 {
        margin: 0 0 8px;
    }

    .sidebar nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        max-height: min(55vh, 380px);
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar nav li {
        min-width: 0;
    }

    .sidebar nav a {
        min-height: 40px;
        gap: 8px;
        padding: 8px 9px;
        font-size: 0.68rem;
        line-height: 1.35;
        white-space: normal;
    }

    .sidebar nav a::before {
        flex: 0 0 5px;
        width: 5px;
        height: 5px;
    }

    .sidebar__system-note {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
        margin-top: 13px;
        padding: 11px;
    }

    .sidebar__system-note h2 {
        grid-column: 1 / -1;
        margin: 0 0 2px;
    }

    .sidebar__system-note p {
        flex-wrap: wrap;
        margin: 4px 0 0;
        font-size: 0.64rem;
    }

    .main-content {
        padding: var(--content-gutter);
    }

    .main-content > section {
        margin-bottom: 13px;
        padding: 15px;
        border-radius: 15px;
    }

    .section-header {
        align-items: stretch;
        flex-direction: column;
        gap: 13px;
        margin-bottom: 15px;
        padding-bottom: 13px;
    }

    .section-header h2 {
        font-size: 1.08rem;
    }

    .section-header p {
        font-size: 0.72rem;
    }

    .summary-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .metric-card {
        padding: 12px;
        border-radius: 12px;
    }

    .metric-card dt {
        font-size: 0.66rem;
        line-height: 1.4;
    }

    .metric-card dd {
        margin: 8px 0 6px;
        font-size: clamp(1.3rem, 4vw, 1.7rem);
    }

    .metric-card p {
        font-size: 0.62rem;
    }

    /* The monitoring controls become a predictable two-column form. */
    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto auto auto auto;
        gap: 7px 9px;
        padding: 11px;
        border-radius: 13px;
    }

    #monitoring-grid > .section-header > .section-actions > label:nth-child(1) { grid-column: 1; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(2) { grid-column: 1; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(3) { grid-column: 2; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(4) { grid-column: 2; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(5) { grid-column: 1 / -1; grid-row: 3; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(6) { grid-column: 1 / -1; grid-row: 4; }

    #monitoring-grid > .section-header > .section-actions > select {
        min-height: 42px;
        font-size: 0.72rem;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-column: 1 / -1;
        grid-row: 5;
        grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr) auto;
        gap: 7px;
        width: 100%;
        max-width: none;
        min-height: 0;
        padding: 9px;
    }

    #monitoring-grid .station-range-controls label {
        font-size: 0.65rem;
    }

    #monitoring-grid .station-range-controls input[type="number"] {
        min-height: 42px;
        font-size: 0.78rem;
    }

    #monitoring-grid .station-range-controls button {
        min-height: 42px;
    }

    #monitoring-grid .station-grid-summary {
        display: flex;
        width: 100%;
        margin-bottom: 11px;
        font-size: 0.68rem;
    }

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

    .station-card {
        padding: 10px;
        border-radius: 13px;
    }

    .station-card__header {
        gap: 7px;
    }

    .station-card__header > .status {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .station-card__audio-heading .status {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .station-card__footer {
        gap: 8px;
    }

    .station-card__footer > span {
        overflow-wrap: anywhere;
    }

    .station-card__footer button {
        min-height: 38px;
    }

    .focus-view-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .focus-view-panel__video {
        min-height: 210px;
    }

    #history-search-form fieldset {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .device-health-grid,
    .administration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .device-card,
    .administration-grid article {
        padding: 12px;
    }

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

    .table-wrapper {
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .table-wrapper table {
        width: max-content;
        min-width: 100%;
    }

    thead th,
    tbody td,
    tbody th[scope="row"] {
        padding: 10px 11px;
    }

    .app-footer {
        display: grid;
        gap: 6px;
        padding-inline: 3px;
    }
}

@media (max-width: 520px) {
    .app-header {
        padding-inline: 11px;
    }

    .brand {
        padding-left: 41px;
    }

    .brand::before {
        width: 31px;
        height: 31px;
    }

    .brand > p:last-child {
        max-width: 26ch;
    }

    .mobile-nav-toggle {
        min-height: 39px;
        padding: 7px 9px;
        font-size: 0.68rem;
    }

    .app-header__meta {
        gap: 7px;
    }

    .app-header__meta p:first-child {
        line-height: 1.6;
    }

    .main-content > section {
        padding: 12px;
        border-radius: 13px;
    }

    .summary-metrics {
        gap: 7px;
    }

    .metric-card {
        padding: 10px;
    }

    .metric-card dd .status {
        display: inline-flex;
        white-space: normal;
        max-width: 100%;
    }

    #monitoring-grid > .section-header > .section-actions {
        gap: 6px 8px;
        padding: 9px;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
        gap: 7px 6px;
        padding: 8px;
    }

    #monitoring-grid .station-range-controls button {
        grid-column: 1 / -1;
        width: 100%;
    }

    /* On compact screens, keep one card per row for readable video/audio metadata. */
    #monitoring-grid .station-grid.station-grid--size-small,
    #monitoring-grid .station-grid.station-grid--size-medium,
    #monitoring-grid .station-grid.station-grid--size-large {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__header > .status {
        max-width: 128px;
        justify-self: end;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__audio-heading .status {
        max-width: 145px;
        justify-self: end;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__footer {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    #monitoring-grid .station-grid.station-grid--size-small .station-card__footer button {
        width: auto;
    }

    #history-search-form fieldset {
        grid-template-columns: minmax(0, 1fr);
    }

    #session-filter-form,
    #audit-filter-form,
    #focus-view-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #session-filter-form select,
    #session-filter-form input,
    #audit-filter-form input,
    #audit-filter-form select,
    #focus-view-form select {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .device-health-grid,
    .administration-grid,
    .storage-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .pagination {
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

@media (max-width: 360px) {
    .app-header__meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-header__meta p:first-child {
        grid-column: auto;
    }

    .sidebar nav ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
    }

    #monitoring-grid > .section-header > .section-actions > label,
    #monitoring-grid > .section-header > .section-actions > select,
    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-column: 1;
        grid-row: auto;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls label:nth-of-type(2) {
        grid-column: 1;
    }

    #monitoring-grid > .section-header > .section-actions > .station-range-controls input:nth-of-type(2) {
        grid-column: 2;
    }

    #monitoring-grid .station-range-controls button {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .mobile-nav-toggle,
    .station-card,
    .metric-card {
        transition: none !important;
    }
}

/* Small usability details added alongside responsive navigation. */
.table-scroll-hint {
    margin: 7px 2px 0;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.5;
}

.table-scroll-hint[hidden] {
    display: none !important;
}

.table-wrapper:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.back-to-top {
    position: fixed;
    z-index: 70;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: inline-flex;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid rgba(91, 229, 195, 0.38);
    border-radius: 999px;
    color: #062019;
    background: linear-gradient(135deg, #7bf1d2, #43d4b2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 24px rgba(91, 229, 195, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 780px) {
    .table-scroll-hint:not([hidden]) {
        display: block;
    }

    .back-to-top {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none !important;
    }
}


/* ============================================================
   SIDEBAR COLLAPSE + EXTRA-SMALL GANTANGAN CARDS
   Final overrides for desktop, tablet and mobile behaviour.
   ============================================================ */
.mobile-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(91, 229, 195, 0.28);
    border-radius: 11px;
    color: #dffff5;
    background: linear-gradient(135deg, rgba(42, 128, 111, 0.22), rgba(37, 74, 101, 0.22));
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.mobile-nav-toggle:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(91, 229, 195, 0.55);
    background: rgba(51, 145, 125, 0.25);
    transform: none;
}

.mobile-nav-toggle[aria-expanded="false"] {
    color: var(--accent, #5be5c3);
}

.sidebar {
    transition: opacity 160ms ease, transform 180ms ease;
}

@media (min-width: 781px) {
    .app-header {
        justify-content: flex-start;
    }

    .brand {
        flex: 1 1 300px;
    }

    .mobile-nav-toggle {
        order: 2;
        align-self: center;
    }

    .app-header__meta {
        order: 3;
        flex: 0 1 auto;
        margin-left: auto;
    }

    @media (max-width: 1280px) {
        .app-header {
            gap: 12px;
            padding-inline: 18px;
        }

        .brand {
            flex-basis: 280px;
        }

        .app-header__meta {
            gap: 7px 9px;
        }

        .mobile-nav-toggle {
            padding-inline: 9px;
            font-size: 0.67rem;
        }
    }

    .app-layout.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .app-layout.is-sidebar-collapsed > .sidebar,
    .sidebar.is-collapsed {
        display: none !important;
    }

    .app-layout:not(.is-sidebar-collapsed) {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }
}

/* The extra-small preset is intentionally compact for wall-monitor overviews. */
#monitoring-grid .station-grid.station-grid--size-extra-small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)) !important;
    align-items: stretch;
    gap: 7px !important;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card {
    display: flex;
    min-width: 0;
    height: 100%;
    gap: 0;
    padding: 7px;
    border-radius: 10px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 4px;
    margin-bottom: 6px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header > div {
    min-width: 0;
    width: 100%;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header h3 {
    margin: 0 0 2px;
    font-size: 0.67rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header p {
    font-size: 0.49rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header > .status {
    justify-self: start;
    max-width: 100%;
    padding: 2px 5px;
    gap: 4px;
    font-size: 0.47rem;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header > .status::before {
    flex-basis: 4px;
    width: 4px;
    height: 4px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed {
    min-width: 0;
    min-height: 68px;
    max-height: 105px;
    padding: 5px 4px 17px;
    gap: 3px;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed::before {
    inset: 5px;
    border-radius: 5px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed::after {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 0 4px rgba(91, 229, 195, 0.025);
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__placeholder {
    max-width: 100%;
    font-size: 0.47rem;
    line-height: 1.25;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__placeholder::before {
    margin-bottom: 2px;
    font-size: 0.72rem;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__timestamp {
    right: 4px;
    bottom: 3px;
    left: 4px;
    font-size: 0.39rem;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio {
    min-width: 0;
    margin-top: 6px;
    padding: 5px;
    border-radius: 7px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 3px;
    margin-bottom: 5px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading h4 {
    font-size: 0.52rem;
    line-height: 1.25;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading .status {
    justify-self: start;
    max-width: 100%;
    padding: 2px 4px;
    gap: 3px;
    font-size: 0.43rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading .status::before {
    flex-basis: 3px;
    width: 3px;
    height: 3px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .audio-waveform {
    min-width: 0;
    min-height: 23px;
    padding: 4px;
    border-radius: 6px;
    font-size: 0.4rem;
    line-height: 1.25;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    margin-top: 5px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels > div {
    min-width: 0;
    padding: 4px 3px;
    border-radius: 5px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels dt {
    margin-bottom: 2px;
    font-size: 0.43rem;
    line-height: 1.2;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels dd {
    font-size: 0.43rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 5px;
    margin-top: auto;
    padding-top: 6px;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer > span {
    min-width: 0;
    font-size: 0.41rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer button {
    width: 100%;
    min-width: 0;
    min-height: 25px;
    padding: 4px 5px;
    border-radius: 6px;
    font-size: 0.47rem;
    line-height: 1.2;
    white-space: normal;
}

@media (max-width: 780px) {
    .mobile-nav-toggle {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        min-height: 42px;
        padding: 8px 11px;
    }

    #monitoring-grid .station-grid.station-grid--size-extra-small {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }
}

@media (max-width: 380px) {
    .mobile-nav-toggle {
        padding: 7px 8px;
        font-size: 0.64rem;
    }

    #monitoring-grid .station-grid.station-grid--size-extra-small {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* ============================================================
   VISUAL POLISH — MEGA ALL STAR ARENA
   A calmer, more cohesive premium control-room design.
   These overrides intentionally preserve existing JS hooks.
   ============================================================ */
:root {
    --bg: #080e16;
    --bg-soft: #0d1520;
    --panel: rgba(15, 25, 37, 0.96);
    --panel-solid: #101b28;
    --panel-raised: #152333;
    --panel-hover: #1a2b3d;
    --line: rgba(151, 177, 199,  0.12);
    --line-strong: rgba(151, 177, 199, 0.22);
    --text: #f0f5f8;
    --text-soft: #b3c0cd;
    --muted: #8295a8;
    --accent: #67e8c8;
    --accent-strong: #31c8a8;
    --accent-blue: #83bfff;
    --warning: #f1c879;
    --danger: #ff8591;
    --success: #67e1ab;
    --unknown: #a6b3c0;
    --radius-sm: 9px;
    --radius-md: 14px;
    --radius-lg: 19px;
    --shadow: 0 20px 50px rgba(0, 0, 0, .23);
    --shadow-soft: 0 8px 28px rgba(0, 0, 0, .15);
}

html {
    background: var(--bg);
    scroll-padding-top: 110px;
}

body {
    color: var(--text);
    background:
        radial-gradient(ellipse at 10% 0%, rgba(41, 119, 112, .13), transparent 36rem),
        radial-gradient(ellipse at 95% 12%, rgba(52, 92, 142, .10), transparent 34rem),
        linear-gradient(180deg, #0a111a 0%, #080e16 58%, #070b11 100%);
    font-size: 13px;
    line-height: 1.58;
}

body::before {
    opacity: .42;
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 64%);
}

h1, h2, h3, h4, h5 {
    color: #f2f6fa;
    letter-spacing: -.028em;
}

p { color: var(--text-soft); }

.app-header {
    min-height: 88px;
    padding: 15px clamp(18px, 2.5vw, 36px);
    gap: 20px;
    border-bottom-color: rgba(154, 184, 207, .13);
    background: rgba(7, 13, 21, .89);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

.app-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(103, 232, 200, .22), rgba(131, 191, 255, .12), transparent);
}

.brand { padding-left: 48px; }
.brand::before {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    border-color: rgba(103, 232, 200, .38);
    background: linear-gradient(145deg, rgba(103, 232, 200, .17), rgba(67, 113, 160, .16));
    box-shadow: 0 6px 18px rgba(32, 186, 151, .08), inset 0 1px 0 rgba(255,255,255,.08);
}
.brand__eyebrow { color: #72e4c7; letter-spacing: .145em; }
.brand h1 { font-size: clamp(1.1rem, 1.5vw, 1.42rem); }
.brand > p:last-child { color: #8fa3b5; font-size: .69rem; }

.app-header__meta { gap: 8px 12px; }
.app-header__meta p { color: #91a3b4; font-size: .68rem; }
.app-header__meta button { border-radius: 9px; }

.mobile-nav-toggle {
    min-height: 39px;
    border-color: rgba(103, 232, 200, .22);
    border-radius: 10px;
    background: rgba(103, 232, 200, .075);
    color: #c8f6e9;
    box-shadow: none;
}
.mobile-nav-toggle:hover:not(:disabled) { background: rgba(103, 232, 200, .13); }

.app-layout { max-width: 2000px; }
.sidebar {
    padding: 23px 13px 18px;
    border-right-color: rgba(151, 177, 199, .11);
    background: rgba(8, 15, 24, .76);
    scrollbar-color: #2a4052 transparent;
}
.sidebar nav h2,
.sidebar__system-note h2 {
    color: #71889b;
    font-size: .62rem;
    letter-spacing: .14em;
}
.sidebar nav ul { gap: 3px; }
.sidebar nav a {
    min-height: 39px;
    padding: 8px 10px;
    border-radius: 9px;
    color: #9bafc0;
    font-size: .74rem;
    font-weight: 600;
}
.sidebar nav a::before { flex-basis: 5px; width: 5px; height: 5px; }
.sidebar nav a:hover {
    border-color: rgba(142, 174, 198, .12);
    color: #edf7fb;
    background: rgba(126, 160, 186, .07);
}
.sidebar nav a[aria-current="page"] {
    color: #e3fff6;
    border-color: rgba(103, 232, 200, .15);
    background: linear-gradient(90deg, rgba(49, 200, 168, .13), rgba(49, 200, 168, .035));
    box-shadow: inset 2px 0 0 #59d9b8;
}
.sidebar__system-note {
    padding: 14px 12px 12px;
    border-color: rgba(151, 177, 199, .13);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(22, 37, 52, .72), rgba(12, 21, 32, .78));
}
.sidebar__system-note p { font-size: .66rem; }

.main-content { padding: clamp(16px, 2vw, 30px); }
.main-content > section {
    margin-bottom: 21px;
    padding: clamp(17px, 1.8vw, 26px);
    border: 1px solid rgba(148, 176, 199, .12);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(16, 27, 40, .96), rgba(11, 19, 29, .96));
    box-shadow: 0 9px 26px rgba(0, 0, 0, .11);
}
.main-content > section:first-child {
    border-color: rgba(103, 232, 200, .16);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(48, 133, 126, .095), transparent 34%),
        linear-gradient(145deg, rgba(17, 30, 43, .98), rgba(11, 20, 30, .97));
}

.section-eyebrow {
    margin-bottom: 5px;
    color: #6edfc2;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.section-header {
    gap: 18px;
    margin-bottom: 19px;
    padding-bottom: 15px;
    border-bottom-color: rgba(151, 177, 199, .12);
}
.section-header h2 {
    margin-bottom: 5px;
    font-size: clamp(1.06rem, 1.25vw, 1.28rem);
    letter-spacing: -.035em;
}
.section-header p { margin-bottom: 0; color: #90a4b6; font-size: .76rem; }

.summary-metrics { gap: 11px; }
.metric-card {
    position: relative;
    min-width: 0;
    padding: 15px 15px 13px;
    border: 1px solid rgba(148, 176, 199, .12);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(24, 39, 54, .86), rgba(14, 24, 36, .96));
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
}
.metric-card::after {
    top: 0;
    right: 14px;
    left: 14px;
    height: 1px;
    opacity: .7;
    background: linear-gradient(90deg, transparent, rgba(103, 232, 200, .32), transparent);
}
.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103, 232, 200, .24);
    box-shadow: 0 12px 24px rgba(0,0,0,.15);
}
.metric-card dt { color: #9aafc0; font-size: .69rem; }
.metric-card dd { margin: 8px 0 5px; color: #f2f8fb; font-size: clamp(1.35rem, 1.7vw, 1.8rem); letter-spacing: -.05em; }
.metric-card dd small { color: #8297aa; font-size: .76rem; letter-spacing: 0; }
.metric-card p { margin-bottom: 0; color: #7f94a7; font-size: .66rem; line-height: 1.45; }

.system-notice {
    margin-top: 17px;
    padding: 14px 16px 14px 18px;
    border: 1px solid rgba(131, 191, 255, .14);
    border-radius: 13px;
    background: linear-gradient(110deg, rgba(47, 91, 128, .12), rgba(16, 31, 44, .42));
}
.system-notice::before { width: 3px; border-radius: 4px; background: #83bfff; }
.system-notice h3 { margin-bottom: 4px; font-size: .82rem; }
.system-notice p { font-size: .73rem; }

.section-actions {
    gap: 8px 10px;
}
.section-actions label { color: #91a5b7; font-size: .68rem; }
select, input, textarea {
    border-color: rgba(145, 173, 196, .17);
    border-radius: 9px;
    color: #e8f0f5;
    background-color: #0b1420;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.12);
}
select:hover, input:hover, textarea:hover { border-color: rgba(103, 232, 200, .32); }
select:focus, input:focus, textarea:focus { border-color: rgba(103, 232, 200, .68); box-shadow: 0 0 0 3px rgba(103, 232, 200, .075); }
button {
    min-height: 38px;
    padding: 8px 12px;
    border-color: rgba(103, 232, 200, .22);
    border-radius: 9px;
    color: #e1fff6;
    background: linear-gradient(180deg, rgba(39, 117, 103, .32), rgba(20, 65, 63, .29));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
button:hover:not(:disabled) {
    border-color: rgba(103, 232, 200, .46);
    background: linear-gradient(180deg, rgba(44, 133, 115, .42), rgba(22, 77, 72, .36));
    box-shadow: 0 5px 16px rgba(23, 161, 130, .08);
}

/* Monitoring controls — grouped, balanced, and easier to scan. */
#monitoring-grid > .section-header > .section-actions {
    gap: 7px 10px;
    padding: 12px;
    border-color: rgba(145, 173, 196, .12);
    border-radius: 14px;
    background: rgba(6, 13, 21, .35);
}
#monitoring-grid > .section-header > .section-actions > label {
    color: #879caf;
    font-size: .65rem;
    letter-spacing: .01em;
}
#monitoring-grid > .section-header > .section-actions > select {
    min-height: 39px;
    border-radius: 9px;
    font-size: .71rem;
}
#monitoring-grid > .section-header > .section-actions > .station-range-controls {
    border-color: rgba(103, 232, 200, .13);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(20, 39, 48, .78), rgba(9, 18, 27, .84));
}
#monitoring-grid .station-range-controls input[type="number"] {
    min-height: 36px;
    border-radius: 8px;
    background: rgba(6, 14, 22, .78);
}
#monitoring-grid .station-range-controls button { min-height: 36px; }
#monitoring-grid .station-grid-summary {
    display: flex;
    width: fit-content;
    margin: 0 0 13px;
    padding: 7px 11px;
    border-color: rgba(145, 173, 196, .1);
    border-radius: 9px;
    color: #9bb0c1;
    background: rgba(8, 16, 25, .5);
    font-size: .69rem;
}
#monitoring-grid .station-grid-summary::before {
    content: "";
    display: inline-block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    margin: auto 2px auto 0;
    border-radius: 50%;
    background: #6edfc2;
    box-shadow: 0 0 0 3px rgba(103, 232, 200, .08);
}

.station-grid {
    gap: 12px;
    align-items: stretch;
}
.station-card {
    padding: 12px;
    border-color: rgba(145, 173, 196, .13);
    border-radius: 14px;
    background: linear-gradient(158deg, rgba(22, 36, 51, .96), rgba(13, 23, 34, .98));
    box-shadow: 0 5px 16px rgba(0, 0, 0, .10);
}
.station-card:hover {
    border-color: rgba(103, 232, 200, .26);
    box-shadow: 0 11px 25px rgba(0, 0, 0, .18);
}
.station-card__header {
    gap: 9px;
    margin-bottom: 10px;
}
.station-card__header h3 { margin-bottom: 3px; font-size: .82rem; }
.station-card__header p { color: #8096a9; font-size: .57rem; }
.station-card__header > .status { flex-shrink: 0; }

.camera-feed,
.focus-view-panel__video {
    border-color: rgba(140, 170, 194, .13);
    border-radius: 10px;
    background:
        radial-gradient(ellipse at center, rgba(41, 68, 81, .23), transparent 70%),
        repeating-linear-gradient(0deg, rgba(115, 153, 176, .025) 0 1px, transparent 1px 4px),
        #07101a;
}
.camera-feed::before,
.focus-view-panel__video::before { border-color: rgba(121, 169, 186, .08); }
.camera-feed::after,
.focus-view-panel__video::after { opacity: .68; box-shadow: 0 0 0 5px rgba(103, 232, 200, .035); }
.camera-feed__placeholder { color: #829bad; font-size: .62rem; }
.camera-feed__placeholder::before { filter: saturate(.8); }
.camera-feed__timestamp { color: #8da2b3; font-size: .52rem; }

.station-card__audio {
    margin-top: 9px;
    padding: 9px;
    border: 1px solid rgba(145, 173, 196, .09);
    border-radius: 10px;
    background: rgba(7, 14, 22, .35);
}
.station-card__audio-heading { gap: 7px; margin-bottom: 7px; }
.station-card__audio-heading h4 { color: #c5d4df; font-size: .7rem; }
.audio-waveform {
    min-height: 39px;
    border-color: rgba(103, 232, 200, .09);
    border-radius: 8px;
    color: #8bb9ae;
    background:
        linear-gradient(180deg, transparent 49%, rgba(103, 232, 200, .10) 50%, transparent 51%),
        repeating-linear-gradient(90deg, transparent 0 6px, rgba(103, 232, 200, .095) 6px 8px, transparent 8px 13px),
        rgba(12, 30, 34, .42);
    text-shadow: none;
}
.audio-waveform::after { background: rgba(103, 232, 200, .13); }
.audio-levels { gap: 5px; margin-top: 7px; }
.audio-levels > div {
    padding: 6px;
    border: 1px solid rgba(145, 173, 196, .055);
    border-radius: 7px;
    background: rgba(133, 160, 182, .045);
}
.audio-levels dt { color: #8298aa; font-size: .56rem; }
.audio-levels dd { color: #d0dce5; font-size: .61rem; }
.station-card__footer { gap: 7px; padding-top: 9px; }
.station-card__footer > span { color: #72889b; font-size: .51rem; }
.station-card__footer button { min-height: 30px; border-radius: 8px; font-size: .59rem; }

.status {
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: .59rem;
    font-weight: 700;
    letter-spacing: .005em;
}
.status::before { box-shadow: none; }
.status--unknown { color: #b0bfcc; background: rgba(148, 165, 181, .08); border-color: rgba(148, 165, 181, .15); }
.status--online, .status--active, .status--healthy, .status--success, .status--connected {
    color: #8df0c6; background: rgba(69, 186, 133, .09); border-color: rgba(69, 186, 133, .18);
}
.status--warning, .status--degraded, .status--clipping {
    color: #f3d18b; background: rgba(214, 166, 65, .09); border-color: rgba(214, 166, 65, .18);
}
.status--offline, .status--error, .status--critical, .status--no-signal {
    color: #ff9da5; background: rgba(219, 86, 101, .085); border-color: rgba(219, 86, 101, .19);
}

.focus-view-panel {
    gap: 14px;
    padding: 13px;
    border: 1px solid rgba(145, 173, 196, .12);
    border-radius: 15px;
    background: rgba(7, 14, 22, .32);
}
.focus-view-panel__video { min-height: 260px; }
.focus-view-panel__audio {
    padding: 14px;
    border: 1px solid rgba(145, 173, 196, .10);
    border-radius: 12px;
    background: rgba(17, 29, 42, .68);
}

.table-wrapper {
    border: 1px solid rgba(145, 173, 196, .12);
    border-radius: 12px;
    background: rgba(7, 14, 22, .28);
}
table { border-collapse: separate; border-spacing: 0; }
thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #9fb2c2;
    background: #142131;
    border-bottom: 1px solid rgba(145, 173, 196, .13);
    font-size: .67rem;
    letter-spacing: .025em;
}
th, td { padding: 10px 12px; border-bottom-color: rgba(145, 173, 196, .075); }
tbody tr:nth-child(even) { background: rgba(145, 173, 196, .018); }
tbody tr:hover { background: rgba(103, 232, 200, .035); }
tbody td { color: #bdcad5; font-size: .72rem; }

.form-field { gap: 6px; }
fieldset { border-color: rgba(145, 173, 196, .13); background: rgba(8, 15, 24, .24); }
.form-field label { color: #9bafbf; }
.device-health-grid,
.administration-grid { gap: 12px; }
.device-card,
.administration-grid article {
    border-color: rgba(145, 173, 196, .12);
    border-radius: 13px;
    background: linear-gradient(150deg, rgba(22, 36, 50, .8), rgba(12, 21, 32, .88));
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
}
.administration-grid article { padding: 15px; }
.administration-grid article:hover { border-color: rgba(103, 232, 200, .22); }
.administration-grid article h3 { font-size: .84rem; }
.administration-grid article p { color: #8da2b4; font-size: .72rem; }

.app-footer {
    padding: 14px 4px 8px;
    border-top-color: rgba(145, 173, 196, .09);
}
.app-footer p { color: #71869a; font-size: .65rem; }
.app-footer p:first-child { color: #9db0bf; }

/* Extra-small cards stay compact, but text remains deliberately legible. */
#monitoring-grid .station-grid.station-grid--size-extra-small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 188px), 1fr)) !important;
    gap: 9px !important;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card {
    padding: 9px;
    border-radius: 12px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header {
    gap: 5px;
    margin-bottom: 7px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header h3 {
    font-size: .68rem;
    line-height: 1.3;
    letter-spacing: -.015em;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header p {
    font-size: .52rem;
    line-height: 1.35;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header > .status {
    padding: 3px 6px;
    font-size: .50rem;
    line-height: 1.3;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__header > .status::before {
    flex-basis: 4px; width: 4px; height: 4px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed {
    min-height: 82px;
    max-height: 110px;
    padding: 6px 5px 18px;
    border-radius: 8px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__placeholder { font-size: .52rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__placeholder::before { font-size: .76rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .camera-feed__timestamp { font-size: .44rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio {
    margin-top: 7px;
    padding: 6px;
    border-radius: 8px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading {
    gap: 4px;
    margin-bottom: 5px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading h4 { font-size: .56rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__audio-heading .status { padding: 2px 5px; font-size: .47rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .audio-waveform {
    min-height: 27px;
    padding: 4px;
    font-size: .46rem;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels { gap: 3px; margin-top: 5px; }
#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels > div { padding: 4px 3px; }
#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels dt { font-size: .47rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .audio-levels dd { font-size: .49rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding-top: 7px;
}
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer > span { font-size: .45rem; }
#monitoring-grid .station-grid.station-grid--size-extra-small .station-card__footer button {
    min-height: 27px;
    padding: 5px 6px;
    font-size: .51rem;
}

@media (min-width: 781px) {
    .app-header__meta { max-width: 62%; }
    .main-content > section { overflow: visible; }
    .app-layout.is-sidebar-collapsed { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 1280px) {
    .app-header { gap: 12px; }
    .app-header__meta { gap: 7px 9px; }
    .main-content { padding: 17px; }
    .main-content > section { padding: 18px; }
}

@media (max-width: 980px) {
    .app-header { flex-wrap: wrap; align-items: center; }
    .brand { flex: 1 1 300px; }
    .app-header__meta { flex: 1 1 100%; max-width: none; justify-content: flex-start; }
    .mobile-nav-toggle { order: 2; }
    .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #monitoring-grid > .section-header > .section-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto auto auto auto;
    }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(1) { grid-column: 1; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(2) { grid-column: 1; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(3) { grid-column: 2; grid-row: 1; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(4) { grid-column: 2; grid-row: 2; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(5) { grid-column: 1; grid-row: 3; }
    #monitoring-grid > .section-header > .section-actions > select:nth-child(6) { grid-column: 1; grid-row: 4; }
    #monitoring-grid > .section-header > .section-actions > .station-range-controls {
        grid-column: 1 / -1; grid-row: 5;
        width: 100%;
        grid-template-columns: max-content minmax(55px, 1fr) max-content minmax(55px, 1fr) auto;
    }
}

@media (max-width: 780px) {
    .app-header { position: sticky; padding: 12px 14px; gap: 10px; }
    .brand { flex-basis: calc(100% - 120px); padding-left: 43px; }
    .brand::before { width: 33px; height: 33px; border-radius: 10px; }
    .brand h1 { font-size: 1rem; }
    .brand__eyebrow { font-size: .55rem; }
    .brand > p:last-child { font-size: .61rem; line-height: 1.4; }
    .app-header__meta { gap: 7px; padding-top: 5px; }
    .app-header__meta p { font-size: .62rem; }
    .app-header__meta button { min-height: 34px; }
    .mobile-nav-toggle { min-height: 37px; padding: 7px 9px; font-size: .65rem; }
    .main-content { padding: 11px; }
    .main-content > section { margin-bottom: 13px; padding: 14px; border-radius: 15px; }
    .section-header { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 15px; padding-bottom: 13px; }
    .section-header h2 { font-size: 1.05rem; }
    .section-header p { font-size: .71rem; }
    .summary-metrics { gap: 8px; }
    .metric-card { padding: 12px; border-radius: 12px; }
    .metric-card dd { font-size: 1.4rem; }
    .metric-card dt { font-size: .64rem; }
    .metric-card p { font-size: .61rem; }
    #monitoring-grid > .section-header > .section-actions { padding: 10px; gap: 6px 8px; }
    #monitoring-grid > .section-header > .section-actions > select { font-size: .68rem; }
    #monitoring-grid > .section-header > .section-actions > .station-range-controls { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 6px; padding: 8px; }
    #monitoring-grid .station-range-controls button { grid-column: 1 / -1; width: 100%; }
    #monitoring-grid .station-grid.station-grid--size-extra-small { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; }
    .focus-view-panel { padding: 9px; }
    .focus-view-panel__video { min-height: 200px; }
    .table-wrapper { border-radius: 10px; }
    th, td { padding: 9px 10px; }
    .administration-grid article { padding: 13px; }
}

@media (max-width: 460px) {
    .app-header__meta { display: grid; grid-template-columns: minmax(0,1fr); }
    .brand { flex-basis: calc(100% - 100px); }
    .app-header__meta p { flex-wrap: wrap; }
    .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { padding: 10px; }
    .metric-card dd { font-size: 1.25rem; }
    #monitoring-grid > .section-header > .section-actions { grid-template-columns: minmax(0,1fr); grid-template-rows: none; }
    #monitoring-grid > .section-header > .section-actions > label:nth-child(1),
    #monitoring-grid > .section-header > .section-actions > select:nth-child(2),
    #monitoring-grid > .section-header > .section-actions > label:nth-child(3),
    #monitoring-grid > .section-header > .section-actions > select:nth-child(4),
    #monitoring-grid > .section-header > .section-actions > label:nth-child(5),
    #monitoring-grid > .section-header > .section-actions > select:nth-child(6) { grid-column: 1; grid-row: auto; }
    #monitoring-grid > .section-header > .section-actions > .station-range-controls { grid-column: 1; grid-row: auto; }
    #monitoring-grid .station-grid.station-grid--size-extra-small { grid-template-columns: minmax(0, 1fr) !important; }
    .station-range-controls input[type="number"] { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ============================================================
   Focus View — realtime audio transport and volume controls
   ============================================================ */
.focus-view-panel__audio { overflow: hidden; }
.focus-audio__header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.focus-view-panel__audio .focus-audio__header h3 { margin: 0; line-height: 1.35; }
.focus-audio__eyebrow {
    margin: 0 0 5px; color: var(--accent, #67e8c8); font-size: .61rem;
    font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.focus-audio-status {
    display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    padding: 7px 10px; border: 1px solid rgba(145, 171, 194, .18); border-radius: 999px;
    color: var(--muted, #9aabbd); background: rgba(255,255,255,.035);
    font-size: .65rem; line-height: 1.4; overflow-wrap: anywhere;
}
.focus-audio-status__dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #8b9bad; }
.focus-audio-status[data-state="ready"] .focus-audio-status__dot { background: #72b9ff; }
.focus-audio-status[data-state="connecting"] .focus-audio-status__dot { background: #f4c875; animation: focus-audio-pulse 1.25s ease-in-out infinite; }
.focus-audio-status[data-state="playing"] { color: #9cebd8; border-color: rgba(103,232,200,.24); background: rgba(103,232,200,.07); }
.focus-audio-status[data-state="playing"] .focus-audio-status__dot { background: #67e8c8; box-shadow: 0 0 0 4px rgba(103,232,200,.09); }
.focus-audio-status[data-state="error"] { color: #ff9ca5; border-color: rgba(255,120,134,.22); background: rgba(255,120,134,.06); }
.focus-audio-status[data-state="error"] .focus-audio-status__dot { background: #ff7886; }
.focus-audio-player {
    display: grid; gap: 15px; margin: 0 0 12px; padding: 14px;
    border: 1px solid rgba(137, 167, 191, .16); border-radius: 13px;
    background: linear-gradient(145deg, rgba(22, 36, 50, .92), rgba(9, 19, 29, .88));
}
.focus-audio-player__transport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.focus-audio-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 38px; padding: 9px 12px; border: 1px solid rgba(138,164,188,.22);
    border-radius: 9px; color: var(--text, #eaf2f8); background: rgba(255,255,255,.035);
    font-size: .72rem; font-weight: 700; line-height: 1.2; box-shadow: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.focus-audio-button:hover { transform: translateY(-1px); border-color: rgba(103,232,200,.36); background: rgba(103,232,200,.07); box-shadow: none; }
.focus-audio-button:active { transform: translateY(0); }
.focus-audio-button:focus-visible { outline: 2px solid var(--accent, #67e8c8); outline-offset: 3px; }
.focus-audio-button--primary { color: #061913; border-color: transparent; background: linear-gradient(135deg, #78efd3, #3cccae); }
.focus-audio-button--primary:hover { color: #061913; border-color: transparent; background: linear-gradient(135deg, #91f4dd, #52d8ba); }
.focus-audio-button__icon { min-width: 15px; text-align: center; font-size: .8rem; line-height: 1; }
.focus-audio-volume { min-width: 0; display: grid; gap: 9px; }
.focus-audio-volume__labels { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.focus-audio-volume__labels label { color: var(--text-soft, #bdcad7); font-size: .72rem; font-weight: 700; }
.focus-audio-volume__labels output { color: var(--accent, #67e8c8); font-family: var(--mono, monospace); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.focus-audio-volume__slider-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px; }
.focus-audio-volume__icon { color: var(--muted, #9aabbd); font-size: .72rem; white-space: nowrap; }
#focus-audio-volume {
    width: 100%; min-width: 0; height: 6px; margin: 0; border: 0; border-radius: 999px;
    accent-color: var(--accent, #67e8c8); cursor: pointer; background: rgba(145,171,194,.2);
}
#focus-audio-volume:focus-visible { outline: 2px solid var(--accent, #67e8c8); outline-offset: 5px; }
.focus-audio-help {
    margin: 0 0 10px !important; min-height: auto !important; display: block !important;
    padding: 0 2px !important; border: 0 !important; border-radius: 0 !important;
    color: var(--muted, #9aabbd) !important; background: transparent !important;
    font-family: inherit !important; font-size: .68rem !important; line-height: 1.6;
}
.focus-audio-waveform-status {
    display: flex; align-items: center; min-height: 47px !important; margin: 0 0 12px !important;
    padding: 10px 12px !important; border: 1px solid rgba(103,232,200,.12) !important;
    border-radius: 9px !important; color: #7ea99d !important;
    background: repeating-linear-gradient(90deg, rgba(91,229,195,.065) 0 2px, transparent 2px 8px), #0b171f !important;
    font-family: var(--mono, monospace) !important; font-size: .65rem !important; line-height: 1.5;
}
.focus-audio-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 0; }
.focus-audio-metrics > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--line, rgba(145,171,194,.15)); border-radius: 9px; background: rgba(136,157,177,.045); }
.focus-audio-metrics dt { color: var(--muted, #8298aa); font-size: .64rem; }
.focus-audio-metrics dd { margin: 4px 0 0; color: var(--text, #e2edf5); font-family: var(--mono, monospace); font-size: .71rem; overflow-wrap: anywhere; }
@keyframes focus-audio-pulse { 50% { opacity: .45; } }
@media (max-width: 780px) {
    .focus-audio__header { align-items: flex-start; flex-direction: column; }
    .focus-audio-player { padding: 12px; gap: 13px; }
    .focus-audio-player__transport { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .focus-audio-button--primary { grid-column: 1 / -1; }
    .focus-audio-button { width: 100%; }
}
@media (max-width: 420px) {
    .focus-view-panel__audio { padding: 12px; }
    .focus-audio-status { border-radius: 10px; }
    .focus-audio-metrics { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .focus-audio-status[data-state="connecting"] .focus-audio-status__dot { animation: none; }
    .focus-audio-button { transition: none; }
}

/* ============================================================
   OVERVIEW ENHANCEMENTS — operational command center
   Scoped to index.html so other pages keep their current layout.
   ============================================================ */
.overview-page > section#overview {
    padding-bottom: 22px;
}
.overview-page-header {
    align-items: flex-start;
}
.overview-refresh-actions {
    max-width: 410px;
}
.overview-refresh-stamp {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-size: .65rem;
    text-align: right;
}
.overview-refresh-stamp time {
    color: var(--text-soft);
    font-family: var(--mono);
}
.overview-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr);
    gap: clamp(18px, 3vw, 38px);
    align-items: center;
    margin: 0 0 16px;
    padding: clamp(22px, 3vw, 34px);
    overflow: hidden;
    border: 1px solid rgba(91, 229, 195, .2);
    border-radius: 20px;
    background:
      radial-gradient(ellipse at 83% 28%, rgba(91,229,195,.13), transparent 23rem),
      linear-gradient(120deg, rgba(17,34,47,.98), rgba(14,26,39,.94) 58%, rgba(17,39,48,.96));
    box-shadow: 0 18px 45px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.025);
}
.overview-hero::after {
    position: absolute;
    right: -78px;
    top: -110px;
    width: 290px;
    height: 290px;
    border: 1px solid rgba(91,229,195,.1);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(91,229,195,.022), 0 0 0 48px rgba(91,229,195,.014);
    content: "";
    pointer-events: none;
}
.overview-hero__copy,
.overview-hero__side { position: relative; z-index: 1; min-width: 0; }
.overview-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: #83cdbd;
    font-family: var(--mono);
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .12em;
}
.overview-live-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(244,200,117,.1); }
.overview-hero h3 {
    max-width: 640px;
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.7vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: -.055em;
}
.overview-hero__copy > p:not(.overview-hero__eyebrow) {
    max-width: 650px;
    margin: 0;
    color: #9db1c2;
    font-size: .8rem;
    line-height: 1.8;
}
.overview-hero__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.overview-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .74rem;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.overview-button:hover { transform: translateY(-1px); }
.overview-button--primary { color: #06251d; background: linear-gradient(135deg, #79f0d0, #48cdb1); box-shadow: 0 8px 24px rgba(61,204,170,.15); }
.overview-button--primary:hover { color: #05221b; background: #8df5d9; }
.overview-button--secondary { border-color: rgba(146,176,199,.22); color: #dce9f2; background: rgba(255,255,255,.035); }
.overview-button--secondary:hover { color: #fff; border-color: rgba(146,176,199,.42); background: rgba(255,255,255,.065); }
.overview-hero__side { padding: 8px 0 8px clamp(16px, 2vw, 28px); border-left: 1px solid rgba(145,171,194,.17); }
.overview-hero__number { color: #f1fbff; font-family: var(--mono); font-size: clamp(2.25rem, 4vw, 3.2rem); letter-spacing: -.08em; line-height: 1.05; }
.overview-hero__number span { color: #a5bac8; font-family: var(--sans); font-size: .88rem; font-weight: 700; letter-spacing: -.02em; }
.overview-hero__side > p { margin: 8px 0 14px; color: #9db1c2; font-size: .73rem; }
.overview-hero__pills { display: flex; flex-wrap: wrap; gap: 6px; }
.overview-hero__pills span { padding: 5px 8px; border: 1px solid rgba(91,229,195,.16); border-radius: 7px; color: #a7e8d9; background: rgba(91,229,195,.055); font-size: .62rem; font-weight: 700; }
.overview-hero__side small { display: block; max-width: 230px; margin-top: 12px; color: #738a9d; font-size: .61rem; line-height: 1.6; }
.overview-metrics { margin-top: 0; }
.overview-metrics .metric-card--total { border-color: rgba(91,229,195,.24); background: linear-gradient(145deg, rgba(27,65,63,.65), rgba(17,32,43,.9)); }
.overview-metrics .metric-card--total dd { color: #83f0d2; }
.overview-system-notice { align-items: center; }
.overview-system-notice__copy { min-width: 0; flex: 1 1 auto; }
.overview-system-notice > a { flex: 0 0 auto; margin-left: auto; color: var(--accent-blue); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.overview-section { margin-top: 18px; padding: clamp(17px, 2vw, 23px); border: 1px solid rgba(132,166,191,.14); border-radius: 17px; background: linear-gradient(145deg, rgba(16,27,40,.82), rgba(11,19,29,.86)); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.overview-section--plain { padding: 5px 0 0; border: 0; background: transparent; box-shadow: none; }
.overview-section__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.overview-section__header > div { min-width: 0; }
.overview-section__header .section-eyebrow { margin-bottom: 5px; }
.overview-section__header h2 { margin: 0 0 5px; font-size: clamp(1rem, 1.3vw, 1.22rem); }
.overview-section__header p:not(.section-eyebrow) { margin: 0; color: #8599ab; font-size: .72rem; line-height: 1.6; }
.overview-text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.overview-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.overview-shortcut { display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid rgba(132,166,191,.14); border-radius: 13px; background: rgba(18,31,45,.68); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.overview-shortcut:hover { transform: translateY(-2px); border-color: rgba(91,229,195,.3); background: rgba(24,42,57,.88); }
.overview-shortcut__icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(91,229,195,.18); border-radius: 12px; color: #79eed0; background: rgba(91,229,195,.08); font-size: 1.05rem; }
.overview-shortcut__icon--blue { color: #83c5ff; border-color: rgba(114,185,255,.18); background: rgba(114,185,255,.08); }
.overview-shortcut__icon--amber { color: #f3d18a; border-color: rgba(244,200,117,.18); background: rgba(244,200,117,.07); }
.overview-shortcut__icon--violet { color: #c7b8ff; border-color: rgba(176,153,255,.18); background: rgba(176,153,255,.07); }
.overview-shortcut__body { display: grid; min-width: 0; gap: 4px; }
.overview-shortcut__body strong { color: #e2edf5; font-size: .76rem; line-height: 1.4; }
.overview-shortcut__body small { color: #8196a8; font-size: .66rem; line-height: 1.55; }
.overview-shortcut__arrow { color: #688295; font-size: 1rem; text-align: right; }
.overview-component-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.overview-component-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; border: 1px solid rgba(132,166,191,.13); border-radius: 13px; background: rgba(20,33,47,.62); }
.overview-component-card__top { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 12px; }
.overview-component-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid rgba(91,229,195,.17); border-radius: 10px; color: #7be9cc; background: rgba(91,229,195,.065); font-size: 1rem; }
.overview-component-icon--blue { color: #83c5ff; border-color: rgba(114,185,255,.17); background: rgba(114,185,255,.065); }
.overview-component-icon--amber { color: #f2cf86; border-color: rgba(244,200,117,.17); background: rgba(244,200,117,.065); }
.overview-component-icon--violet { color: #c7b8ff; border-color: rgba(176,153,255,.17); background: rgba(176,153,255,.065); }
.overview-component-icon--green { color: #8cebb0; border-color: rgba(98,228,172,.17); background: rgba(98,228,172,.065); }
.overview-component-card .status { max-width: 125px; font-size: .58rem; white-space: normal; text-align: center; }
.overview-component-card h3 { margin: 0 0 5px; font-size: .78rem; }
.overview-component-card__value { margin: 0 0 7px; color: #e7f5fa; font-family: var(--mono); font-size: 1.05rem; font-weight: 500; letter-spacing: -.035em; overflow-wrap: anywhere; }
.overview-component-card > p:not(.overview-component-card__value) { flex: 1; margin: 0 0 13px; color: #8095a8; font-size: .65rem; line-height: 1.65; }
.overview-component-card > a { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-top: 10px; border-top: 1px solid rgba(132,166,191,.1); color: #8ddfce; font-size: .65rem; font-weight: 800; }
.overview-footnote { margin: 12px 1px 0; color: #71879a; font-size: .64rem; line-height: 1.65; }
.overview-two-column { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 14px; }
.overview-two-column .overview-section { min-width: 0; height: 100%; }
.overview-checklist-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid rgba(91,229,195,.18); border-radius: 9px; color: #8ff0d7; background: rgba(91,229,195,.06); font-family: var(--mono); font-size: .72rem; font-weight: 500; }
.overview-checklist-progress { height: 5px; margin: -3px 0 13px; overflow: hidden; border-radius: 99px; background: rgba(132,166,191,.12); }
.overview-checklist-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34b99b, #7cecd0); transition: width .2s ease; }
.overview-checklist { display: grid; gap: 2px; }
.overview-checklist__item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 3px; border-bottom: 1px solid rgba(132,166,191,.09); cursor: pointer; }
.overview-checklist__item:last-child { border-bottom: 0; }
.overview-checklist__item input { flex: 0 0 auto; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent-strong); }
.overview-checklist__item > span { display: grid; min-width: 0; gap: 4px; }
.overview-checklist__item strong { color: #d7e4ed; font-size: .72rem; font-weight: 700; line-height: 1.5; }
.overview-checklist__item small { color: #8095a8; font-size: .65rem; line-height: 1.65; }
.overview-checklist__item:has(input:checked) strong { color: #83d9c5; }
.overview-checklist__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.overview-checklist__actions button { min-height: 32px; padding: 6px 10px; font-size: .66rem; }
.overview-checklist__actions .overview-text-link { font-size: .66rem; }
.overview-empty-state { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 11px; padding: 14px 0; border-bottom: 1px solid rgba(132,166,191,.1); }
.overview-empty-state:last-child { border-bottom: 0; }
.overview-empty-state__icon { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(244,200,117,.16); border-radius: 10px; color: #e6c57d; background: rgba(244,200,117,.06); font-size: 1.05rem; }
.overview-empty-state--activity .overview-empty-state__icon { color: #91c8ff; border-color: rgba(114,185,255,.17); background: rgba(114,185,255,.06); }
.overview-empty-state > div { min-width: 0; }
.overview-empty-state strong { color: #dce8f0; font-size: .72rem; }
.overview-empty-state p { margin: 4px 0 7px; color: #8196a8; font-size: .66rem; line-height: 1.65; }
.overview-empty-state > a { grid-column: 2; color: #8ddfce; font-size: .65rem; font-weight: 800; }
@media (max-width: 1450px) {
    .overview-component-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
    .overview-hero { grid-template-columns: minmax(0, 1.3fr) minmax(200px, .7fr); }
    .overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .overview-two-column { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
    .overview-page-header { display: grid; align-items: start; }
    .overview-refresh-actions { justify-content: flex-start; max-width: none; }
    .overview-refresh-stamp { text-align: left; }
    .overview-hero { grid-template-columns: minmax(0, 1fr); padding: 21px; }
    .overview-hero__side { padding: 15px 0 0; border-top: 1px solid rgba(145,171,194,.17); border-left: 0; }
    .overview-hero__side small { max-width: none; }
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-component-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-shortcuts { grid-template-columns: minmax(0, 1fr); }
    .overview-system-notice { flex-wrap: wrap; }
    .overview-system-notice > a { margin-left: 38px; }
    .overview-section__header { align-items: flex-start; }
}
@media (max-width: 460px) {
    .overview-metrics { grid-template-columns: minmax(0, 1fr); }
    .overview-component-grid { grid-template-columns: minmax(0, 1fr); }
    .overview-component-card { padding: 13px; }
    .overview-hero__actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .overview-button { width: 100%; }
    .overview-shortcut { grid-template-columns: 36px minmax(0, 1fr) 14px; gap: 9px; padding: 12px; }
    .overview-shortcut__icon { width: 36px; height: 36px; }
    .overview-section { padding: 14px; }
    .overview-section--plain { padding: 3px 0 0; }
    .overview-section__header { gap: 8px; }
    .overview-section__header > .overview-text-link { white-space: normal; text-align: right; }
    .overview-checklist__actions { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .overview-button, .overview-shortcut, .overview-checklist-progress span { transition: none !important; }
}


/* ============================================================
   Configuration page — grouped, responsive settings panels
   ============================================================ */
.config-page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 10px 12px;
    border: 1px solid rgba(132,166,191,.13);
    border-radius: 13px;
    background: rgba(12,21,32,.66);
}
.config-page-nav__label {
    color: #8da3b6;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.config-page-nav__links { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.config-page-nav__links a {
    display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px;
    border: 1px solid transparent; border-radius: 8px; color: #9fb2c3; font-size: .68rem; font-weight: 700;
    text-decoration: none; transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.config-page-nav__links a:hover, .config-page-nav__links a:focus-visible {
    color: #c9fff0; background: rgba(91,229,195,.07); border-color: rgba(91,229,195,.2); outline: none;
}
.configuration-intro { margin-bottom: 15px; }
.configuration-intro .section-header { align-items: center; }
.config-draft-badge {
    display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 11px;
    border: 1px solid rgba(244,200,117,.19); border-radius: 99px; color: #f1d18d;
    background: rgba(244,200,117,.07); font-size: .66rem; font-weight: 800; white-space: nowrap;
}
.config-draft-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #e6bd65; box-shadow: 0 0 0 4px rgba(230,189,101,.09); }
.config-notice {
    display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: start; gap: 12px;
    padding: 15px 16px; border: 1px solid rgba(114,185,255,.17); border-radius: 14px;
    background: linear-gradient(105deg, rgba(57,112,160,.11), rgba(17,29,43,.55));
}
.config-notice__icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; color: #8ecaff; background: rgba(114,185,255,.1); font-size: 1rem; font-weight: 800; }
.config-notice strong { display: block; margin: 0 0 3px; color: #dbeeff; font-size: .76rem; }
.config-notice p { margin: 0; color: #8ea5b8; font-size: .69rem; line-height: 1.7; }
.configuration-form { display: grid; gap: 15px; }
.config-panel {
    min-width: 0; margin: 0; padding: clamp(16px, 2vw, 22px); border: 1px solid rgba(132,166,191,.14);
    border-radius: 17px; background: linear-gradient(145deg, rgba(16,27,40,.88), rgba(11,19,29,.9));
    box-shadow: 0 10px 28px rgba(0,0,0,.08); scroll-margin-top: 125px;
}
.config-panel__header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(132,166,191,.12); }
.config-panel__icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(91,229,195,.18); border-radius: 12px; color: #79ead0; background: rgba(91,229,195,.075); font-size: 1.1rem; }
.config-panel__icon--blue { border-color: rgba(114,185,255,.2); color: #8cc9ff; background: rgba(114,185,255,.075); }
.config-panel__icon--amber { border-color: rgba(244,200,117,.2); color: #f3d18a; background: rgba(244,200,117,.075); }
.config-panel__icon--violet { border-color: rgba(176,153,255,.2); color: #c6b7ff; background: rgba(176,153,255,.075); }
.config-panel__icon--rose { border-color: rgba(255,120,134,.2); color: #ff9ba6; background: rgba(255,120,134,.075); }
.config-panel__header > div { min-width: 0; flex: 1 1 auto; }
.config-panel__header h2 { margin: 0 0 3px; color: #e4edf5; font-size: .91rem; letter-spacing: -.02em; }
.config-panel__header p { margin: 0; color: #8499ac; font-size: .68rem; line-height: 1.6; }
.config-panel__tag { display: inline-flex; flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(145,171,194,.15); border-radius: 7px; color: #a4b5c4; background: rgba(145,171,194,.05); font-size: .57rem; font-weight: 800; text-align: center; }
.config-panel__tag--local { border-color: rgba(91,229,195,.18); color: #80e8d0; background: rgba(91,229,195,.06); }
.config-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 22px; align-items: start; }
.config-fields .form-field { min-width: 0; }
.config-fields .form-field label { margin-bottom: 1px; color: #b6c5d1; }
.config-fields .form-field small, .config-toggle small { display: block; margin-top: 4px; color: #788fa2; font-size: .64rem; line-height: 1.6; font-weight: 400; }
.config-fields input:not([type="checkbox"]):not([type="range"]), .config-fields select { width: 100%; min-width: 0; }
.config-field--full { grid-column: 1 / -1; }
.config-range-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.config-range-label output { color: #77e8ce; font-family: var(--mono); font-size: .76rem; font-weight: 500; }
.config-fields input[type="range"] { width: 100%; accent-color: var(--accent); }
.config-range-scale { display: flex; justify-content: space-between; gap: 10px; color: #72889b; font-size: .6rem; }
.config-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; min-height: 66px;
    padding: 12px 13px; border: 1px solid rgba(132,166,191,.12); border-radius: 12px; background: rgba(5,13,22,.24); cursor: pointer;
}
.config-toggle:hover { border-color: rgba(91,229,195,.22); background: rgba(20,40,53,.45); }
.config-toggle > span { min-width: 0; }
.config-toggle strong { display: block; color: #d1dde7; font-size: .7rem; font-weight: 800; line-height: 1.45; }
.config-toggle input[type="checkbox"] { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--accent-strong); }
.configuration-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap;
    padding: 16px; border: 1px solid rgba(132,166,191,.15); border-radius: 15px; background: rgba(13,23,34,.94);
}
.configuration-actions__note { display: grid; gap: 4px; min-width: min(100%, 260px); flex: 1 1 280px; }
.configuration-actions__note strong { color: #dbe8f2; font-size: .72rem; }
.configuration-actions__note small { color: #7f94a7; font-size: .63rem; line-height: 1.6; }
.configuration-actions__buttons { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.configuration-actions__buttons button, .config-import-button { min-height: 38px; padding: 9px 12px; font-size: .68rem; }
.config-import-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text-soft); background: rgba(145,171,194,.055); font-weight: 700; cursor: pointer; }
.config-import-button:hover { border-color: rgba(91,229,195,.28); color: #d7fff3; background: rgba(91,229,195,.07); }
.config-backend-note {
    display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 12px; margin-top: 17px; padding: 17px;
    border: 1px solid rgba(244,200,117,.15); border-radius: 15px; background: rgba(244,200,117,.035);
}
.config-backend-note__icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(244,200,117,.19); border-radius: 10px; color: #f0ce83; background: rgba(244,200,117,.07); font-weight: 900; }
.config-backend-note h2 { margin: 0 0 5px; color: #e9d39e; font-size: .77rem; }
.config-backend-note p { margin: 0 0 9px; color: #948c76; font-size: .67rem; line-height: 1.75; }
.config-backend-note a, .configuration-card-link { display: inline-flex; align-items: center; gap: 8px; color: #8be8d0; font-size: .67rem; font-weight: 800; text-decoration: none; }
.config-backend-note a:hover, .configuration-card-link:hover { color: #c1fff0; }
.configuration-card-link { margin-top: 13px; }
@media (max-width: 900px) {
    .config-panel__header { flex-wrap: wrap; }
    .config-panel__tag { margin-left: 54px; }
    .configuration-actions { align-items: flex-start; }
    .configuration-actions__buttons { justify-content: flex-start; }
}
@media (max-width: 600px) {
    .config-page-nav { align-items: flex-start; }
    .config-page-nav__links { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .config-page-nav__links a { justify-content: center; background: rgba(145,171,194,.035); }
    .configuration-intro .section-header { align-items: flex-start; flex-direction: column; }
    .config-fields { grid-template-columns: minmax(0,1fr); gap: 15px; }
    .config-field--full { grid-column: auto; }
    .config-panel { padding: 15px; }
    .config-panel__header { align-items: flex-start; gap: 10px; }
    .config-panel__icon { flex-basis: 36px; width: 36px; height: 36px; }
    .config-panel__tag { margin-left: 46px; }
    .config-toggle { min-height: 62px; padding: 11px; }
    .configuration-actions__buttons { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; }
    .configuration-actions__buttons > * { width: 100%; }
    .configuration-actions__buttons button, .config-import-button { min-height: 40px; }
    .config-backend-note { grid-template-columns: 30px minmax(0,1fr); padding: 13px; }
    .config-backend-note__icon { width: 29px; height: 29px; }
}
@media (prefers-reduced-motion: reduce) {
    .config-page-nav__links a, .config-toggle { transition: none !important; }
}


.configuration-actions__buttons .button-secondary {
    color: #c1cfda;
    border-color: rgba(145,171,194,.2);
    background: rgba(145,171,194,.065);
}
.configuration-actions__buttons .button-secondary:hover:not(:disabled) {
    color: #eef8fc;
    border-color: rgba(145,171,194,.38);
    background: rgba(145,171,194,.12);
    box-shadow: none;
}
.configuration-actions__buttons .button-primary {
    color: #062219;
    border-color: rgba(91,229,195,.65);
    background: linear-gradient(180deg, #83efd5, #4bd3b3);
    box-shadow: 0 7px 18px rgba(35,192,154,.12);
}
.configuration-actions__buttons .button-primary:hover:not(:disabled) {
    color: #041c14;
    border-color: #a1f9e2;
    background: linear-gradient(180deg, #a0f7e3, #66e0c4);
}
.station-grid--hide-waveform .audio-waveform { display: none !important; }
.configuration-page .overview-system-notice[hidden],
.configuration-page .focus-audio-waveform-status[hidden],
.overview-system-notice[hidden],
.focus-audio-waveform-status[hidden] {
    display: none !important;
}

/* ============================================================
   OVERVIEW CLEANUP — remove duplicate summary blocks and tighten hierarchy
   Scoped to the Overview page; other pages remain unchanged.
   ============================================================ */
.overview-main-section {
    padding-bottom: 8px !important;
}

.overview-page .overview-page-header {
    align-items: center;
    margin-bottom: 18px;
}

.overview-page .overview-page-header h2 {
    margin-bottom: 6px;
    letter-spacing: -.035em;
}

.overview-page .overview-page-header > div:first-child > p:last-child {
    max-width: 650px;
}

.overview-page .overview-refresh-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    max-width: none;
}

.overview-page .overview-refresh-actions > button {
    white-space: nowrap;
}

.overview-page .overview-refresh-stamp {
    flex-basis: auto;
    max-width: 240px;
    text-align: right;
    line-height: 1.55;
}

.overview-page .overview-hero--streamlined {
    display: block;
    min-height: 0;
    margin-bottom: 14px;
    padding: clamp(22px, 3vw, 32px);
    border-color: rgba(91, 229, 195, .18);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 92% 8%, rgba(91, 229, 195, .105), transparent 28rem),
        linear-gradient(120deg, rgba(17, 34, 47, .98), rgba(14, 26, 39, .97) 72%, rgba(16, 37, 47, .95));
}

.overview-page .overview-hero--streamlined::after {
    right: -115px;
    top: -175px;
    width: 330px;
    height: 330px;
    opacity: .65;
}

.overview-page .overview-hero--streamlined .overview-hero__copy {
    max-width: 810px;
}

.overview-page .overview-hero--streamlined h3 {
    max-width: 720px;
    margin-bottom: 10px;
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
}

.overview-page .overview-hero--streamlined .overview-hero__copy > p:not(.overview-hero__eyebrow) {
    max-width: 720px;
    font-size: .82rem;
    line-height: 1.75;
}

.overview-page .overview-hero--streamlined .overview-hero__actions {
    margin-top: 18px;
}

.overview-page .overview-metrics--streamlined {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.overview-page .overview-metrics--streamlined .metric-card {
    min-width: 0;
    min-height: 142px;
    padding: 18px 19px;
    border-radius: 14px;
}

.overview-page .overview-metrics--streamlined .metric-card dt {
    margin-bottom: 12px;
    color: #91a8ba;
    font-size: .72rem;
}

.overview-page .overview-metrics--streamlined .metric-card dd {
    margin-bottom: 8px;
    font-size: clamp(1.5rem, 2vw, 2rem);
    letter-spacing: -.055em;
}

.overview-page .overview-metrics--streamlined .metric-card dd small {
    color: #8097aa;
    font-size: .72rem;
    letter-spacing: 0;
}

.overview-page .overview-metrics--streamlined .metric-card p {
    margin: 0;
    font-size: .67rem;
    line-height: 1.55;
}

.overview-page .overview-system-notice--streamlined {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    padding: 15px 17px;
    border: 1px solid rgba(244, 200, 117, .19);
    border-radius: 13px;
    background: linear-gradient(110deg, rgba(71, 57, 31, .19), rgba(20, 30, 41, .72));
}

.overview-page .overview-notice-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(244, 200, 117, .24);
    border-radius: 10px;
    color: #f0d18c;
    background: rgba(244, 200, 117, .08);
    font-family: var(--mono);
    font-size: .85rem;
    font-weight: 700;
}

.overview-page .overview-system-notice--streamlined .overview-system-notice__copy h3 {
    margin: 0 0 4px;
    color: #e7d9b7;
    font-size: .77rem;
}

.overview-page .overview-system-notice--streamlined .overview-system-notice__copy p {
    margin: 0;
    color: #a99e85;
    font-size: .68rem;
    line-height: 1.65;
}

.overview-page .overview-system-notice--streamlined > a {
    margin-left: 0;
    color: #9acfff;
    font-size: .68rem;
}

.overview-page .overview-two-column--streamlined {
    grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
    align-items: stretch;
    gap: 14px;
    margin-top: 16px;
}

.overview-page .overview-two-column--streamlined .overview-section {
    min-width: 0;
    margin-top: 0;
    padding: clamp(16px, 1.7vw, 22px);
    border-radius: 15px;
}

.overview-page .overview-two-column--streamlined .overview-section__header {
    align-items: flex-start;
    margin-bottom: 12px;
}

.overview-page .overview-two-column--streamlined .overview-section__header h2 {
    font-size: clamp(.98rem, 1.25vw, 1.15rem);
}

.overview-page .overview-two-column--streamlined .overview-checklist__item {
    padding: 10px 2px;
}

.overview-page .overview-two-column--streamlined .overview-checklist__item small {
    max-width: 52ch;
}

.overview-activity-empty {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 17px 0 20px;
}

.overview-activity-empty__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(114, 185, 255, .18);
    border-radius: 11px;
    color: #8fc8ff;
    background: rgba(114, 185, 255, .07);
    font-size: 1.1rem;
}

.overview-activity-empty > div {
    min-width: 0;
}

.overview-activity-empty strong {
    display: block;
    margin: 2px 0 6px;
    color: #dbe8f1;
    font-size: .76rem;
    line-height: 1.45;
}

.overview-activity-empty p {
    margin: 0;
    color: #8399ac;
    font-size: .68rem;
    line-height: 1.75;
}

.overview-activity-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 13px;
    border-top: 1px solid rgba(132, 166, 191, .1);
}

.overview-activity-links a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(132, 166, 191, .14);
    border-radius: 9px;
    color: #a8c6d9;
    background: rgba(255, 255, 255, .025);
    font-size: .66rem;
    font-weight: 700;
}

.overview-activity-links a:hover {
    border-color: rgba(91, 229, 195, .25);
    color: #c5fff0;
    background: rgba(91, 229, 195, .045);
}

@media (max-width: 1120px) {
    .overview-page .overview-two-column--streamlined {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 780px) {
    .overview-page .overview-page-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .overview-page .overview-refresh-actions {
        justify-content: space-between;
    }

    .overview-page .overview-refresh-stamp {
        max-width: none;
        text-align: left;
    }

    .overview-page .overview-metrics--streamlined {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-page .overview-metrics--streamlined .metric-card:last-child {
        grid-column: 1 / -1;
    }

    .overview-page .overview-system-notice--streamlined {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .overview-page .overview-system-notice--streamlined > a {
        grid-column: 2;
        justify-self: start;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .overview-page .overview-hero--streamlined {
        padding: 19px 17px;
        border-radius: 15px;
    }

    .overview-page .overview-hero--streamlined h3 {
        font-size: 1.5rem;
    }

    .overview-page .overview-metrics--streamlined {
        grid-template-columns: minmax(0, 1fr);
    }

    .overview-page .overview-metrics--streamlined .metric-card:last-child {
        grid-column: auto;
    }

    .overview-page .overview-metrics--streamlined .metric-card {
        min-height: 0;
        padding: 15px 16px;
    }

    .overview-page .overview-system-notice--streamlined {
        padding: 13px;
        gap: 9px;
    }

    .overview-page .overview-refresh-actions {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .overview-page .overview-refresh-stamp {
        flex-basis: 100%;
    }

    .overview-page .overview-two-column--streamlined .overview-section {
        padding: 14px;
    }

    .overview-page .overview-checklist__actions {
        align-items: flex-start;
    }
}


/* ============================================================
   NAVIGATION TOGGLE POSITION FIX
   Keep one stable control at the leading edge of the header on
   desktop, tablet, and mobile; never place it between brand/meta.
   ============================================================ */
.app-header > .mobile-nav-toggle {
    order: 0 !important;
    display: inline-flex !important;
    flex: 0 0 42px !important;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(103, 232, 200, .26);
    border-radius: 12px;
    color: #bdf6e7;
    background: linear-gradient(145deg, rgba(103, 232, 200, .105), rgba(82, 129, 170, .09));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    line-height: 1;
    font-size: 1.15rem;
    text-align: center;
    z-index: 3;
}
.app-header > .mobile-nav-toggle .mobile-nav-toggle__icon {
    display: block;
    line-height: 1;
    font-size: 1.2rem;
    transform: translateY(-1px);
}
.app-header > .mobile-nav-toggle[data-state="expanded"] .mobile-nav-toggle__icon {
    font-size: 1.6rem;
    font-weight: 400;
}
.app-header > .mobile-nav-toggle:focus-visible {
    outline: 2px solid #67e8c8;
    outline-offset: 3px;
}
.app-header > .brand {
    order: 1 !important;
    flex: 1 1 300px;
    min-width: 0;
}
.app-header > .app-header__meta {
    order: 2 !important;
    margin-left: auto;
}

/* The compact navigation bar replaces the permanent sidebar on tablet/mobile. */
@media (max-width: 1024px) {
    .app-header {
        justify-content: flex-start;
        gap: 12px;
    }
    .app-header > .brand {
        flex: 1 1 calc(100% - 56px);
    }
    .app-header > .app-header__meta {
        margin-left: 0;
    }
    .mobile-nav-toggle {
        display: inline-flex !important;
    }
}

@media (max-width: 780px) {
    .app-header {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        align-items: start;
        gap: 10px !important;
    }
    .app-header > .mobile-nav-toggle {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start;
        align-self: start;
        margin-top: 2px;
    }
    .app-header > .brand {
        grid-column: 2 !important;
        grid-row: 1 !important;
        flex: initial;
        width: 100%;
        padding-left: 42px;
    }
    .app-header > .brand::before {
        left: 0;
    }
    .app-header > .app-header__meta {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        width: 100%;
    }
}

@media (max-width: 380px) {
    .app-header {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        gap: 8px !important;
        padding-inline: 10px !important;
    }
    .app-header > .mobile-nav-toggle {
        flex-basis: 38px !important;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        height: 38px;
        min-height: 38px;
    }
    .app-header > .brand {
        padding-left: 38px;
    }
}


/* ============================================================
   NATURAL SIDEBAR TRANSITIONS
   Animated desktop grid tracks and mobile slide/expand panel.
   Initial page layout is intentionally excluded until JS adds
   .nav-motion-ready, preventing a visible animation on page load.
   ============================================================ */
:root {
    --nav-motion-duration: 360ms;
    --nav-motion-ease: cubic-bezier(.22, .78, .24, 1);
}

.nav-motion-ready .mobile-nav-toggle {
    transition:
        color 220ms ease,
        border-color 240ms ease,
        background 260ms ease,
        box-shadow 260ms ease,
        transform 260ms var(--nav-motion-ease);
}

.nav-motion-ready .mobile-nav-toggle:active {
    transform: scale(.96);
}

.app-header > .mobile-nav-toggle .mobile-nav-toggle__icon {
    transform-origin: center;
    will-change: transform, opacity;
}

.nav-motion-ready .mobile-nav-toggle__icon.is-switching {
    animation: nav-icon-soft-switch 220ms var(--nav-motion-ease) both;
}

@keyframes nav-icon-soft-switch {
    0% { opacity: .45; transform: translateY(-1px) scale(.82); }
    65% { opacity: 1; transform: translateY(-1px) scale(1.08); }
    100% { opacity: 1; transform: translateY(-1px) scale(1); }
}

@media (min-width: 1025px) {
    .app-layout {
        grid-template-columns: minmax(0, var(--sidebar-width)) minmax(0, 1fr);
    }

    .nav-motion-ready .app-layout {
        transition: grid-template-columns var(--nav-motion-duration) var(--nav-motion-ease);
    }

    /* Keep the sidebar in the grid while it collapses; display:none prevents transitions. */
    .app-layout.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 0px) minmax(0, 1fr) !important;
    }

    .app-layout.is-sidebar-collapsed > .sidebar,
    .app-layout > .sidebar.is-collapsed {
        display: flex !important;
        width: auto;
        min-width: 0 !important;
        min-height: 0;
        max-height: calc(100vh - var(--header-height));
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: hidden;
        border-right-width: 0 !important;
        opacity: 0;
        transform: translateX(-13px);
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 210ms ease,
            transform var(--nav-motion-duration) var(--nav-motion-ease),
            padding 280ms ease,
            border-color 220ms ease,
            visibility 0s linear var(--nav-motion-duration);
    }

    .app-layout:not(.is-sidebar-collapsed) > .sidebar:not(.is-collapsed) {
        display: flex !important;
        min-width: 0;
        min-height: calc(100vh - var(--header-height));
        padding: 23px 13px 18px;
        border-right-width: 1px;
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition:
            opacity 240ms ease,
            transform var(--nav-motion-duration) var(--nav-motion-ease),
            padding 280ms ease,
            border-color 220ms ease,
            visibility 0s linear 0s;
    }
}

@media (max-width: 1024px) {
    /* On compact screens the menu expands below the header instead of shifting columns. */
    .app-layout {
        display: block !important;
    }

    .sidebar,
    .sidebar.is-collapsed,
    .sidebar.is-expanded {
        display: block !important;
        position: relative;
        top: auto;
        width: 100%;
        min-width: 0;
        min-height: 0;
        max-height: var(--sidebar-expanded-height, 720px);
        padding: 13px 14px;
        overflow: hidden;
        opacity: 1;
        transform: translateY(0);
        border-right-width: 0;
        border-bottom-width: 1px;
        visibility: visible;
        pointer-events: auto;
        transition:
            max-height var(--nav-motion-duration) var(--nav-motion-ease),
            opacity 220ms ease,
            transform var(--nav-motion-duration) var(--nav-motion-ease),
            padding-block 280ms ease,
            border-color 220ms ease,
            visibility 0s linear 0s;
    }

    .nav-motion-ready .sidebar {
        will-change: max-height, opacity, transform;
    }

    .sidebar.is-collapsed {
        max-height: 0 !important;
        min-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-bottom-color: transparent !important;
        opacity: 0;
        transform: translateY(-9px);
        visibility: hidden;
        pointer-events: none;
        transition:
            max-height var(--nav-motion-duration) var(--nav-motion-ease),
            opacity 200ms ease,
            transform var(--nav-motion-duration) var(--nav-motion-ease),
            padding-block 280ms ease,
            border-color 220ms ease,
            visibility 0s linear var(--nav-motion-duration);
    }

    .sidebar.is-expanded {
        max-height: var(--sidebar-expanded-height, 720px);
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-motion-ready .app-layout,
    .nav-motion-ready .sidebar,
    .nav-motion-ready .mobile-nav-toggle,
    .nav-motion-ready .mobile-nav-toggle__icon.is-switching,
    .app-layout.is-sidebar-collapsed > .sidebar,
    .app-layout > .sidebar.is-collapsed,
    .sidebar.is-collapsed,
    .sidebar.is-expanded {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================================
   OVERVIEW PREMIUM REFINEMENT — operational hierarchy and visual polish
   Scoped exclusively to index.html via .overview-page.
   ============================================================ */
.overview-page {
    --overview-accent: #67e8c8;
    --overview-accent-soft: rgba(103,232,200,.10);
    --overview-border: rgba(143,174,197,.15);
    --overview-text-muted: #8da2b4;
}
.overview-page .overview-page-header--premium {
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid rgba(143,174,197,.12);
}
.overview-page .overview-page-heading { min-width: 0; }
.overview-page .overview-page-heading .section-eyebrow {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 9px; color: #70d9c2; font-size: .62rem;
    font-weight: 800; letter-spacing: .13em;
}
.overview-heading-mark { width: 17px; height: 2px; border-radius: 3px; background: #67e8c8; box-shadow: 0 0 12px rgba(103,232,200,.3); }
.overview-page .overview-page-header--premium h2 { margin: 0 0 7px; font-size: clamp(1.55rem,2.4vw,2rem); letter-spacing: -.045em; }
.overview-page .overview-page-header--premium .overview-page-heading > p:last-child { margin: 0; color: #92a7b8; font-size: .78rem; line-height: 1.7; }
.overview-page .overview-header-tools { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.overview-page .overview-refresh-meta { display: grid; gap: 3px; min-width: 166px; text-align: right; }
.overview-page .overview-refresh-meta__label { color: #6f8799; font-size: .55rem; font-weight: 800; letter-spacing: .12em; }
.overview-page .overview-refresh-meta time { color: #d8e6ee; font-family: var(--mono); font-size: .71rem; font-variant-numeric: tabular-nums; }
.overview-page .overview-refresh-meta__note { color: #71899b; font-size: .59rem; }
.overview-page .overview-refresh-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 13px; border: 1px solid rgba(103,232,200,.22); border-radius: 10px; color: #bbf7e9; background: rgba(103,232,200,.065); font-size: .7rem; font-weight: 800; white-space: nowrap; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease; }
.overview-page .overview-refresh-button:hover { transform: translateY(-1px); border-color: rgba(103,232,200,.42); background: rgba(103,232,200,.11); }
.overview-page .overview-refresh-button > span { font-size: 1rem; line-height: 1; }
.overview-page .overview-hero--premium {
    display: grid !important;
    grid-template-columns: minmax(0,1.32fr) minmax(275px,.68fr);
    align-items: stretch; gap: clamp(20px,3vw,34px);
    min-height: 0; margin: 0 0 23px; padding: clamp(20px,2.5vw,30px);
    overflow: hidden; position: relative;
    border: 1px solid rgba(103,232,200,.17); border-radius: 19px;
    background: radial-gradient(ellipse at 85% 0%,rgba(67,191,168,.13),transparent 25rem),
                radial-gradient(ellipse at 8% 110%,rgba(67,129,173,.10),transparent 23rem),
                linear-gradient(128deg,#101d2a 0%,#112432 55%,#10282e 100%);
    box-shadow: 0 16px 38px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.025);
}
.overview-page .overview-hero--premium::before { content:""; position:absolute; inset:0; opacity:.16; pointer-events:none; background-image:linear-gradient(rgba(151,191,207,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(151,191,207,.1) 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(100deg,transparent 30%,#000 100%); }
.overview-page .overview-hero--premium::after { content:""; position:absolute; right:29%; top:-220px; width:390px; height:390px; border:1px solid rgba(103,232,200,.09); border-radius:50%; box-shadow:0 0 0 38px rgba(103,232,200,.018),0 0 0 78px rgba(103,232,200,.014); pointer-events:none; }
.overview-page .overview-hero--premium .overview-hero__copy { position:relative; z-index:1; align-self:center; max-width:710px; padding:5px 0; }
.overview-page .overview-hero--premium .overview-hero__eyebrow { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 16px; color:#82dcca; font-size:.58rem; font-weight:800; letter-spacing:.13em; }
.overview-page .overview-live-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#67e8c8; box-shadow:0 0 0 4px rgba(103,232,200,.1); animation: overview-dot-breathe 3s ease-in-out infinite; }
.overview-hero__eyebrow-separator { color:#4c6979; }
.overview-page .overview-hero--premium h3 { max-width:650px; margin:0 0 11px; color:#f0f7fb; font-size:clamp(1.7rem,3.1vw,2.65rem); font-weight:760; letter-spacing:-.055em; line-height:1.12; text-wrap:balance; }
.overview-page .overview-hero--premium .overview-hero__copy > p:not(.overview-hero__eyebrow) { max-width:570px; margin:0; color:#a0b3c2; font-size:.79rem; line-height:1.8; }
.overview-page .overview-hero--premium .overview-hero__actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:23px; }
.overview-page .overview-hero--premium .overview-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:42px; padding:10px 14px; border-radius:10px; font-size:.69rem; font-weight:800; transition:transform 180ms ease,background 180ms ease,border-color 180ms ease; }
.overview-page .overview-hero--premium .overview-button__arrow { margin-left:3px; opacity:.76; }
.overview-page .overview-hero--premium .overview-button--primary { color:#06241c; background:linear-gradient(135deg,#7aefd0,#53d0b3); box-shadow:0 7px 18px rgba(54,201,164,.12); }
.overview-page .overview-hero--premium .overview-button--primary:hover { transform:translateY(-2px); background:#8bf5d9; }
.overview-page .overview-hero--premium .overview-button--secondary { border:1px solid rgba(155,184,204,.2); color:#d5e4ee; background:rgba(255,255,255,.035); }
.overview-page .overview-hero--premium .overview-button--secondary:hover { transform:translateY(-2px); border-color:rgba(155,184,204,.37); background:rgba(255,255,255,.065); }
.overview-page .overview-hero__scope { position:relative; z-index:1; align-self:stretch; min-width:0; padding:17px; border:1px solid rgba(145,181,198,.16); border-radius:15px; background:linear-gradient(150deg,rgba(8,19,28,.66),rgba(12,28,37,.65)); box-shadow:inset 0 1px 0 rgba(255,255,255,.025); }
.overview-scope__header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:13px; }
.overview-scope__eyebrow { margin:0 0 4px; color:#6f8d9d; font-size:.53rem; font-weight:800; letter-spacing:.13em; }
.overview-scope__header h4 { margin:0; color:#e5f0f5; font-size:.91rem; letter-spacing:-.025em; }
.overview-scope__tag { flex:0 0 auto; padding:5px 7px; border:1px solid rgba(103,232,200,.19); border-radius:7px; color:#91e8d4; background:rgba(103,232,200,.065); font-family:var(--mono); font-size:.57rem; font-weight:700; }
.overview-scope-map { display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; padding:13px 12px; border:1px solid rgba(129,167,190,.105); border-radius:10px; background:linear-gradient(135deg,rgba(12,30,40,.8),rgba(18,40,47,.56)); }
.overview-scope-map__nodes { display:grid; grid-template-columns:repeat(6,7px); gap:7px; justify-content:center; padding:2px 0; }
.overview-scope-map__nodes span { width:7px; height:7px; border-radius:3px; background:#4ebaa5; box-shadow:0 0 0 3px rgba(78,186,165,.08); }
.overview-scope-map__nodes span:nth-child(5n+2) { background:#347e7b; box-shadow:none; }
.overview-scope-map__caption { display:grid; gap:3px; min-width:0; padding-left:11px; border-left:1px solid rgba(139,177,195,.15); }
.overview-scope-map__caption strong { color:#e6f7f4; font-family:var(--mono); font-size:1.08rem; letter-spacing:-.06em; }
.overview-scope-map__caption span { max-width:84px; color:#7f9bab; font-size:.58rem; line-height:1.45; }
.overview-scope__specs { display:grid; gap:0; margin-top:8px; }
.overview-scope__spec { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px 0; border-bottom:1px solid rgba(141,174,193,.09); }
.overview-scope__spec:last-child { border-bottom:0; }
.overview-scope__spec-icon { display:grid; width:27px; height:27px; place-items:center; border:1px solid rgba(103,232,200,.16); border-radius:8px; color:#7de2cd; background:rgba(103,232,200,.055); font-family:var(--mono); font-size:.46rem; font-weight:800; letter-spacing:-.035em; }
.overview-scope__spec-icon--audio { color:#a9caff; border-color:rgba(114,185,255,.18); background:rgba(114,185,255,.06); }
.overview-scope__spec-icon--nvr { color:#d3bcff; border-color:rgba(176,153,255,.17); background:rgba(176,153,255,.06); font-size:.43rem; }
.overview-scope__spec > span:nth-child(2) { display:grid; min-width:0; gap:2px; }
.overview-scope__spec strong { color:#d4e2ea; font-size:.65rem; font-weight:700; }
.overview-scope__spec small { color:#728d9e; font-size:.55rem; }
.overview-scope__spec b { color:#e2eff4; font-family:var(--mono); font-size:.64rem; white-space:nowrap; }
.overview-scope__footnote { display:flex; align-items:center; gap:7px; margin:10px 0 0; color:#89a99e; font-size:.56rem; line-height:1.55; }
.overview-scope__footnote span { color:#67e8c8; font-size:.55rem; }
.overview-page .overview-live-section { margin-top:3px; }
.overview-subsection-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:13px; margin-bottom:12px; }
.overview-subsection-heading > div { min-width:0; }
.overview-subsection-heading .section-eyebrow { margin:0 0 5px; color:#69cdb8; font-size:.56rem; font-weight:800; letter-spacing:.13em; }
.overview-subsection-heading h3 { margin:0 0 4px; color:#e3edf4; font-size:1.05rem; letter-spacing:-.03em; }
.overview-subsection-heading p:not(.section-eyebrow) { margin:0; color:#8299aa; font-size:.68rem; line-height:1.6; }
.overview-pending-badge { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; padding:6px 9px; border:1px solid rgba(244,200,117,.16); border-radius:8px; color:#cdbd95; background:rgba(244,200,117,.045); font-size:.55rem; font-weight:800; letter-spacing:.055em; }
.overview-pending-badge > span { width:6px; height:6px; border-radius:50%; background:#c7a85f; }
.overview-page .overview-metrics--premium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.overview-page .overview-metrics--premium .overview-metric-card { position:relative; min-width:0; min-height:153px; padding:16px 17px 14px; overflow:hidden; border:1px solid rgba(134,168,190,.13); border-radius:14px; background:linear-gradient(145deg,rgba(19,34,47,.94),rgba(12,25,37,.98)); box-shadow:0 7px 22px rgba(0,0,0,.06),inset 0 1px 0 rgba(255,255,255,.02); }
.overview-page .overview-metrics--premium .overview-metric-card::after { content:""; position:absolute; top:0; left:15px; right:15px; height:1px; background:linear-gradient(90deg,rgba(103,232,200,.42),transparent 78%); opacity:.65; }
.overview-page .overview-metrics--premium .overview-metric-card--audio::after { background:linear-gradient(90deg,rgba(114,185,255,.48),transparent 78%); }
.overview-page .overview-metrics--premium .overview-metric-card--alerts::after { background:linear-gradient(90deg,rgba(244,200,117,.45),transparent 78%); }
.overview-page .overview-metric-card__heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.overview-page .overview-metric-card__heading dt { margin:0; color:#97adbd; font-size:.68rem; font-weight:700; }
.overview-page .overview-metric-icon { display:grid; width:28px; height:28px; flex:0 0 28px; place-items:center; border:1px solid rgba(103,232,200,.17); border-radius:9px; color:#78dfc8; background:rgba(103,232,200,.055); font-size:.87rem; }
.overview-page .overview-metric-card--audio .overview-metric-icon { border-color:rgba(114,185,255,.17); color:#8fc5ff; background:rgba(114,185,255,.055); }
.overview-page .overview-metric-card--alerts .overview-metric-icon { border-color:rgba(244,200,117,.18); color:#e0c17a; background:rgba(244,200,117,.055); font-weight:800; }
.overview-page .overview-metrics--premium .overview-metric-card dd { display:flex; align-items:baseline; gap:5px; margin:10px 0 6px; color:#f0f7fb; font-family:var(--mono); font-size:clamp(1.7rem,2.3vw,2.1rem); font-weight:650; letter-spacing:-.07em; line-height:1.12; font-variant-numeric:tabular-nums; }
.overview-page .overview-metrics--premium .overview-metric-card dd small { color:#8299a9; font-family:var(--sans); font-size:.72rem; font-weight:650; letter-spacing:0; }
.overview-page .overview-metrics--premium .overview-metric-card p { min-height:1em; margin:0 0 13px; color:#7f95a7; font-size:.62rem; line-height:1.45; }
.overview-metric-card__source { display:inline-block; padding-top:8px; border-top:1px solid rgba(131,165,187,.1); color:#617d90; font-size:.49rem; font-weight:800; letter-spacing:.095em; }
.overview-page .overview-system-notice--premium { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:13px; margin-top:13px; padding:14px 16px; border:1px solid rgba(208,169,100,.18); border-radius:13px; background:linear-gradient(105deg,rgba(55,46,29,.23),rgba(15,29,40,.72) 70%); }
.overview-page .overview-system-notice--premium .overview-notice-icon { width:34px; height:34px; border-radius:11px; font-size:.9rem; }
.overview-notice-kicker { display:block; margin-bottom:4px; color:#a9966f; font-size:.5rem; font-weight:800; letter-spacing:.12em; }
.overview-page .overview-system-notice--premium .overview-system-notice__copy h3 { margin:0 0 4px; color:#e8d8b3; font-size:.73rem; }
.overview-page .overview-system-notice--premium .overview-system-notice__copy p { margin:0; color:#a69b83; font-size:.64rem; line-height:1.65; }
.overview-page .overview-system-notice--premium > a { display:inline-flex; align-items:center; gap:6px; color:#a8d5ff; font-size:.63rem; font-weight:800; }
.overview-page .overview-two-column--premium { grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr); align-items:stretch; gap:14px; margin-top:18px; }
.overview-page .overview-two-column--premium .overview-section { margin:0; padding:clamp(16px,1.8vw,22px); border:1px solid rgba(132,166,191,.13); border-radius:16px; background:linear-gradient(145deg,rgba(15,28,40,.93),rgba(10,22,33,.97)); box-shadow:0 10px 26px rgba(0,0,0,.06),inset 0 1px 0 rgba(255,255,255,.02); }
.overview-page .overview-premium-panel-header { align-items:flex-start; gap:12px; margin-bottom:15px; }
.overview-page .overview-premium-panel-header .section-eyebrow { margin:0 0 6px; color:#68cdb7; font-size:.53rem; font-weight:800; letter-spacing:.13em; }
.overview-page .overview-premium-panel-header h2 { margin:0 0 5px; color:#e5eef4; font-size:clamp(.98rem,1.2vw,1.12rem); letter-spacing:-.035em; }
.overview-page .overview-premium-panel-header p:not(.section-eyebrow) { margin:0; color:#8097a9; font-size:.65rem; line-height:1.65; }
.overview-page .overview-checklist-score { display:grid; justify-items:end; gap:3px; flex:0 0 auto; min-width:57px; padding:7px 9px; border:1px solid rgba(103,232,200,.16); border-radius:10px; background:rgba(103,232,200,.045); }
.overview-page .overview-checklist-score strong { color:#a1f1dd; font-family:var(--mono); font-size:.73rem; }
.overview-page .overview-checklist-score span { color:#6d9d94; font-family:var(--mono); font-size:.57rem; }
.overview-page .overview-checklist-progress { height:4px; margin:-2px 0 10px; background:rgba(133,168,191,.12); }
.overview-page .overview-checklist-progress span { background:linear-gradient(90deg,#42c5a8,#9af2d9); box-shadow:0 0 12px rgba(103,232,200,.18); }
.overview-page .overview-checklist { gap:0; }
.overview-page .overview-checklist__item { display:grid; grid-template-columns:15px 27px minmax(0,1fr) auto; align-items:start; gap:9px; padding:11px 0; border-bottom:1px solid rgba(132,166,191,.085); transition:background 160ms ease,opacity 160ms ease; }
.overview-page .overview-checklist__item input { grid-column:1; grid-row:1; width:14px; height:14px; margin:3px 0 0; accent-color:#67e8c8; cursor:pointer; }
.overview-page .overview-checklist__item > .overview-checklist__index { display:grid; grid-column:2; grid-row:1; width:25px; height:25px; place-items:center; border:1px solid rgba(132,166,191,.13); border-radius:8px; color:#7c98aa; background:rgba(255,255,255,.02); font-family:var(--mono); font-size:.57rem; }
.overview-page .overview-checklist__item > .overview-checklist__body { display:grid; grid-column:3; grid-row:1; min-width:0; gap:4px; }
.overview-page .overview-checklist__item strong { color:#d9e6ed; font-size:.66rem; font-weight:750; line-height:1.5; }
.overview-page .overview-checklist__item small { color:#8198a9; font-size:.60rem; line-height:1.6; }
.overview-page .overview-checklist__tag { grid-column:4; grid-row:1; align-self:start; margin-top:3px; padding:4px 5px; border:1px solid rgba(128,161,184,.12); border-radius:5px; color:#71899b; font-size:.46rem; font-weight:800; letter-spacing:.07em; }
.overview-page .overview-checklist__item:has(input:checked) .overview-checklist__index { border-color:rgba(103,232,200,.24); color:#8cebd4; background:rgba(103,232,200,.07); }
.overview-page .overview-checklist__item:has(input:checked) .overview-checklist__tag { border-color:rgba(103,232,200,.2); color:#7dd9c2; }
.overview-page .overview-checklist__item:has(input:checked) .overview-checklist__body strong { color:#9ce9d6; }
.overview-page .overview-footnote { margin:12px 0 0; color:#6e8598; font-size:.58rem; line-height:1.6; }
.overview-page .overview-checklist__actions { align-items:center; gap:10px; margin-top:13px; }
.overview-page .overview-checklist__actions .button-secondary { min-height:32px; padding:7px 10px; border-radius:8px; font-size:.61rem; }
.overview-page .overview-checklist__actions .overview-text-link { font-size:.61rem; }
.overview-page .overview-activity-panel--premium { display:flex; flex-direction:column; }
.overview-page .overview-activity-panel--premium .overview-premium-panel-header > .overview-text-link { flex:0 0 auto; padding-top:2px; font-size:.61rem; }
.overview-page .overview-activity-empty--premium { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:start; gap:12px; margin-top:3px; padding:17px 14px; border:1px dashed rgba(132,166,191,.18); border-radius:12px; background:rgba(255,255,255,.015); }
.overview-page .overview-activity-empty--premium .overview-activity-empty__icon { width:40px; height:40px; border:1px solid rgba(114,185,255,.18); border-radius:12px; color:#8ec8ff; background:rgba(114,185,255,.07); font-size:1.1rem; }
.overview-activity-empty__state { display:block; margin:1px 0 5px; color:#7fabc6; font-size:.49rem; font-weight:800; letter-spacing:.11em; }
.overview-page .overview-activity-empty--premium strong { margin:0 0 6px; color:#dfeaf1; font-size:.72rem; }
.overview-page .overview-activity-empty--premium p { margin:0; color:#8298a9; font-size:.62rem; line-height:1.7; }
.overview-activity-categories { margin-top:auto; padding-top:15px; }
.overview-activity-categories > p { margin:0 0 9px; color:#6e8798; font-size:.55rem; font-weight:700; }
.overview-activity-categories > div { display:flex; flex-wrap:wrap; gap:6px; }
.overview-activity-categories > div span { padding:6px 8px; border:1px solid rgba(132,166,191,.12); border-radius:7px; color:#9bb1bf; background:rgba(255,255,255,.02); font-size:.54rem; }
.overview-page .overview-footer { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:18px; padding-top:13px; border-top:1px solid rgba(132,166,191,.1); }
.overview-page .overview-footer p { margin:0; color:#72889a; font-size:.58rem; line-height:1.6; }
.overview-page .overview-footer strong { color:#a7bbc9; font-weight:700; }
@keyframes overview-dot-breathe { 0%,100% { box-shadow:0 0 0 3px rgba(103,232,200,.08); opacity:.85; } 50% { box-shadow:0 0 0 5px rgba(103,232,200,.02); opacity:1; } }
@media (max-width: 1100px) {
    .overview-page .overview-hero--premium { grid-template-columns:minmax(0,1.05fr) minmax(255px,.95fr); gap:18px; }
    .overview-page .overview-two-column--premium { grid-template-columns:minmax(0,1fr); }
    .overview-page .overview-activity-panel--premium { min-height:0; }
}
@media (max-width: 780px) {
    .overview-page .overview-page-header--premium { display:flex; flex-direction:column; align-items:stretch; gap:15px; }
    .overview-page .overview-header-tools { justify-content:space-between; flex-wrap:wrap; }
    .overview-page .overview-refresh-meta { text-align:left; }
    .overview-page .overview-hero--premium { grid-template-columns:minmax(0,1fr); padding:20px; }
    .overview-page .overview-hero--premium .overview-hero__copy { padding:0; }
    .overview-page .overview-hero__scope { max-width:none; }
    .overview-page .overview-system-notice--premium { grid-template-columns:36px minmax(0,1fr); }
    .overview-page .overview-system-notice--premium > a { grid-column:2; justify-self:start; }
    .overview-page .overview-metrics--premium { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .overview-page .overview-metrics--premium .overview-metric-card { padding:14px 12px 12px; }
    .overview-page .overview-metrics--premium .overview-metric-card dd { font-size:1.5rem; }
    .overview-page .overview-metric-card__source { font-size:.43rem; letter-spacing:.06em; }
}
@media (max-width: 560px) {
    .overview-page .overview-header-tools { align-items:flex-start; }
    .overview-page .overview-refresh-meta { min-width:0; flex:1 1 auto; }
    .overview-page .overview-refresh-button { min-height:36px; }
    .overview-page .overview-hero--premium { padding:17px; gap:16px; border-radius:15px; }
    .overview-page .overview-hero--premium h3 { font-size:1.63rem; }
    .overview-page .overview-hero--premium .overview-hero__copy > p:not(.overview-hero__eyebrow) { font-size:.73rem; }
    .overview-page .overview-hero--premium .overview-hero__actions { display:grid; grid-template-columns:minmax(0,1fr); margin-top:18px; }
    .overview-page .overview-hero--premium .overview-button { width:100%; }
    .overview-page .overview-scope-map { gap:9px; padding:11px; }
    .overview-page .overview-scope-map__nodes { grid-template-columns:repeat(6,6px); gap:6px; }
    .overview-page .overview-scope-map__nodes span { width:6px; height:6px; border-radius:2px; }
    .overview-page .overview-live-section { margin-top:2px; }
    .overview-page .overview-subsection-heading { align-items:flex-start; flex-direction:column; gap:9px; }
    .overview-page .overview-metrics--premium { grid-template-columns:minmax(0,1fr); gap:9px; }
    .overview-page .overview-metrics--premium .overview-metric-card { min-height:0; padding:13px 14px 12px; }
    .overview-page .overview-metrics--premium .overview-metric-card dd { margin:7px 0 4px; font-size:1.6rem; }
    .overview-page .overview-metrics--premium .overview-metric-card p { margin-bottom:9px; }
    .overview-page .overview-system-notice--premium { padding:12px; gap:9px; }
    .overview-page .overview-two-column--premium .overview-section { padding:14px; }
    .overview-page .overview-premium-panel-header { flex-wrap:wrap; }
    .overview-page .overview-checklist__item { grid-template-columns:14px 24px minmax(0,1fr); gap:8px; }
    .overview-page .overview-checklist__item > .overview-checklist__index { width:23px; height:23px; }
    .overview-page .overview-checklist__tag { display:none; }
    .overview-page .overview-checklist__item strong { font-size:.64rem; }
    .overview-page .overview-checklist__item small { font-size:.59rem; }
    .overview-page .overview-activity-empty--premium { grid-template-columns:36px minmax(0,1fr); gap:9px; padding:13px 10px; }
    .overview-page .overview-activity-empty--premium .overview-activity-empty__icon { width:34px; height:34px; }
    .overview-page .overview-footer { display:grid; grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .overview-page .overview-live-dot { animation:none !important; }
    .overview-page .overview-button,
    .overview-page .overview-refresh-button,
    .overview-page .overview-checklist__item { transition:none !important; }
}

/* Overview polish: remove the legacy decorative marker so the integration
   notice uses its single, explicitly-marked information icon. */
.overview-page .overview-system-notice--premium::before {
    display: none !important;
    content: none !important;
}

/* ============================================================
   LOGIN PAGE — Mega All Star Arena
   Scoped styles; uses the shared dashboard design tokens.
   ============================================================ */
.login-page {
    display: grid;
    min-height: 100svh;
    padding: clamp(14px, 3vw, 38px);
    place-items: center;
    overflow-x: hidden;
}

.login-page::before {
    background-image:
        linear-gradient(rgba(135, 165, 190, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(135, 165, 190, 0.032) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse at 50% 40%, #000 5%, transparent 78%);
}

.login-page .login-skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    transform: translateY(-160%);
    border-radius: 10px;
    color: #041511;
    background: var(--accent);
    font-weight: 800;
}
.login-page .login-skip-link:focus { transform: translateY(0); }

.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    width: min(1240px, 100%);
    min-height: min(790px, calc(100svh - 48px));
    overflow: hidden;
    border: 1px solid rgba(145, 171, 194, .18);
    border-radius: 28px;
    background: rgba(13, 21, 32, .88);
    box-shadow: 0 35px 100px rgba(0, 0, 0, .42), 0 1px 0 rgba(255,255,255,.035) inset;
    isolation: isolate;
}

.login-visual {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 42px;
    padding: clamp(28px, 4.5vw, 58px);
    overflow: hidden;
    border-right: 1px solid rgba(145, 171, 194, .13);
    background:
        radial-gradient(ellipse at 12% 2%, rgba(43, 172, 150, .16), transparent 40%),
        radial-gradient(ellipse at 96% 82%, rgba(64, 119, 187, .17), transparent 44%),
        linear-gradient(145deg, #101d2a 0%, #0d1723 52%, #0a121d 100%);
}

.login-visual::before,
.login-visual::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}
.login-visual::before {
    inset: 0;
    opacity: .48;
    background-image:
        linear-gradient(rgba(145, 171, 194, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(145, 171, 194, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(130deg, #000, transparent 82%);
}
.login-visual::after {
    right: -150px;
    bottom: -200px;
    width: 470px;
    height: 470px;
    border: 1px solid rgba(91, 229, 195, .09);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(91,229,195,.018), 0 0 0 82px rgba(91,229,195,.014), 0 0 0 130px rgba(91,229,195,.01);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}
.login-brand__mark {
    display: grid;
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid rgba(91, 229, 195, .42);
    border-radius: 14px;
    color: #d0fff3;
    background: linear-gradient(145deg, rgba(91,229,195,.20), rgba(59,128,186,.14));
    box-shadow: 0 0 28px rgba(40,221,179,.08), inset 0 1px 0 rgba(255,255,255,.1);
    font-family: var(--mono);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: -.08em;
}
.login-brand__wordmark { display: grid; min-width: 0; gap: 3px; }
.login-brand__wordmark strong { color: #edf7fb; font-size: .95rem; font-weight: 800; letter-spacing: -.035em; }
.login-brand__wordmark small { color: #7f98a9; font-family: var(--mono); font-size: .56rem; font-weight: 500; letter-spacing: .13em; }

.login-visual__content { width: min(100%, 560px); margin-block: auto; padding-block: 48px 40px; }
.login-eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #91acbd; font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em; }
.login-eyebrow > span:last-child { color: #4d687c; }
.login-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(91,229,195,.08), 0 0 16px rgba(91,229,195,.32); }
.login-visual h1 { margin: 0; color: #f0f7fb; font-size: clamp(2.5rem, 4.2vw, 4.2rem); font-weight: 700; letter-spacing: -.075em; line-height: 1.08; }
.login-visual h1 span { color: #74e6ce; }
.login-visual__description { max-width: 470px; margin: 20px 0 30px; color: #9eb1c1; font-size: .88rem; line-height: 1.9; }

.login-system-card {
    position: relative;
    width: min(100%, 480px);
    padding: 19px 20px 15px;
    border: 1px solid rgba(140, 169, 191, .17);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(18, 35, 49, .86), rgba(12, 23, 35, .78));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255,255,255,.035);
    backdrop-filter: blur(12px);
}
.login-system-card__topline,
.login-system-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.login-system-card__topline { color: #8ca6b7; font-family: var(--mono); font-size: .56rem; letter-spacing: .1em; }
.login-system-card__topline > span:first-child { display: flex; align-items: center; gap: 8px; }
.login-system-card__signal { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.login-system-card__baseline { color: #5d7b8e; }
.login-node-map { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; width: min(100%, 340px); margin: 22px auto 18px; padding: 0 5px; }
.login-node-map i { display: block; aspect-ratio: 1; max-width: 13px; justify-self: center; width: 100%; border: 1px solid rgba(91, 229, 195, .34); border-radius: 4px; background: linear-gradient(145deg, rgba(91,229,195,.45), rgba(91,229,195,.08)); box-shadow: 0 0 12px rgba(91,229,195,.07); }
.login-node-map i:nth-child(5n + 2) { border-color: rgba(114,185,255,.42); background: linear-gradient(145deg, rgba(114,185,255,.38), rgba(114,185,255,.06)); }
.login-node-map i:nth-child(7n) { opacity: .54; }
.login-system-card__labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 13px 0 15px; border-top: 1px solid rgba(145,171,194,.1); }
.login-system-card__labels > span { display: grid; gap: 3px; }
.login-system-card__labels b { color: #e0edf4; font-family: var(--mono); font-size: .95rem; font-weight: 500; letter-spacing: -.04em; }
.login-system-card__labels small { color: #7f97a8; font-size: .62rem; }
.login-system-card__foot { padding-top: 11px; border-top: 1px solid rgba(145,171,194,.1); color: #617d90; font-family: var(--mono); font-size: .49rem; letter-spacing: .09em; }
.login-visual__footer { display: flex; align-items: center; gap: 9px; color: #7790a2; font-size: .62rem; line-height: 1.5; }
.login-footer-pulse { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #5cc4a8; }
.login-visual__footer-code { margin-left: auto; color: #526f82; font-family: var(--mono); font-size: .54rem; letter-spacing: .08em; white-space: nowrap; }

.login-form-side {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 56px);
    background: linear-gradient(160deg, rgba(16,26,39,.92), rgba(10,17,27,.98));
}
.login-form-wrap { width: min(100%, 390px); margin: auto; }
.login-form-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 50px; }
.login-section-label { color: #7e9aab; font-family: var(--mono); font-size: .59rem; font-weight: 500; letter-spacing: .15em; }
.login-version { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(145,171,194,.14); border-radius: 7px; color: #839cac; background: rgba(255,255,255,.025); font-family: var(--mono); font-size: .52rem; letter-spacing: .08em; }
.login-version > span { width: 5px; height: 5px; border-radius: 50%; background: #8d9eab; }
.login-heading { margin-bottom: 29px; }
.login-heading__eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .16em; }
.login-heading h2 { margin: 0 0 10px; color: #f0f6fa; font-size: clamp(1.75rem, 2.3vw, 2.15rem); font-weight: 700; letter-spacing: -.065em; line-height: 1.18; }
.login-heading > p:last-child { margin: 0; color: #91a4b5; font-size: .78rem; line-height: 1.8; }
.login-form { display: grid; gap: 20px; }
.login-field { min-width: 0; }
.login-field > label,
.login-label-row > label { display: block; margin-bottom: 9px; color: #c6d4df; font-size: .7rem; font-weight: 700; letter-spacing: .005em; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-label-row > label { margin-bottom: 9px; }
.login-help-button { min-height: 0; margin: 0 0 9px; padding: 0; border: 0; border-radius: 4px; color: #75dcca; background: transparent; box-shadow: none; font-size: .65rem; font-weight: 700; white-space: normal; }
.login-help-button:hover:not(:disabled) { transform: none; border-color: transparent; color: #b4f6e8; background: transparent; box-shadow: none; text-decoration: underline; }
.login-input-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.login-input-icon { position: absolute; z-index: 1; left: 14px; display: grid; width: 18px; height: 18px; place-items: center; color: #718a9e; pointer-events: none; }
.login-input-icon svg,
.login-password-toggle svg,
.login-submit svg,
.login-security-note__icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.login-input-wrap input { width: 100%; min-height: 49px; padding: 12px 44px 12px 43px; border: 1px solid rgba(133,161,184,.19); border-radius: 11px; color: #ecf5fa; background: rgba(5,12,20,.52); box-shadow: inset 0 1px 2px rgba(0,0,0,.12); font-size: .76rem; transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.login-input-wrap input::placeholder { color: #526a7e; }
.login-input-wrap input:hover { border-color: rgba(133,205,192,.35); }
.login-input-wrap input:focus { border-color: rgba(91,229,195,.7); background: rgba(5,12,20,.78); box-shadow: 0 0 0 4px rgba(91,229,195,.075); outline: none; }
.login-password-toggle { position: absolute; right: 7px; display: grid; width: 34px; min-height: 34px; padding: 8px; place-items: center; border: 1px solid transparent; border-radius: 8px; color: #738ba0; background: transparent; box-shadow: none; }
.login-password-toggle:hover:not(:disabled), .login-password-toggle.is-revealing { transform: none; border-color: rgba(145,171,194,.13); color: #c1d6e4; background: rgba(255,255,255,.045); box-shadow: none; }
.login-password-toggle svg { width: 17px; height: 17px; }
.login-form-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: -2px; }
.login-remember { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: #9cafbe; font-size: .65rem; font-weight: 500; cursor: pointer; }
.login-remember input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.login-custom-check { position: relative; display: inline-grid; flex: 0 0 auto; width: 16px; height: 16px; place-items: center; border: 1px solid rgba(133,161,184,.36); border-radius: 5px; background: rgba(5,12,20,.44); transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.login-remember input:checked + .login-custom-check { border-color: var(--accent-strong); background: var(--accent-strong); box-shadow: 0 0 0 3px rgba(91,229,195,.07); }
.login-remember input:checked + .login-custom-check::after { width: 7px; height: 4px; content: ""; transform: translateY(-1px) rotate(-45deg); border-bottom: 2px solid #052019; border-left: 2px solid #052019; }
.login-remember input:focus-visible + .login-custom-check { outline: 2px solid var(--accent); outline-offset: 3px; }
.login-form-options__hint { color: #678294; font-family: var(--mono); font-size: .56rem; }
.login-submit { display: flex; width: 100%; min-height: 49px; align-items: center; justify-content: space-between; gap: 14px; margin-top: 1px; padding: 12px 16px 12px 18px; border: 1px solid rgba(105,239,207,.44); border-radius: 11px; color: #052018; background: linear-gradient(105deg, #75ebd1, #4ed4b5 58%, #4cc6b8); box-shadow: 0 9px 26px rgba(36,205,169,.12), inset 0 1px 0 rgba(255,255,255,.36); font-size: .75rem; font-weight: 800; transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease; }
.login-submit:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(142,255,228,.7); color: #031b15; background: linear-gradient(105deg, #9af7e4, #5fdec1 58%, #68d7c9); box-shadow: 0 13px 28px rgba(36,205,169,.18), inset 0 1px 0 rgba(255,255,255,.44); }
.login-submit:active:not(:disabled) { transform: translateY(0); }
.login-submit svg { width: 18px; height: 18px; transition: transform 180ms ease; }
.login-submit:hover:not(:disabled) svg { transform: translateX(3px); }
.login-submit.is-loading { opacity: .78; }
.login-feedback { padding: 12px 13px; border: 1px solid rgba(114,185,255,.23); border-radius: 10px; color: #b7d7ef; background: rgba(72,143,199,.08); font-size: .68rem; line-height: 1.7; overflow-wrap: anywhere; }
.login-feedback[hidden] { display: none !important; }
.login-feedback[data-kind="warning"] { border-color: rgba(244,200,117,.24); color: #e5cc98; background: rgba(244,200,117,.065); }
.login-feedback[data-kind="error"] { border-color: rgba(255,120,134,.26); color: #ffb2ba; background: rgba(255,120,134,.07); }
.login-security-note { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: start; gap: 11px; margin-top: 23px; padding: 13px 14px; border: 1px solid rgba(145,171,194,.12); border-radius: 11px; background: rgba(255,255,255,.018); }
.login-security-note__icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(91,229,195,.18); border-radius: 8px; color: #79ddc5; background: rgba(91,229,195,.06); }
.login-security-note__icon svg { width: 17px; height: 17px; }
.login-security-note p { margin: 0; color: #7f95a6; font-size: .63rem; line-height: 1.75; }
.login-security-note strong { color: #a9bdca; font-size: .66rem; }
.login-form-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin-top: 30px; padding-top: 17px; border-top: 1px solid rgba(145,171,194,.1); color: #71889a; font-size: .61rem; line-height: 1.6; }
.login-form-footer__code { color: #506a7d; font-family: var(--mono); font-size: .51rem; letter-spacing: .07em; }

@media (max-width: 980px) {
    .login-page { padding: 18px; }
    .login-shell { grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); min-height: min(760px, calc(100svh - 36px)); }
    .login-visual { padding: 30px; }
    .login-visual__content { padding-block: 35px; }
    .login-visual h1 { font-size: clamp(2.25rem, 4.3vw, 3.4rem); }
    .login-system-card { padding: 15px; }
    .login-form-side { padding: 32px 28px; }
    .login-form-topline { margin-bottom: 34px; }
}

@media (max-width: 760px) {
    .login-page { display: block; padding: 14px; }
    .login-shell { grid-template-columns: minmax(0,1fr); width: min(540px,100%); min-height: 0; margin: 0 auto; border-radius: 22px; }
    .login-visual { gap: 25px; padding: 23px 23px 20px; border-right: 0; border-bottom: 1px solid rgba(145,171,194,.13); }
    .login-brand__mark { width: 39px; height: 39px; border-radius: 12px; }
    .login-brand__wordmark strong { font-size: .85rem; }
    .login-brand__wordmark small { font-size: .49rem; }
    .login-visual__content { padding: 18px 0 0; }
    .login-eyebrow { margin-bottom: 12px; font-size: .56rem; }
    .login-visual h1 { font-size: clamp(2.1rem, 8vw, 3rem); }
    .login-visual__description { margin: 13px 0 19px; font-size: .75rem; line-height: 1.75; }
    .login-system-card { width: 100%; padding: 13px 14px 12px; border-radius: 13px; }
    .login-node-map { gap: 7px; margin: 15px auto 13px; }
    .login-node-map i { max-width: 10px; border-radius: 3px; }
    .login-system-card__labels { padding: 10px 0 11px; }
    .login-system-card__labels b { font-size: .82rem; }
    .login-system-card__labels small { font-size: .57rem; }
    .login-system-card__foot { font-size: .44rem; }
    .login-visual__footer { font-size: .56rem; }
    .login-visual__footer-code { font-size: .47rem; }
    .login-form-side { padding: 27px 23px 25px; }
    .login-form-wrap { width: 100%; }
    .login-form-topline { margin-bottom: 29px; }
    .login-heading { margin-bottom: 24px; }
    .login-heading h2 { font-size: 1.8rem; }
    .login-form { gap: 17px; }
    .login-security-note { margin-top: 19px; }
    .login-form-footer { margin-top: 23px; }
}

@media (max-width: 380px) {
    .login-page { padding: 8px; }
    .login-shell { border-radius: 17px; }
    .login-visual { padding: 19px 17px 16px; }
    .login-form-side { padding: 23px 17px 20px; }
    .login-system-card__topline { font-size: .5rem; }
    .login-visual__footer-code { display: none; }
    .login-form-options { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .login-page *, .login-page *::before, .login-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* Temporary demo access notice on the login page. */
.login-demo-credentials {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(91, 229, 195, .22);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(91,229,195,.075), rgba(114,185,255,.035));
}
.login-demo-credentials__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #9eb4c1;
    font-family: var(--mono);
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .11em;
}
.login-demo-credentials__badge {
    padding: 4px 7px;
    border: 1px solid rgba(91,229,195,.2);
    border-radius: 99px;
    color: #82e4cd;
    background: rgba(91,229,195,.07);
    font-size: .49rem;
}
.login-demo-credentials__values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
}
.login-demo-credentials__item { display:grid; gap:4px; min-width:0; }
.login-demo-credentials__item span { color:#71899a; font-size:.58rem; }
.login-demo-credentials__item code {
    width: fit-content;
    max-width: 100%;
    padding: 5px 7px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(145,171,194,.12);
    border-radius: 6px;
    color: #d7eee9;
    background: rgba(4,11,18,.35);
    font-family: var(--mono);
    font-size: .67rem;
}
.login-demo-credentials__warning { margin:0; color:#8297a6; font-size:.59rem; line-height:1.65; }
.login-feedback[data-kind="success"] { border-color:rgba(91,229,195,.25); color:#9debd8; background:rgba(91,229,195,.07); }
.js-demo-logout {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    margin-top:18px;
    padding:9px 14px;
    border:1px solid rgba(255,120,134,.24);
    border-radius:10px;
    color:#ffb2ba;
    background:rgba(255,120,134,.07);
    font:inherit;
    font-size:.76rem;
    font-weight:700;
    cursor:pointer;
}
.js-demo-logout:hover { background:rgba(255,120,134,.13); }
@media (max-width:420px) {
    .login-demo-credentials__values { grid-template-columns:minmax(0,1fr); }
}
