* {
    box-sizing: border-box;
}


:root {
    --background: #111720;
    --panel: #111720;
    --panel-light: #151c26;
    --border: #26303d;

    --text: #f2f4f8;
    --muted: #8792a3;
    --muted-dark: #657080;

    --green: #39e6a3;
    --green-bg: rgba(57, 230, 163, 0.10);

    --yellow: #ffb020;
    --yellow-bg: rgba(255, 176, 32, 0.10);

    --red: #ff4545;
    --red-bright: #ff5757;
    --red-bg: rgba(255, 69, 69, 0.10);
    --red-bg-strong: rgba(255, 69, 69, 0.16);
}


html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;

    background: var(--background);

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


body {
    padding: 0 30px 120px;
}


/*
 * HEADER
 */

.topbar {
    max-width: 1370px;
    height: 90px;

    margin: 0 auto;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}


h1 {
    margin: 4px 0 0;

    font-size: 23px;
    line-height: 1.1;

    letter-spacing: -0.4px;
}


h2 {
    margin: 4px 0 0;

    font-size: 20px;

    letter-spacing: -0.3px;
}


.eyebrow {
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2px;

    color: var(--muted);

    text-transform: uppercase;
}


/*
 * GLOBAL STATUS
 */

.status {
    padding: 9px 16px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;
}


.status.ok {
    color: var(--green);
    background: var(--green-bg);
}


.status.unknown {
    color: var(--yellow);
    background: var(--yellow-bg);
}


.status.error {
    color: var(--red);
    background: var(--red-bg-strong);

    box-shadow:
        0 0 20px
        rgba(255, 69, 69, 0.08);
}


/*
 * GLOBAL ALARM
 */

.alarm-banner {
    max-width: 1370px;

    margin: 28px auto 0;

    padding: 18px 22px;

    display: flex;
    align-items: center;

    gap: 18px;

    border:
        1px solid
        rgba(255, 69, 69, 0.75);

    border-left:
        5px solid var(--red);

    border-radius: 12px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 69, 69, 0.18),
            rgba(255, 69, 69, 0.07)
        );

    box-shadow:
        0 0 30px
        rgba(255, 69, 69, 0.08);
}


.alarm-banner.warning {
    border-color:
        rgba(255, 176, 32, 0.65);

    border-left-color:
        var(--yellow);

    background:
        linear-gradient(
            90deg,
            rgba(255, 176, 32, 0.16),
            rgba(255, 176, 32, 0.05)
        );

    box-shadow: none;
}


.alarm-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #fff;
    background: var(--red);

    font-size: 23px;
    font-weight: 900;

    box-shadow:
        0 0 16px
        rgba(255, 69, 69, 0.45);
}


.alarm-banner.warning .alarm-icon {
    color: #111;
    background: var(--yellow);

    box-shadow:
        0 0 16px
        rgba(255, 176, 32, 0.3);
}


.alarm-title {
    color: var(--red-bright);

    font-size: 16px;
    font-weight: 900;

    letter-spacing: 0.8px;
}


.alarm-banner.warning .alarm-title {
    color: var(--yellow);
}


.alarm-text {
    margin-top: 4px;

    color: #c1c8d2;

    font-size: 13px;
}


/*
 * MAIN
 */

main {
    max-width: 1370px;

    margin: 28px auto 0;
}


/*
 * OVERVIEW
 */

.overview {
    display: grid;

    grid-template-columns:
        2fr 1fr 2fr 0.85fr;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background: var(--panel);
}


.overview-item {
    min-height: 108px;

    padding: 23px 22px;

    border-right:
        1px solid var(--border);
}


.overview-item:last-child {
    border-right: none;
}


.overview-value {
    margin-top: 10px;

    font-size: 20px;
    font-weight: 750;

    letter-spacing: -0.3px;
}


.overview-sub {
    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}


.receiver-hardware {
    margin-top: 4px;

    color: var(--muted-dark);

    font-size: 10px;

    white-space: nowrap;
    overflow: hidden;

    text-overflow: ellipsis;
}


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

    font-size: 13px;
    font-weight: 600;
}


/*
 * SECTIONS
 */

.services-section,
.capacity-section {
    margin-top: 34px;
}


.section-header {
    margin-bottom: 14px;

    display: flex;

    align-items: flex-end;
    justify-content: space-between;
}


.last-update,
.capacity-summary {
    color: var(--muted);

    font-size: 12px;
}


/*
 * ENSEMBLE CAPACITY
 */

.capacity-panel {
    padding: 22px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background: var(--panel-light);
}


.capacity-bar {
    position: relative;

    width: 100%;
    height: 72px;

    overflow: visible;

    border:
        1px solid #344052;

    border-radius: 8px;

    background: #0d1219;
}


.capacity-block {
    position: absolute;

    top: 0;
    bottom: 0;

    min-width: 2px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: visible;

    border-right:
        1px solid
        rgba(10, 15, 22, 0.65);

    cursor: default;

    transition:
        filter 120ms ease,
        transform 120ms ease,
        box-shadow 120ms ease;
}


.capacity-block:hover {
    z-index: 50;

    filter: brightness(1.3);

    transform:
        translateY(-2px);

    box-shadow:
        0 0 0 1px
        rgba(255, 255, 255, 0.25);
}


.capacity-block-label {
    max-width:
        calc(100% - 10px);

    overflow: hidden;

    color:
        rgba(255, 255, 255, 0.92);

    font-size: 9px;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;

    pointer-events: none;
}


/*
 * AUDIO CAPACITY COLOURS
 */

.capacity-audio.capacity-color-0 {
    background: #237d70;
}


.capacity-audio.capacity-color-1 {
    background: #356d8b;
}


.capacity-audio.capacity-color-2 {
    background: #5b668f;
}


.capacity-audio.capacity-color-3 {
    background: #765f8f;
}


.capacity-audio.capacity-color-4 {
    background: #497b63;
}


.capacity-audio.capacity-color-5 {
    background: #756a45;
}


.capacity-audio.capacity-color-6 {
    background: #486f85;
}


.capacity-audio.capacity-color-7 {
    background: #66784d;
}


/*
 * DATA CAPACITY
 */

.capacity-data {
    background:
        repeating-linear-gradient(
            -45deg,
            #88558b,
            #88558b 6px,
            #704575 6px,
            #704575 12px
        );
}


/*
 * FREE CAPACITY
 */

.capacity-free {
    background:
        repeating-linear-gradient(
            -45deg,
            #141b24,
            #141b24 6px,
            #19222d 6px,
            #19222d 12px
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(255, 255, 255, 0.025);
}


.capacity-free .capacity-block-label {
    color: var(--muted-dark);

    letter-spacing: 1px;
}


/*
 * CAPACITY TOOLTIP
 */

.capacity-tooltip {
    position: absolute;

    left: 50%;
    bottom:
        calc(100% + 12px);

    z-index: 100;

    min-width: 170px;

    padding: 11px 13px;

    display: none;

    transform:
        translateX(-50%);

    border:
        1px solid #394658;

    border-radius: 8px;

    color: #dce2ea;

    background: #101720;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.55);

    font-size: 10px;

    pointer-events: none;
}


.capacity-tooltip::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 100%;

    margin-left: -5px;

    border:
        5px solid transparent;

    border-top-color:
        #394658;
}


.capacity-tooltip strong {
    display: block;

    margin-bottom: 7px;

    color: #f2f4f8;

    font-size: 11px;
}


.capacity-tooltip span {
    display: block;

    margin-top: 3px;

    color: #9ca7b6;
}


.capacity-block:hover
.capacity-tooltip {
    display: block;
}


/*
 * CAPACITY SCALE
 */

.capacity-scale {
    position: relative;

    height: 27px;

    margin-top: 7px;

    color: var(--muted-dark);

    font-size: 9px;
}


.capacity-scale span {
    position: absolute;

    top: 10px;

    transform:
        translateX(-50%);
}


.capacity-scale span:nth-child(1) {
    left: 0;

    transform: none;
}


.capacity-scale span:nth-child(2) {
    left: 25%;
}


.capacity-scale span:nth-child(3) {
    left: 50%;
}


.capacity-scale span:nth-child(4) {
    left: 75%;
}


.capacity-scale span:nth-child(5) {
    right: 0;
    left: auto;

    transform: none;
}


/*
 * CAPACITY STATS
 */

.capacity-stats {
    margin-top: 11px;

    padding-top: 16px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    border-top:
        1px solid var(--border);
}


.capacity-stat {
    padding:
        0 18px;

    border-right:
        1px solid var(--border);
}


.capacity-stat:first-child {
    padding-left: 0;
}


.capacity-stat:last-child {
    border-right: 0;
}


.capacity-stat-value {
    margin-top: 6px;

    color: #dce2e9;

    font-size: 17px;
    font-weight: 750;
}


.capacity-stat-value span {
    color: var(--muted);

    font-size: 10px;
    font-weight: 600;
}


/*
 * SERVICE LIST
 */

#services {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.service {
    min-height: 92px;

    padding: 18px 16px;

    display: grid;

    grid-template-columns:
        235px 1fr 455px 90px;

    gap: 18px;

    align-items: center;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background: var(--panel-light);

    transition:
        border-color 150ms ease,
        background 150ms ease;
}


.service.mux-lost {
    border-color:
        rgba(255, 69, 69, 0.32);

    background:
        linear-gradient(
            90deg,
            rgba(255, 69, 69, 0.055),
            var(--panel-light) 18%
        );
}


.service.mux-stale {
    border-color:
        rgba(255, 176, 32, 0.28);
}


/*
 * SERVICE IDENTITY
 */

.service-title-row {
    display: flex;

    align-items: center;

    gap: 9px;
}


.service-title {
    font-size: 16px;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;

    text-overflow: ellipsis;
}


.service-subtitle {
    margin-top: 7px;

    color: var(--muted);

    font-size: 11px;
}


/*
 * DOTS
 */

.dot {
    width: 8px;
    height: 8px;

    display: inline-block;

    flex: 0 0 auto;

    border-radius: 50%;
}


.dot-ok {
    background: var(--green);

    box-shadow:
        0 0 9px
        rgba(57, 230, 163, 0.65);
}


.dot-warning {
    background: var(--yellow);

    box-shadow:
        0 0 9px
        rgba(255, 176, 32, 0.65);
}


.dot-error {
    background: var(--red);

    box-shadow:
        0 0 11px
        rgba(255, 69, 69, 0.8);
}


/*
 * BADGES
 */

.badge {
    width: max-content;

    margin-top: 8px;

    padding: 5px 8px;

    border-radius: 999px;

    color: var(--green);
    background: var(--green-bg);

    font-size: 9px;
    font-weight: 850;

    letter-spacing: 1.2px;

    text-transform: uppercase;
}


.badge.passive {
    color: #a5afbd;

    background:
        rgba(135, 146, 163, 0.10);
}


.badge.error {
    color: var(--red-bright);

    background:
        rgba(255, 69, 69, 0.14);
}


/*
 * DLS
 */

.dls {
    color: #dce1e8;

    font-size: 13px;

    line-height: 1.4;
}


.dls.empty {
    color: var(--muted-dark);
}


/*
 * AUDIO METERS
 */

.audio-row {
    margin-top: 10px;

    display: flex;

    align-items: center;

    gap: 13px;
}


.audio-level {
    margin: 0;
}


.meter-row {
    margin-top: 4px;

    display: flex;

    align-items: center;

    gap: 7px;
}


.meter-row:first-child {
    margin-top: 0;
}


.channel {
    width: 11px;

    color: var(--muted);

    font-size: 9px;
    font-weight: 700;
}


.meter {
    width: 150px;
    height: 5px;

    overflow: hidden;

    border-radius: 4px;

    background: #252d38;
}


.meter-fill {
    height: 100%;

    border-radius: inherit;

    background: var(--green);

    transition:
    	width 1400ms linear;
}


.audio-last-received {
    margin-top: 0;
}


/*
 * TECH DATA
 */

.details {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;

    margin-bottom: 6px;
}


.details:last-child {
    margin-bottom: 0;
}


.details span {
    padding: 4px 6px;

    border-radius: 4px;

    color: #9aa5b5;

    background: #19212c;

    font-size: 9px;

    white-space: nowrap;
}


.pad-status span {
    color: #8e99a9;
}


/*
 * ACTIONS / SLS
 */

.service-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;
}


.sls-thumb-wrapper {
    position: relative;
}


.sls-thumb {
    width: 80px;
    height: 60px;

    display: block;

    object-fit: cover;

    cursor: pointer;

    border: 0;

    border-radius: 5px;

    background: transparent;
}


.sls-hover {
    position: absolute;

    right: 0;
    bottom: 70px;

    z-index: 20;

    display: none;

    padding: 0;

    border: 0;

    border-radius: 7px;

    overflow: hidden;

    background: transparent;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.55);
}


.sls-hover img {
    width: 320px;
    height: 240px;

    display: block;

    object-fit: cover;
}


.sls-thumb-wrapper:hover .sls-hover {
    display: block;
}


/*
 * LISTEN BUTTON
 */

.listen {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    border:
        1px solid #334052;

    border-radius: 50%;

    color: #e6ebf2;

    background: #17202b;

    font-size: 12px;
}


.listen:hover {
    background: #202b39;
}


/*
 * SLS LIGHTBOX
 */

.sls-lightbox {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.82);

    backdrop-filter: blur(5px);
}


.sls-lightbox-content {
    position: relative;

    padding: 0;

    border: 0;

    border-radius: 10px;

    overflow: visible;

    background: transparent;

    box-shadow:
        0 20px 70px
        rgba(0, 0, 0, 0.7);
}


.sls-lightbox-image {
    width:
        min(80vw, 800px);

    height: auto;

    max-height: 80vh;

    display: block;

    object-fit: contain;

    border-radius: 8px;
}


.sls-lightbox-close {
    position: absolute;

    top: -15px;
    right: -15px;

    width: 34px;
    height: 34px;

    cursor: pointer;

    border:
        1px solid #3c485a;

    border-radius: 50%;

    color: #fff;

    background: #161e29;

    font-size: 21px;
}


/*
 * PLAYER
 */

.player-bar {
    position: fixed;

    left: 50%;
    bottom: 20px;

    z-index: 500;

    width:
        min(720px, calc(100vw - 40px));

    padding: 13px 16px;

    display: flex;

    align-items: center;

    gap: 18px;

    transform:
        translateX(-50%);

    border:
        1px solid #334052;

    border-radius: 12px;

    background:
        rgba(17, 23, 32, 0.97);

    box-shadow:
        0 12px 40px
        rgba(0, 0, 0, 0.5);

    backdrop-filter: blur(10px);
}


.player-info {
    min-width: 170px;

    font-size: 13px;
    font-weight: 700;
}


.player-info .eyebrow {
    margin-bottom: 4px;
}


.player-bar audio {
    width: 100%;
}


.close-player {
    cursor: pointer;

    border: 0;

    color: #c4ccd7;

    background: transparent;

    font-size: 23px;
}


/*
 * GENERAL
 */

.hidden {
    display: none !important;
}


/*
 * RESPONSIVE
 */

@media (max-width: 1050px) {

    body {
        padding-left: 16px;
        padding-right: 16px;
    }


    .overview {
        grid-template-columns:
            1fr 1fr;
    }


    .overview-item {
        border-bottom:
            1px solid var(--border);
    }


    .service {
        grid-template-columns:
            190px 1fr;

        gap: 14px;
    }


    .service-tech {
        grid-column:
            1 / 3;
    }


    .service-actions {
        justify-content: flex-start;
    }

}


@media (max-width: 650px) {

    body {
        padding-left: 14px;
        padding-right: 14px;
    }


    .topbar {
        height: auto;

        padding: 18px 0;

        gap: 15px;
    }


    h1 {
        font-size: 18px;
    }


    .status {
        padding: 7px 10px;

        font-size: 10px;
    }


    .overview {
        grid-template-columns: 1fr;
    }


    .overview-item {
        border-right: none;
    }


    .capacity-panel {
        padding: 15px;
    }


    .capacity-bar {
        height: 58px;
    }


    .capacity-block-label {
        display: none;
    }


    .capacity-stats {
        grid-template-columns:
            1fr 1fr;

        gap: 16px 0;
    }


    .capacity-stat:nth-child(2) {
        border-right: 0;
    }


    .capacity-stat:nth-child(3) {
        padding-left: 0;
    }


    .service {
        display: block;
    }


    .service-content,
    .service-tech,
    .service-actions {
        margin-top: 15px;
    }


    .service-actions {
        position: static;

        justify-content: flex-start;
    }


    .section-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

}
