/* =========================================================
   TI2STB // MISSION CONTROL
   MASTER DASHBOARD
   Visual layer
   ========================================================= */

:root {
    --bg-main: #020617;
    --bg-secondary: #030712;
    --panel: rgba(8, 15, 30, 0.88);
    --panel-light: rgba(15, 23, 42, 0.72);

    --accent: #00ffe1;
    --accent-soft: rgba(0, 255, 225, 0.15);
    --accent-border: rgba(0, 255, 225, 0.28);

    --blue: #38bdf8;
    --green: #22c55e;
    --yellow: #facc15;
    --red: #ef4444;

    --text-main: #e2faff;
    --text-secondary: #8ba6b8;
    --text-muted: #587080;

    --border: rgba(148, 163, 184, 0.12);

    --shadow:
        0 0 30px rgba(0, 255, 225, 0.06);

    --radius: 14px;

    --max-width: 1500px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    min-height: 100%;
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Inter,
        Roboto,
        Arial,
        sans-serif;

    color: var(--text-main);

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(0, 255, 225, 0.12),
            transparent 38%
        ),

        radial-gradient(
            circle at 90% 80%,
            rgba(56, 189, 248, 0.08),
            transparent 32%
        ),

        linear-gradient(
            180deg,
            var(--bg-secondary),
            var(--bg-main)
        );

    overflow-x: hidden;
}


/* =========================================================
   TECH GRID BACKGROUND
   ========================================================= */

body::before {
    content: "";

    position: fixed;

    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(0, 255, 225, 0.025) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(0, 255, 225, 0.025) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 90%
        );
}


/* =========================================================
   HEADER
   ========================================================= */

.top-header {

    width: 100%;

    max-width: var(--max-width);

    margin: auto;

    padding:
        34px
        32px
        22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


.brand-call {

    font-size: clamp(
        2.1rem,
        5vw,
        4rem
    );

    font-weight: 900;

    letter-spacing: 0.18em;

    color: var(--accent);

    line-height: 1;

    text-shadow:
        0 0 8px rgba(0, 255, 225, 0.7),
        0 0 24px rgba(0, 255, 225, 0.35);
}


.brand-title {

    font-size: clamp(
        0.95rem,
        2vw,
        1.35rem
    );

    font-weight: 700;

    letter-spacing: 0.35em;

    color: var(--text-main);
}


.brand-subtitle {

    margin-top: 6px;

    font-size: 0.72rem;

    letter-spacing: 0.2em;

    color: var(--text-secondary);
}


/* =========================================================
   SYSTEM STATUS
   ========================================================= */

.system-status {

    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        10px
        16px;

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

    border-radius: 999px;

    background:
        rgba(0, 255, 225, 0.05);

    color: var(--accent);

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    box-shadow:
        0 0 18px
        rgba(0, 255, 225, 0.05);
}


.status-dot {

    width: 9px;

    height: 9px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 8px var(--green);

    animation:
        pulse 2s infinite;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {

    width: 100%;

    max-width: var(--max-width);

    margin:
        0 auto;

    padding:
        0 32px 18px;

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

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


.nav-item {

    position: relative;

    border: 0;

    border-radius:
        8px 8px 0 0;

    padding:
        14px 18px;

    display: flex;

    align-items: center;

    gap: 9px;

    color: var(--text-secondary);

    background:
        transparent;

    font-family: inherit;

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 0.08em;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.nav-item:hover {

    color: var(--text-main);

    background:
        rgba(0, 255, 225, 0.05);

    transform:
        translateY(-1px);
}


.nav-item.active {

    color: var(--accent);

    background:
        rgba(0, 255, 225, 0.07);
}


.nav-item.active::after {

    content: "";

    position: absolute;

    left: 12px;

    right: 12px;

    bottom: -18px;

    height: 2px;

    background:
        var(--accent);

    box-shadow:
        0 0 10px
        rgba(0, 255, 225, 0.8);
}


.nav-icon {

    font-size: 1rem;

    line-height: 1;
}


/* =========================================================
   MAIN APPLICATION AREA
   ========================================================= */

#app {

    width: 100%;

    max-width: var(--max-width);

    margin: auto;

    padding:
        44px
        32px
        70px;
}


.module {

    display: none;

    animation:
        moduleIn 0.28s ease;
}


.module.active {

    display: block;
}


/* =========================================================
   HOME HERO
   ========================================================= */

.hero {

    padding:
        35px
        0
        45px;
}


.hero-kicker {

    margin-bottom: 15px;

    color: var(--accent);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 0.22em;
}


.hero h1 {

    max-width: 900px;

    font-size: clamp(
        3.2rem,
        9vw,
        7.5rem
    );

    font-weight: 900;

    line-height: 0.9;

    letter-spacing: -0.04em;

    color: var(--text-main);

    text-shadow:
        0 0 30px
        rgba(0, 255, 225, 0.12);
}


.hero p {

    max-width: 650px;

    margin-top: 28px;

    color: var(--text-secondary);

    font-size: 1rem;

    line-height: 1.8;
}


/* =========================================================
   STATUS CARDS
   ========================================================= */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                260px,
                1fr
            )
        );

    gap: 14px;
}


.status-card {

    display: flex;

    gap: 18px;

    min-height: 145px;

    padding: 24px;

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

    border-radius:
        var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, 0.8),
            rgba(3, 7, 18, 0.9)
        );

    box-shadow:
        var(--shadow);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.status-card:hover {

    transform:
        translateY(-3px);

    border-color:
        var(--accent-border);

    box-shadow:
        0 12px 35px
        rgba(0, 255, 225, 0.08);
}


.card-icon {

    width: 48px;

    height: 48px;

    flex:
        0 0 48px;

    display: grid;

    place-items: center;

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

    border-radius:
        12px;

    color:
        var(--accent);

    background:
        rgba(0, 255, 225, 0.06);

    font-size: 1.3rem;
}


.card-content {

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.card-label {

    color:
        var(--text-main);

    font-size:
        0.8rem;

    font-weight:
        800;

    letter-spacing:
        0.1em;
}


.card-status {

    font-size:
        0.68rem;

    font-weight:
        800;

    letter-spacing:
        0.12em;
}


.card-status.online {

    color:
        var(--green);
}


.card-status.lab {

    color:
        var(--yellow);
}


.card-status.standby {

    color:
        var(--blue);
}


.card-description {

    color:
        var(--text-muted);

    font-size:
        0.72rem;

    line-height:
        1.5;
}


/* =========================================================
   MISSION FOOTER
   ========================================================= */

.mission-footer {

    margin-top:
        28px;

    padding:
        18px 20px;

    display:
        flex;

    justify-content:
        space-between;

    gap:
        20px;

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

    border-radius:
        10px;

    color:
        var(--text-muted);

    font-size:
        0.65rem;

    font-weight:
        700;

    letter-spacing:
        0.15em;
}


/* =========================================================
   MODULE HEADER
   ========================================================= */

.module-header {

    display:
        flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        30px;

    margin-bottom:
        35px;

    padding-bottom:
        25px;

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


.module-kicker {

    margin-bottom:
        10px;

    color:
        var(--accent);

    font-size:
        0.68rem;

    font-weight:
        800;

    letter-spacing:
        0.2em;
}


.module-header h2 {

    font-size:
        clamp(
            2rem,
            5vw,
            4rem
        );

    line-height:
        1;

    letter-spacing:
        -0.03em;

    color:
        var(--text-main);
}


.module-header p {

    margin-top:
        14px;

    color:
        var(--text-secondary);

    line-height:
        1.6;
}


.module-badge {

    padding:
        8px 14px;

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

    border-radius:
        999px;

    color:
        var(--accent);

    background:
        rgba(
            0,
            255,
            225,
            0.05
        );

    font-size:
        0.65rem;

    font-weight:
        800;

    letter-spacing:
        0.12em;
}


.lab-badge {

    color:
        var(--yellow);

    border-color:
        rgba(
            250,
            204,
            21,
            0.25
        );

    background:
        rgba(
            250,
            204,
            21,
            0.05
        );
}


/* =========================================================
   PLACEHOLDER MODULE
   ========================================================= */

.placeholder {

    min-height:
        390px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    padding:
        40px;

    border:
        1px dashed
        rgba(
            0,
            255,
            225,
            0.18
        );

    border-radius:
        var(--radius);

    background:
        rgba(
            0,
            255,
            225,
            0.015
        );
}


.placeholder-icon {

    width:
        75px;

    height:
        75px;

    display:
        grid;

    place-items:
        center;

    margin-bottom:
        22px;

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

    border-radius:
        18px;

    color:
        var(--accent);

    background:
        rgba(
            0,
            255,
            225,
            0.06
        );

    font-size:
        2rem;

    box-shadow:
        0 0 30px
        rgba(
            0,
            255,
            225,
            0.06
        );
}


.placeholder h3 {

    margin-bottom:
        12px;

    color:
        var(--text-main);

    font-size:
        1.2rem;

    letter-spacing:
        0.08em;
}


.placeholder p {

    max-width:
        550px;

    color:
        var(--text-secondary);

    line-height:
        1.7;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {

    width:
        100%;

    padding:
        24px 32px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        12px;

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

    color:
        var(--text-muted);

    font-size:
        0.62rem;

    font-weight:
        700;

    letter-spacing:
        0.12em;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.55;
        transform: scale(0.82);
    }
}


@keyframes moduleIn {

    from {
        opacity: 0;
        transform:
            translateY(8px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .top-header {

        padding:
            25px 20px 18px;

        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .main-nav {

        padding:
            0 20px 15px;
    }


    .nav-item {

        padding:
            12px 13px;
    }


    .nav-item span:not(.nav-icon) {

        display:
            none;
    }


    .nav-item.active::after {

        bottom:
            -15px;
    }


    #app {

        padding:
            30px 20px 50px;
    }


    .hero {

        padding-top:
            15px;
    }


    .hero h1 {

        font-size:
            clamp(
                3rem,
                18vw,
                5rem
            );
    }


    .module-header {

        flex-direction:
            column;
    }


    .mission-footer {

        flex-direction:
            column;
    }
}


@media (max-width: 480px) {

    .brand-title {

        letter-spacing:
            0.2em;
    }


    .brand-subtitle {

        font-size:
            0.58rem;
    }


    .system-status {

        font-size:
            0.62rem;
    }


    .dashboard-grid {

        grid-template-columns:
            1fr;
    }
}


/* ============================================================
   TI2STB MISSION CONTROL
   FINAL HEADER ARCHITECTURE
   ============================================================

   Header layout:

       [ STATION LOGO ] [ STATION IDENTITY ] [ SYSTEM STATUS ]

   CSS Grid is intentionally used here instead of allowing the
   logo to participate in an uncontrolled flex distribution.

   ============================================================ */


/* ------------------------------------------------------------
   Header grid
   ------------------------------------------------------------ */

.top-header {

    display: grid;

    grid-template-columns:
        300px
        minmax(320px, 1fr)
        auto;

    align-items: center;

    column-gap: 30px;

    min-height: 150px;

}


/* ------------------------------------------------------------
   Official station logo
   ------------------------------------------------------------ */

.station-logo {

    width: 300px;

    height: 125px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: visible;

}


.station-logo img {

    display: block;

    width: 300px;

    height: 125px;

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    object-position: center;

    filter:
        drop-shadow(
            0 0 12px
            rgba(0, 220, 255, 0.20)
        );

}


/* ------------------------------------------------------------
   Station textual identity
   ------------------------------------------------------------ */

.top-header .brand {

    min-width: 0;

    width: 100%;

    display: flex;

    flex-direction: column;

    justify-content: center;

}


/* ------------------------------------------------------------
   System state
   ------------------------------------------------------------ */

.top-header .system-status {

    justify-self: end;

    align-self: center;

}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .top-header {

        grid-template-columns:
            240px
            minmax(250px, 1fr)
            auto;

        column-gap: 22px;

        min-height: 130px;

    }


    .station-logo {

        width: 240px;

        height: 105px;

    }


    .station-logo img {

        width: 240px;

        height: 105px;

    }

}


/* ============================================================
   SMALL TABLET / LARGE MOBILE
   ============================================================ */

@media (max-width: 800px) {

    .top-header {

        grid-template-columns:
            190px
            minmax(200px, 1fr)
            auto;

        column-gap: 16px;

        min-height: 110px;

    }


    .station-logo {

        width: 190px;

        height: 90px;

    }


    .station-logo img {

        width: 190px;

        height: 90px;

    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 640px) {

    .top-header {

        grid-template-columns:
            130px
            minmax(0, 1fr);

        column-gap: 12px;

        min-height: 95px;

    }


    .station-logo {

        width: 130px;

        height: 75px;

    }


    .station-logo img {

        width: 130px;

        height: 75px;

    }


    .top-header .system-status {

        display: none;

    }

}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .top-header {

        grid-template-columns:
            100px
            minmax(0, 1fr);

        column-gap: 10px;

        min-height: 80px;

    }


    .station-logo {

        width: 100px;

        height: 62px;

    }


    .station-logo img {

        width: 100px;

        height: 62px;

    }

}



/* ============================================================
   TI2STB MASTER HEADER — FINAL LAYOUT
   ============================================================

   Explicit three-zone layout:

       LOGO | BRAND | SYSTEM STATUS

   The grid areas are intentional. They prevent the browser
   from redistributing the station identity unexpectedly.
   ============================================================ */

.top-header {

    display: grid;

    grid-template-columns:
        300px
        minmax(360px, 1fr)
        auto;

    grid-template-areas:
        "logo brand status";

    align-items: center;

    column-gap: 28px;

    min-height: 150px;

}


/* ------------------------------------------------------------
   Official station logo
   ------------------------------------------------------------ */

.station-logo {

    grid-area: logo;

    width: 300px;

    height: 125px;

    display: flex;

    align-items: center;

    justify-content: flex-start;

    margin: 0;

}


.station-logo img {

    display: block;

    width: 300px;

    height: 125px;

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    object-position: left center;

    filter:
        drop-shadow(
            0 0 12px
            rgba(0, 220, 255, 0.20)
        );

}


/* ------------------------------------------------------------
   TI2STB / MISSION CONTROL identity
   ------------------------------------------------------------ */

.top-header .brand {

    grid-area: brand;

    width: 100%;

    min-width: 0;

    margin: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

}


/* ------------------------------------------------------------
   CORE ONLINE
   ------------------------------------------------------------ */

.top-header .system-status {

    grid-area: status;

    justify-self: end;

    align-self: center;

    margin: 0;

}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {

    .top-header {

        grid-template-columns:
            230px
            minmax(280px, 1fr)
            auto;

        column-gap: 22px;

        min-height: 130px;

    }


    .station-logo {

        width: 230px;

        height: 105px;

    }


    .station-logo img {

        width: 230px;

        height: 105px;

    }

}


@media (max-width: 800px) {

    .top-header {

        grid-template-columns:
            180px
            minmax(200px, 1fr);

        grid-template-areas:
            "logo brand";

        column-gap: 16px;

        min-height: 110px;

    }


    .station-logo {

        width: 180px;

        height: 90px;

    }


    .station-logo img {

        width: 180px;

        height: 90px;

    }


    .top-header .system-status {

        display: none;

    }

}


@media (max-width: 600px) {

    .top-header {

        grid-template-columns:
            130px
            minmax(0, 1fr);

        column-gap: 12px;

        min-height: 90px;

    }


    .station-logo {

        width: 130px;

        height: 75px;

    }


    .station-logo img {

        width: 130px;

        height: 75px;

    }

}


@media (max-width: 450px) {

    .top-header {

        grid-template-columns:
            105px
            minmax(0, 1fr);

        column-gap: 10px;

        min-height: 80px;

    }


    .station-logo {

        width: 105px;

        height: 62px;

    }


    .station-logo img {

        width: 105px;

        height: 62px;

    }

}



/* ============================================================
   HEADER — TIGHT STATION IDENTITY
   Bring the textual identity closer to the official logo.
   ============================================================ */

.top-header {

    grid-template-columns:
        280px
        minmax(360px, 1fr)
        auto;

    column-gap: 8px;

}


/* Keep the logo visually aligned with its column */

.station-logo {

    width: 280px;

    height: 125px;

}


.station-logo img {

    width: 280px;

    height: 125px;

    object-fit: contain;

    object-position: left center;

}


/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1100px) {

    .top-header {

        grid-template-columns:
            220px
            minmax(280px, 1fr)
            auto;

        column-gap: 8px;

    }


    .station-logo {

        width: 220px;

        height: 105px;

    }


    .station-logo img {

        width: 220px;

        height: 105px;

    }

}


@media (max-width: 800px) {

    .top-header {

        grid-template-columns:
            175px
            minmax(200px, 1fr);

        column-gap: 8px;

    }


    .station-logo {

        width: 175px;

        height: 90px;

    }


    .station-logo img {

        width: 175px;

        height: 90px;

    }

}



/* ============================================================
   FINAL MICRO-ADJUSTMENT
   Bring station identity closer to the logo.
   ============================================================ */

.top-header .brand {

    transform: translateX(-18px);

}


/* Responsive */

@media (max-width: 1100px) {

    .top-header .brand {

        transform: translateX(-12px);

    }

}


@media (max-width: 800px) {

    .top-header .brand {

        transform: translateX(-6px);

    }

}


@media (max-width: 600px) {

    .top-header .brand {

        transform: none;

    }

}



/* Header micro-adjustment: tighter logo/brand spacing */

.top-header .brand {
    transform: translateX(-30px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-24px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-12px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* Final logo/identity spacing refinement */

.top-header .brand {
    transform: translateX(-40px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-32px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-16px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* Final micro-spacing: station identity closer to logo */

.top-header .brand {
    transform: translateX(-48px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-38px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-19px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* Logo / identity spacing — closer */

.top-header .brand {
    transform: translateX(-65px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-52px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-26px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* ============================================================
   FINAL LOGO SCALE
   Increase station logo proportionally without changing
   its established horizontal position.
   ============================================================ */

.station-logo {
    width: 320px;
    height: 143px;
}

.station-logo img {
    width: 320px;
    height: 143px;
    object-fit: contain;
    object-position: left center;
}


/* Responsive proportional scaling */

@media (max-width: 1100px) {
    .station-logo {
        width: 245px;
        height: 117px;
    }

    .station-logo img {
        width: 245px;
        height: 117px;
    }
}

@media (max-width: 800px) {
    .station-logo {
        width: 195px;
        height: 98px;
    }

    .station-logo img {
        width: 195px;
        height: 98px;
    }
}

@media (max-width: 600px) {
    .station-logo {
        width: 145px;
        height: 82px;
    }

    .station-logo img {
        width: 145px;
        height: 82px;
    }
}



/* Final brand alignment with enlarged station logo */

.top-header .brand {
    transform: translateX(-55px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-44px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-22px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* Brand alignment — second equal step to the right */

.top-header .brand {
    transform: translateX(-45px);
}

@media (max-width: 1100px) {
    .top-header .brand {
        transform: translateX(-36px);
    }
}

@media (max-width: 800px) {
    .top-header .brand {
        transform: translateX(-18px);
    }
}

@media (max-width: 600px) {
    .top-header .brand {
        transform: none;
    }
}



/* =========================================================
   APRS INFO MODULE
   ========================================================= */

.aprs-dashboard {
    width: 100%;
}

.aprs-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.aprs-api-status,
.aprs-rf-status,
.aprs-refresh-time {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 999px;
    background: rgba(4, 15, 30, 0.75);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.aprs-api-status {
    color: #00f0ff;
}

.aprs-api-status.offline {
    color: #ff657a;
    border-color: rgba(255, 101, 122, 0.35);
}

.aprs-status-dot {
    margin-right: 8px;
    font-size: 9px;
}

.aprs-rf-status.online {
    color: #50ff9a;
    border-color: rgba(80, 255, 154, 0.3);
}

.aprs-rf-status.standby {
    color: #ffc857;
    border-color: rgba(255, 200, 87, 0.3);
}

.aprs-rf-status.offline {
    color: #ff657a;
}

.aprs-refresh-time {
    margin-left: auto;
    color: #7890aa;
    border-color: rgba(120, 144, 170, 0.2);
}

.aprs-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.aprs-kpi {
    min-height: 112px;
    padding: 22px;
    border: 1px solid rgba(0, 229, 255, 0.16);
    border-radius: 12px;
    background:
        linear-gradient(
            145deg,
            rgba(8, 20, 38, 0.92),
            rgba(4, 12, 25, 0.82)
        );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.aprs-kpi-label {
    color: #6f8ca8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.aprs-kpi strong {
    color: #e8fbff;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.aprs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
    gap: 16px;
}

.aprs-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: 12px;
    background: rgba(5, 15, 29, 0.76);
}

.aprs-panel-wide {
    min-width: 0;
}

.aprs-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.aprs-panel-kicker {
    display: block;
    margin-bottom: 5px;
    color: #00eaff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.aprs-panel h3 {
    margin: 0;
    color: #dff8ff;
    font-size: 17px;
    letter-spacing: 0.03em;
}

.aprs-panel-meta {
    color: #607b96;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.aprs-activity {
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 16px 4px 0;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
}

.aprs-activity-bar {
    flex: 1;
    height: 145px;
    min-width: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.aprs-activity-bar span {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(
        to top,
        rgba(0, 205, 255, 0.25),
        rgba(0, 255, 239, 0.9)
    );
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.12);
}

.aprs-activity-bar small {
    color: #59738d;
    font-size: 8px;
    white-space: nowrap;
}

.aprs-type-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.aprs-type-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.aprs-type-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #8ca6bd;
    font-size: 11px;
}

.aprs-type-head strong {
    color: #dff8ff;
}

.aprs-bar {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(90, 120, 150, 0.14);
}

.aprs-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #00eaff;
}

.aprs-packets {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 720px;
    overflow-y: auto;
    padding-right: 4px;
}

.aprs-packet {
    padding: 14px 15px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    background: rgba(3, 11, 23, 0.72);
}

.aprs-packet-top,
.aprs-packet-route {
    display: flex;
    align-items: center;
    gap: 9px;
}

.aprs-packet-top {
    justify-content: space-between;
    margin-bottom: 7px;
}

.aprs-packet-id {
    color: #506c86;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.aprs-packet-time {
    color: #6e8ba4;
    font-size: 10px;
}

.aprs-packet-route {
    color: #9bb4c8;
    font-size: 12px;
}

.aprs-packet-route strong {
    color: #dff8ff;
}

.aprs-packet-type {
    margin-left: auto;
    color: #00eaff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.aprs-packet-path {
    margin-top: 7px;
    color: #536e87;
    font-family: monospace;
    font-size: 9px;
    word-break: break-word;
}

.aprs-packet-payload {
    margin-top: 8px;
    color: #8da8bc;
    font-family: monospace;
    font-size: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.aprs-packet-flags {
    margin-top: 8px;
    color: #536f88;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.aprs-stations {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 610px;
    overflow-y: auto;
}

.aprs-station {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(0, 229, 255, 0.07);
}

.aprs-station:last-child {
    border-bottom: 0;
}

.aprs-station > div:first-child {
    min-width: 0;
}

.aprs-station strong {
    display: block;
    color: #dff8ff;
    font-size: 12px;
}

.aprs-station span {
    display: block;
    margin-top: 3px;
    color: #58728a;
    font-size: 9px;
}

.aprs-station-stats {
    flex: 0 0 auto;
    text-align: right;
}

.aprs-station-stats strong {
    color: #00eaff;
    font-size: 13px;
}

.aprs-station-stats span {
    color: #536f88;
}

.aprs-last-event {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.aprs-last-event > div {
    padding: 16px;
    border-radius: 8px;
    background: rgba(3, 12, 25, 0.72);
}

.aprs-last-event span {
    display: block;
    margin-bottom: 8px;
    color: #59748d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.aprs-last-event strong {
    display: block;
    color: #dff8ff;
    font-size: 13px;
    word-break: break-word;
}

.aprs-empty {
    padding: 25px 0;
    color: #58728a;
    font-size: 11px;
    text-align: center;
}


@media (max-width: 900px) {

    .aprs-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .aprs-panel-wide {
        grid-column: auto;
    }

    .aprs-refresh-time {
        margin-left: 0;
    }
}


@media (max-width: 600px) {

    .aprs-kpis {
        grid-template-columns: 1fr;
    }

    .aprs-status-row {
        align-items: stretch;
        flex-direction: column;
    }

    .aprs-api-status,
    .aprs-rf-status,
    .aprs-refresh-time {
        justify-content: center;
        width: 100%;
    }

    .aprs-last-event {
        grid-template-columns: 1fr;
    }

    .aprs-activity {
        overflow-x: auto;
    }

    .aprs-activity-bar {
        min-width: 22px;
    }
}


/* ============================================================
   TI2STB OPERATIONS — FINAL LANGUAGE POSITION
   ============================================================ */

.system-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    white-space: nowrap;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 220, 235, 0.18);
}

.language-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(170, 210, 220, 0.55);
    font-family: inherit;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    line-height: 1;
    padding: 3px 2px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.language-btn:hover {
    color: #ffffff;
}

.language-btn.active {
    color: #00f5e9;
}

.language-divider {
    color: rgba(120, 180, 190, 0.28);
    font-size: 9px;
}

/* ============================================================
   APRS SCROLL CONTAINERS
   ============================================================ */

.aprs-packets,
.aprs-stations {
    box-sizing: border-box;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

.aprs-packets {
    max-height: 720px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
}

.aprs-stations {
    max-height: 610px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
}

/* Chromium / WebKit */

.aprs-packets::-webkit-scrollbar,
.aprs-stations::-webkit-scrollbar {
    width: 7px;
}

.aprs-packets::-webkit-scrollbar-track,
.aprs-stations::-webkit-scrollbar-track {
    background: rgba(2, 12, 22, 0.75);
    border-radius: 8px;
}

.aprs-packets::-webkit-scrollbar-thumb,
.aprs-stations::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 225, 0.34);
    border: 1px solid rgba(0, 240, 245, 0.12);
    border-radius: 8px;
}

.aprs-packets::-webkit-scrollbar-thumb:hover,
.aprs-stations::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 230, 235, 0.55);
}

/* Firefox */

.aprs-packets,
.aprs-stations {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(0, 210, 225, 0.40)
        rgba(2, 12, 22, 0.75);
}

@media (max-width: 700px) {

    .system-status {
        gap: 6px;
    }

    .language-switcher {
        margin-left: 4px;
        padding-left: 6px;
    }
}


/* ============================================================
   APRS HEADER METADATA
   ============================================================ */

.aprs-module-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 28px;
}

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

.aprs-module-header .module-badge {
    align-self: start;
    margin-top: 2px;
}

/*
 * Technical metadata block.
 * Deliberately compact so the APRS title remains dominant.
 */

.aprs-module-header .aprs-identity {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 220, 235, 0.16);
    background: rgba(0, 18, 28, 0.28);
}

.aprs-module-header .aprs-identity-item {
    min-width: 105px;
    padding: 10px 14px;
    border: 0;
    border-right: 1px solid rgba(0, 220, 235, 0.12);
    background: transparent;
}

.aprs-module-header .aprs-identity-item:last-child {
    border-right: 0;
}

.aprs-module-header .aprs-identity-item span {
    display: block;
    margin-bottom: 5px;
    font-size: 7px;
    line-height: 1;
    letter-spacing: 1.35px;
}

.aprs-module-header .aprs-identity-item strong {
    display: block;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.7px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1050px) {

    .aprs-module-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .aprs-module-header .aprs-identity {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
        margin-top: 14px;
    }

    .aprs-module-header .module-badge {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 650px) {

    .aprs-module-header .aprs-identity {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .aprs-module-header .aprs-identity-item {
        min-width: 0;
        padding: 9px 10px;
    }
}


/* ============================================================
   APRS HEADER METADATA
   ============================================================ */

.aprs-module-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 28px;
}

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

.aprs-module-header .module-badge {
    align-self: start;
    margin-top: 2px;
}

/*
 * Technical metadata block.
 * Deliberately compact so the APRS title remains dominant.
 */

.aprs-module-header .aprs-identity {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 220, 235, 0.16);
    background: rgba(0, 18, 28, 0.28);
}

.aprs-module-header .aprs-identity-item {
    min-width: 105px;
    padding: 10px 14px;
    border: 0;
    border-right: 1px solid rgba(0, 220, 235, 0.12);
    background: transparent;
}

.aprs-module-header .aprs-identity-item:last-child {
    border-right: 0;
}

.aprs-module-header .aprs-identity-item span {
    display: block;
    margin-bottom: 5px;
    font-size: 7px;
    line-height: 1;
    letter-spacing: 1.35px;
}

.aprs-module-header .aprs-identity-item strong {
    display: block;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.7px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1050px) {

    .aprs-module-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .aprs-module-header .aprs-identity {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
        margin-top: 14px;
    }

    .aprs-module-header .module-badge {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 650px) {

    .aprs-module-header .aprs-identity {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .aprs-module-header .aprs-identity-item {
        min-width: 0;
        padding: 9px 10px;
    }
}


/* ============================================================
   APRS HEADER — FINAL CLEAN LAYOUT
   ============================================================ */

.aprs-module-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    column-gap: 28px !important;
}

.aprs-module-header .aprs-identity {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(0, 220, 235, 0.16) !important;
    background: rgba(0, 18, 28, 0.28) !important;

    width: auto !important;
}

.aprs-module-header .aprs-identity-item {
    min-width: 100px !important;

    padding: 10px 13px !important;

    border: 0 !important;
    border-right: 1px solid rgba(0, 220, 235, 0.12) !important;

    background: transparent !important;
}

.aprs-module-header .aprs-identity-item:last-child {
    border-right: 0 !important;
}

.aprs-module-header .aprs-identity-item span {
    display: block !important;

    margin: 0 0 5px !important;

    font-size: 7px !important;
    line-height: 1 !important;
    letter-spacing: 1.35px !important;

    color: rgba(130, 200, 215, 0.65) !important;
}

.aprs-module-header .aprs-identity-item strong {
    display: block !important;

    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0.7px !important;

    color: #ffffff !important;
}

.aprs-module-header .module-badge {
    align-self: center !important;
    margin: 0 !important;
}

/* ------------------------------------------------------------
   TABLET / NARROW DESKTOP
   ------------------------------------------------------------ */

@media (max-width: 1050px) {

    .aprs-module-header {
        grid-template-columns: minmax(0, 1fr) auto !important;
        row-gap: 14px !important;
    }

    .aprs-module-header .aprs-identity {
        grid-column: 1 !important;
        grid-row: 2 !important;

        justify-self: start !important;
    }

    .aprs-module-header .module-badge {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
}

/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 650px) {

    .aprs-module-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .aprs-module-header .aprs-identity {
        width: 100% !important;
    }

    .aprs-module-header .aprs-identity-item {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .aprs-module-header .module-badge {
        position: absolute;
        right: 0;
        top: 0;
    }
}


/* ============================================================
   TI2STB OPERATIONS
   APRS HEADER — DEFINITIVE LAYOUT
   ============================================================ */

/*
 * IMPORTANT:
 * This is the only visual structure used by the APRS header.
 * Old .aprs-identity rules are intentionally overridden.
 */

.aprs-module-header {
    display: grid !important;

    grid-template-columns:
        minmax(330px, 1fr)
        auto
        auto !important;

    align-items: center !important;

    column-gap: 28px !important;

    min-height: 125px !important;
}


/* ------------------------------------------------------------
   TITLE
   ------------------------------------------------------------ */

.aprs-module-header .aprs-header-title {
    min-width: 0 !important;
}

.aprs-module-header .aprs-header-title .module-kicker {
    margin-bottom: 8px !important;
}

.aprs-module-header .aprs-header-title h2 {
    margin: 0 !important;
}

.aprs-module-header .aprs-header-title p {
    margin: 10px 0 0 !important;
}


/* ------------------------------------------------------------
   TECHNICAL METADATA
   ------------------------------------------------------------ */

.aprs-module-header .aprs-header-meta {

    display: flex !important;

    align-items: stretch !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(0, 220, 235, 0.18) !important;

    background:
        rgba(0, 18, 28, 0.30) !important;
}


/*
 * Kill any old identity styling that may still exist.
 */

.aprs-module-header .aprs-identity,
.aprs-module-header .aprs-identity-item {
    display: none !important;
}


/* Individual metadata fields */

.aprs-module-header .aprs-meta-item {

    display: flex !important;

    flex-direction: column !important;

    justify-content: center !important;

    min-width: 105px !important;

    padding: 10px 14px !important;

    border: 0 !important;

    border-right:
        1px solid rgba(0, 220, 235, 0.12) !important;

    background: transparent !important;
}

.aprs-module-header .aprs-meta-item:last-child {
    border-right: 0 !important;
}

.aprs-module-header .aprs-meta-item span {

    display: block !important;

    margin: 0 0 6px !important;

    color:
        rgba(130, 200, 215, 0.62) !important;

    font-size: 7px !important;

    font-weight: 800 !important;

    line-height: 1 !important;

    letter-spacing: 1.35px !important;
}

.aprs-module-header .aprs-meta-item strong {

    display: block !important;

    color: #ffffff !important;

    font-size: 12px !important;

    font-weight: 800 !important;

    line-height: 1 !important;

    letter-spacing: 0.6px !important;
}


/* ------------------------------------------------------------
   API BADGE
   ------------------------------------------------------------ */

.aprs-module-header .module-badge {

    align-self: center !important;

    margin: 0 !important;

    flex-shrink: 0 !important;
}


/* ------------------------------------------------------------
   TABLET
   ------------------------------------------------------------ */

@media (max-width: 1050px) {

    .aprs-module-header {

        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        row-gap: 14px !important;
    }

    .aprs-module-header .aprs-header-meta {

        grid-column: 1 / -1 !important;

        grid-row: 2 !important;

        justify-self: start !important;
    }

    .aprs-module-header .module-badge {

        grid-column: 2 !important;

        grid-row: 1 !important;
    }
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 650px) {

    .aprs-module-header {

        display: flex !important;

        flex-direction: column !important;

        align-items: flex-start !important;

        gap: 14px !important;
    }

    .aprs-module-header .aprs-header-meta {

        width: 100% !important;
    }

    .aprs-module-header .aprs-meta-item {

        flex: 1 !important;

        min-width: 0 !important;

        padding: 9px 10px !important;
    }

    .aprs-module-header .module-badge {

        position: absolute !important;

        right: 0 !important;

        top: 0 !important;
    }
}

/* =========================================================
   MESH-03.3 — MESH MAPPER VISUAL SYSTEM
   TI2STB OPERATIONS
   LAB / v0.3.0-dev
   ========================================================= */

.mesh-provenance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 28px;
    overflow: hidden;
}

.mesh-provenance-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    min-height: 78px;
    background: rgba(5, 15, 28, 0.72);
    border-right: 1px solid rgba(0, 229, 255, 0.08);
}

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

.mesh-provenance-item .panel-label {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.58;
}

.mesh-provenance-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.02em;
}


/* ---------------------------------------------------------
   API STATUS
   --------------------------------------------------------- */

#mesh-api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#mesh-api-status .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e5a8;
    box-shadow: 0 0 10px rgba(0, 229, 168, 0.65);
}


/* ---------------------------------------------------------
   KPI GRID
   --------------------------------------------------------- */

.mesh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.mesh-kpi-grid .kpi-card {
    min-width: 0;
    padding: 18px 16px;
}

.mesh-kpi-grid .kpi-label {
    display: block;
    margin-bottom: 10px;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.62;
}

.mesh-kpi-grid .kpi-value {
    display: block;
    font-size: 28px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}


/* ---------------------------------------------------------
   INTELLIGENCE GRID
   --------------------------------------------------------- */

.mesh-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.mesh-intelligence-grid .panel {
    min-width: 0;
}


/* ---------------------------------------------------------
   EVENT DISTRIBUTION
   --------------------------------------------------------- */

.mesh-event-distribution {
    min-height: 260px;
    padding: 18px 20px;
}

.mesh-event-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mesh-event-row:last-child {
    margin-bottom: 0;
}

.mesh-event-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.mesh-event-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.07);
}

.mesh-event-bar > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(0, 229, 255, 0.45),
        rgba(0, 229, 255, 0.95)
    );
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.28);
    transition: width 0.35s ease;
}

.mesh-event-count {
    text-align: right;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}


/* ---------------------------------------------------------
   MAP PLACEHOLDER
   --------------------------------------------------------- */

.mesh-map-placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 24px;
    overflow: hidden;
    text-align: center;
    background:
        linear-gradient(
            rgba(0, 229, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 229, 255, 0.025) 1px,
            transparent 1px
        ),
        rgba(2, 10, 20, 0.7);
    background-size: 32px 32px;
}

.mesh-map-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at center,
            rgba(0, 229, 255, 0.08),
            transparent 55%
        );
    pointer-events: none;
}

.mesh-map-placeholder .placeholder-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.mesh-map-placeholder strong,
.mesh-map-placeholder span {
    position: relative;
    z-index: 1;
}

.mesh-map-placeholder strong {
    font-size: 12px;
    letter-spacing: 0.12em;
}

.mesh-map-placeholder > span {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.14em;
    opacity: 0.5;
}


/* ---------------------------------------------------------
   EVENTS TABLE
   --------------------------------------------------------- */

.mesh-events-panel {
    margin-top: 16px;
    overflow: hidden;
}

.mesh-events-table {
    width: 100%;
}

.mesh-events-table th,
.mesh-events-table td {
    white-space: nowrap;
}

.mesh-events-table th {
    font-size: 9px;
    letter-spacing: 0.12em;
}

.mesh-events-table td {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.mesh-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 7px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.mesh-empty {
    padding: 42px 20px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.12em;
    opacity: 0.45;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1100px) {

    .mesh-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mesh-provenance {
        grid-template-columns: 1fr;
    }

    .mesh-provenance-item {
        border-right: none;
        border-bottom: 1px solid rgba(0, 229, 255, 0.08);
    }

    .mesh-provenance-item:last-child {
        border-bottom: none;
    }

}


@media (max-width: 800px) {

    .mesh-intelligence-grid {
        grid-template-columns: 1fr;
    }

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

    .mesh-events-panel {
        overflow-x: auto;
    }

}


@media (max-width: 520px) {

    .mesh-kpi-grid {
        grid-template-columns: 1fr;
    }

    .mesh-event-row {
        grid-template-columns: 62px minmax(0, 1fr) 42px;
        gap: 8px;
    }

}

