:root {
    --bg: #02060f;
    --panel: #071426;
    --panel-2: #091a30;
    --line: #173d69;

    --cyan: #15e8ff;
    --blue: #168cff;
    --violet: #764cff;
    --magenta: #e43cff;
    --green: #20f59a;
    --gold: #ffbf3e;
    --red: #ff4669;

    --text: #f6fbff;
    --muted: #8faac3;

    --radius: 12px;

    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
}

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

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(21,232,255,.05),
            transparent 28%
        ),
        radial-gradient(
            circle at 82% 12%,
            rgba(228,60,255,.045),
            transparent 30%
        ),
        #02060f;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.app {
    display: grid;
    grid-template-columns: 235px minmax(0,1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;

    height: 100vh;
    overflow: auto;

    padding: 14px 12px;

    background:
        linear-gradient(
            180deg,
            rgba(6,18,35,.98),
            rgba(2,8,17,.98)
        );

    border-right: 1px solid rgba(22,140,255,.28);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 7px 15px;
}

.brand-mark {
    font-size: 25px;
}

.brand-name {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: .04em;
}

.brand-name span {
    color: var(--cyan);
}

.brand-sub {
    margin-top: 2px;

    color: #8fb8da;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.nav-primary {
    display: block;

    margin-bottom: 11px;
    padding: 10px 12px;

    border-radius: 8px;

    background:
        linear-gradient(
            90deg,
            #0c6eff,
            #1450ff
        );

    color: white;
    font-weight: 800;
}

.nav-group {
    margin: 13px 0;
}

.nav-title {
    margin-bottom: 5px;

    color: var(--cyan);

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;

    width: 100%;

    padding: 5px 8px;

    border: 0;
    background: transparent;

    color: #c1d0de;

    text-align: left;
    font-size: 11px;
}

.nav-item:hover {
    color: white;
    background: rgba(22,140,255,.09);
}

.sidebar-footer {
    margin-top: 20px;
    padding: 12px;

    border: 1px solid rgba(22,140,255,.4);
    border-radius: 10px;

    text-align: center;

    box-shadow:
        inset 0 0 18px rgba(22,140,255,.08);
}

.main {
    min-width: 0;
    padding: 11px;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 12px;

    align-items: center;

    margin-bottom: 11px;
}

.search {
    width: 100%;

    padding: 10px 14px;

    border: 1px solid #214a78;
    border-radius: 8px;

    background: #07182d;
    color: var(--text);
}

.forge-button {
    border: 1px solid var(--blue);
    border-radius: 8px;

    padding: 9px 15px;

    color: white;

    background:
        linear-gradient(
            90deg,
            rgba(22,140,255,.20),
            rgba(118,76,255,.22)
        );

    box-shadow:
        0 0 12px rgba(22,140,255,.26);
}

.admin-chip {
    padding: 7px 11px;

    border: 1px solid #244569;
    border-radius: 8px;

    background: #071426;

    font-size: 11px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 8px;

    margin-bottom: 9px;
}

.card,
.panel {
    border: 1px solid rgba(41,91,137,.70);
    border-radius: var(--radius);

    background:
        linear-gradient(
            180deg,
            rgba(8,25,46,.98),
            rgba(4,15,29,.98)
        );

    box-shadow:
        inset 0 0 20px rgba(22,140,255,.025);
}

.kpi {
    min-height: 86px;
    padding: 13px;

    display: grid;
    grid-template-columns: auto 1fr;
    gap: 11px;
}

.kpi-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    font-size: 21px;

    background: rgba(22,140,255,.22);
}

.kpi-label {
    color: #cad8e5;
    font-size: 10px;
}

.kpi-value {
    margin-top: 3px;

    font-size: 23px;
    font-weight: 800;
}

.kpi-delta {
    margin-top: 3px;

    color: var(--green);

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

.analytics {
    display: grid;
    grid-template-columns: 1.55fr .9fr 1.05fr;
    gap: 9px;

    margin-bottom: 9px;
}

.panel {
    padding: 12px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 10px;
}

.panel-title {
    font-size: 14px;
    font-weight: 800;
}

.live {
    color: var(--green);
    font-size: 10px;
}

.map {
    height: 150px;

    border-radius: 8px;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(22,140,255,.20),
            transparent 55%
        ),
        #041222;

    color: #67aee7;

    font-weight: 800;
    letter-spacing: .15em;
}

.device-chart {
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 14px;
    align-items: center;
}

.donut {
    width: 130px;
    aspect-ratio: 1;
    border-radius: 50%;

    display: grid;
    place-items: center;

    background:
        conic-gradient(
            var(--blue) 0 38%,
            var(--cyan) 38% 67%,
            var(--violet) 67% 91%,
            var(--magenta) 91% 96%,
            var(--gold) 96% 100%
        );

    position: relative;
}

.donut::after {
    content: "";

    position: absolute;
    width: 72%;
    aspect-ratio: 1;

    border-radius: 50%;

    background: #071426;
}

.donut-value {
    position: relative;
    z-index: 2;

    text-align: center;
    font-size: 21px;
    font-weight: 900;
}

.legend-row,
.health-row,
.status-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    padding: 4px 0;

    color: #c9d8e6;
    font-size: 10px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(8,minmax(0,1fr));
    gap: 8px;

    margin-bottom: 9px;
}

.action {
    min-height: 57px;

    border: 1px solid var(--line);
    border-radius: 10px;

    color: white;

    background: #091a31;

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

.action[data-tone="blue"] {
    border-color: var(--blue);
    box-shadow: inset 0 0 18px rgba(22,140,255,.14);
}

.action[data-tone="violet"] {
    border-color: var(--violet);
}

.action[data-tone="green"] {
    border-color: #1bd6b0;
}

.action[data-tone="gold"] {
    border-color: var(--gold);
}

.action[data-tone="magenta"] {
    border-color: var(--magenta);
}

.mid {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 9px;

    margin-bottom: 9px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 6px 7px;

    border-bottom: 1px solid rgba(64,94,124,.25);

    text-align: left;

    font-size: 10px;
}

th {
    color: #89a6bf;
    font-weight: 700;
}

.preview {
    min-height: 207px;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 68% 50%,
            rgba(22,140,255,.26),
            transparent 45%
        ),
        #020814;
}

.preview-nav {
    display: flex;
    gap: 16px;

    color: #d6e3ef;

    font-size: 10px;
}

.preview-hero {
    flex: 1;

    display: flex;
    align-items: center;

    padding: 20px;

    background:
        linear-gradient(
            90deg,
            rgba(2,8,20,.92),
            rgba(2,8,20,.30)
        );
}

.preview-copy h2 {
    margin: 0;

    max-width: 420px;

    font-size: 25px;
    line-height: 1;
}

.preview-categories {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 6px;
}

.preview-cat {
    padding: 9px 5px;

    border-radius: 6px;

    text-align: center;

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

.bottom {
    display: grid;
    grid-template-columns: 1.75fr .75fr;
    gap: 9px;
}

.simulator {
    min-height: 325px;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 1.7fr .52fr;
    gap: 12px;
}

.choice-title {
    margin-bottom: 6px;

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

.choice-sub {
    margin-bottom: 9px;

    color: var(--muted);
    font-size: 9px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 6px;
}

.device-option,
.tv-option {
    min-height: 57px;

    border: 1px solid #204a75;
    border-radius: 8px;

    background: #07182d;
    color: #e5f4ff;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    font-size: 9px;
}

.device-option .ico,
.tv-option .ico {
    font-size: 19px;
}

.device-option:hover,
.tv-option:hover,
.device-option.selected,
.tv-option.selected {
    border-color: var(--cyan);

    background:
        linear-gradient(
            180deg,
            rgba(22,140,255,.28),
            rgba(7,24,45,.95)
        );

    box-shadow:
        0 0 11px rgba(22,140,255,.20);
}

.choice-group.locked {
    opacity: .30;
    filter: grayscale(.85);
    pointer-events: none;
}

.model-strip {
    margin-top: 8px;

    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.model-button {
    padding: 5px 8px;

    border: 1px solid #244d77;
    border-radius: 6px;

    background: #07172b;
    color: white;

    font-size: 8px;
}

.model-button.selected {
    border-color: var(--cyan);
    color: var(--cyan);
}

.sim-screen {
    min-height: 245px;

    border: 7px solid #111927;
    border-radius: 6px;

    background:
        radial-gradient(
            circle at 70% 40%,
            rgba(22,140,255,.28),
            transparent 50%
        ),
        #020712;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    box-shadow:
        0 14px 30px rgba(0,0,0,.5);
}

.sim-top {
    display: flex;
    justify-content: space-between;

    padding: 9px 11px;

    font-size: 9px;
}

.sim-live {
    flex: 1;

    display: flex;
    align-items: center;

    padding: 18px;

    background:
        linear-gradient(
            90deg,
            rgba(1,5,12,.95),
            rgba(10,34,63,.38)
        );
}

.sim-live h3 {
    margin: 0;
    font-size: 26px;
}

.sim-channels {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 4px;

    padding: 7px;
}

.sim-channel {
    padding: 8px 3px;

    border: 1px solid #164f82;

    text-align: center;
    font-size: 8px;
}

.remote {
    min-height: 250px;

    padding: 10px 7px;

    border-radius: 25px;

    background:
        linear-gradient(
            180deg,
            #1b2532,
            #090f17
        );

    border: 1px solid #44515e;

    text-align: center;
}

.remote-brand {
    margin-bottom: 9px;

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

.remote-button {
    width: 28px;
    height: 28px;

    margin: 3px;

    border: 0;
    border-radius: 50%;

    background: #252f3a;
    color: white;

    font-size: 9px;
}

.remote-pad {
    width: 86px;
    height: 86px;

    margin: 10px auto;

    border-radius: 50%;

    border: 1px solid #586575;

    display: grid;
    place-items: center;
}

.deploy-button {
    width: 100%;

    margin-top: 10px;
    padding: 10px;

    border: 1px solid var(--cyan);
    border-radius: 8px;

    background:
        linear-gradient(
            90deg,
            #0877ff,
            #145dff
        );

    color: white;

    font-weight: 800;
}

.side-stack {
    display: grid;
    gap: 9px;
}

.activity-list {
    display: grid;
    gap: 6px;
}

.activity-row {
    display: grid;
    grid-template-columns: 1fr auto;

    gap: 8px;

    font-size: 9px;
}

.green-dot {
    color: var(--green);
}

.demo-label {
    padding: 3px 7px;

    border: 1px solid rgba(255,191,62,.5);
    border-radius: 999px;

    color: var(--gold);

    font-size: 8px;
    font-weight: 800;
}

.drawer {
    position: fixed;

    z-index: 9999;

    top: 0;
    right: 0;

    width: min(420px,92vw);
    height: 100vh;

    padding: 22px;

    transform: translateX(105%);

    transition: transform .22s ease;

    background: #061426;

    border-left: 1px solid rgba(22,140,255,.5);

    box-shadow:
        -20px 0 60px rgba(0,0,0,.55);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    right: 14px;
    top: 14px;

    border: 0;
    background: transparent;
    color: white;

    font-size: 22px;
}

.drawer h2 {
    margin-top: 30px;
}

.drawer-field {
    width: 100%;

    margin: 7px 0;
    padding: 10px;

    border: 1px solid #224d79;
    border-radius: 7px;

    background: #081a30;
    color: white;
}

.focused {
    outline: 2px solid var(--cyan);
    box-shadow: 0 0 30px rgba(22,140,255,.20);
}

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

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

    .actions {
        grid-template-columns: repeat(4,1fr);
    }

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

@media (max-width: 850px) {
    .app {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .topbar,
    .analytics,
    .mid,
    .bottom {
        grid-template-columns: 1fr;
    }

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

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

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


/* =========================================================
   GTKZ FORGE — FINAL 100% VIEWPORT SIMULATOR OWNER

   ROW 1 = all smart devices
   ROW 2 = all TV brands
   ROW 3 = wide preview + factory remote
   ========================================================= */


/* ---------------------------------------------------------
   APP / SIDEBAR
   --------------------------------------------------------- */

.app {
    grid-template-columns:
        195px minmax(0, 1fr);
}

.main {
    min-width: 0;

    padding:
        8px;
}

.sidebar {
    width:
        195px;

    min-width:
        195px;

    padding:
        10px 9px;

    overflow-x:
        hidden;

    overflow-y:
        auto;
}

.brand {
    padding:
        5px 5px 10px;
}

.brand-name {
    font-size:
        17px;
}

.brand-sub {
    font-size:
        7.5px;
}

.nav-group {
    margin:
        8px 0;
}

.nav-title {
    font-size:
        10.5px;
}

.nav-item {
    padding:
        3px 6px;

    font-size:
        9.5px;
}

.sidebar-footer {
    margin-top:
        10px;

    padding:
        7px;

    height:
        auto;

    min-height:
        0;
}


/* ---------------------------------------------------------
   BOTTOM MAIN AREA
   --------------------------------------------------------- */

.bottom {
    display:
        grid;

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

    gap:
        9px;

    width:
        100%;

    align-items:
        start;
}

.simulator {
    width:
        100%;

    min-width:
        0;

    padding:
        11px;
}


/* ---------------------------------------------------------
   UNIVERSAL DEVICE SIMULATOR
   --------------------------------------------------------- */

.simulator-grid {
    display:
        grid !important;

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

    grid-template-rows:
        auto
        auto
        auto;

    gap:
        10px !important;

    width:
        100% !important;

    min-width:
        0 !important;

    align-items:
        stretch !important;
}


/* Step 1 spans the complete width */

#device-group {
    grid-column:
        1 / 13 !important;

    grid-row:
        1 !important;

    min-width:
        0 !important;
}


/* Step 2 spans the complete width */

#tv-group {
    grid-column:
        1 / 13 !important;

    grid-row:
        2 !important;

    min-width:
        0 !important;
}


/* Preview / player */

.simulator-grid > div:nth-child(3) {
    grid-column:
        1 / 11 !important;

    grid-row:
        3 !important;

    min-width:
        0 !important;

    display:
        flex !important;

    flex-direction:
        column !important;
}


/* Factory remote */

.simulator-grid > .remote {
    grid-column:
        11 / 13 !important;

    grid-row:
        3 !important;

    min-width:
        0 !important;

    width:
        100% !important;

    max-width:
        125px !important;

    justify-self:
        center !important;
}


/* ---------------------------------------------------------
   STEP 1 + STEP 2 — SINGLE ROW OF 8 ICONS
   --------------------------------------------------------- */

#device-group .icon-grid,
#tv-group .icon-grid {
    display:
        grid !important;

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

    gap:
        8px !important;
}


/*
 * More compact headings/copy.
 */

.choice-title {
    margin-bottom:
        3px !important;

    font-size:
        12px !important;
}

.choice-sub {
    margin-bottom:
        7px !important;

    font-size:
        8px !important;
}


/* ---------------------------------------------------------
   ICON TILES
   --------------------------------------------------------- */

.device-option,
.tv-option {
    width:
        100% !important;

    min-width:
        0 !important;

    height:
        66px !important;

    min-height:
        66px !important;

    padding:
        7px !important;

    border-radius:
        10px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;
}


/* Smart-device icons */

.gtkz-device-icon {
    width:
        40px !important;

    height:
        40px !important;

    max-width:
        40px !important;

    max-height:
        40px !important;

    margin:
        0 auto !important;
}


/* TV logos */

.tv-option .gtkz-device-icon {
    width:
        68px !important;

    height:
        32px !important;

    max-width:
        68px !important;

    max-height:
        32px !important;
}


/* Still icons only */

.gtkz-device-label {
    display:
        none !important;
}


/* ---------------------------------------------------------
   LOCKING
   --------------------------------------------------------- */

.choice-group.locked {
    opacity:
        .27;

    filter:
        grayscale(.86);

    pointer-events:
        none;
}


/* ---------------------------------------------------------
   MODEL OPTIONS
   --------------------------------------------------------- */

.model-strip {
    margin-top:
        6px !important;

    gap:
        5px !important;
}

.model-button {
    min-height:
        25px !important;

    padding:
        4px 7px !important;

    font-size:
        8px !important;
}


/* ---------------------------------------------------------
   PLAYER
   --------------------------------------------------------- */

.sim-screen {
    width:
        100% !important;

    max-width:
        100% !important;

    min-width:
        0 !important;

    min-height:
        235px !important;

    height:
        235px !important;
}

.sim-live {
    min-height:
        130px !important;

    padding:
        16px !important;
}

.sim-live h3 {
    font-size:
        clamp(
            25px,
            2vw,
            36px
        ) !important;
}

.sim-live p {
    margin-bottom:
        5px;
}


/* Channel row */

.sim-channels {
    grid-template-columns:
        repeat(7, minmax(0, 1fr))
        !important;

    gap:
        5px !important;

    padding:
        6px !important;
}

.sim-channel {
    min-width:
        0 !important;

    padding:
        7px 2px !important;

    overflow:
        hidden !important;

    white-space:
        nowrap !important;

    text-overflow:
        ellipsis !important;
}


/* ---------------------------------------------------------
   LAUNCH
   --------------------------------------------------------- */

.deploy-button {
    width:
        100% !important;

    min-height:
        42px !important;

    margin-top:
        8px !important;

    padding:
        8px !important;

    font-size:
        14px !important;
}


/* ---------------------------------------------------------
   REMOTE
   --------------------------------------------------------- */

.remote {
    min-height:
        285px !important;

    height:
        285px !important;

    padding:
        10px 5px !important;
}

.remote-brand {
    min-height:
        20px;

    font-size:
        8px !important;

    text-align:
        center;
}

.remote-pad {
    width:
        76px !important;

    height:
        76px !important;

    margin:
        11px auto !important;
}

.remote-button {
    width:
        25px !important;

    height:
        25px !important;

    margin:
        2px !important;
}


/* ---------------------------------------------------------
   RIGHT RAIL
   --------------------------------------------------------- */

.side-stack {
    width:
        215px;

    min-width:
        215px;

    display:
        grid;

    grid-template-columns:
        1fr;

    gap:
        9px;

    align-content:
        start;
}

.side-stack .panel {
    width:
        100%;

    min-width:
        0;
}

.activity-row,
.status-row {
    font-size:
        8.5px;
}


/* ---------------------------------------------------------
   WIDE DISPLAYS
   --------------------------------------------------------- */

@media (min-width: 1500px) {

    .app {
        grid-template-columns:
            205px minmax(0, 1fr);
    }

    .sidebar {
        width:
            205px;

        min-width:
            205px;
    }

    .bottom {
        grid-template-columns:
            minmax(0, 1fr)
            225px;
    }

    .side-stack {
        width:
            225px;

        min-width:
            225px;
    }

    .device-option,
    .tv-option {
        height:
            72px !important;

        min-height:
            72px !important;
    }

    .gtkz-device-icon {
        width:
            44px !important;

        height:
            44px !important;
    }

    .tv-option .gtkz-device-icon {
        width:
            72px !important;

        height:
            34px !important;
    }

    .sim-screen {
        height:
            255px !important;

        min-height:
            255px !important;
    }

    .remote {
        height:
            305px !important;

        min-height:
            305px !important;
    }
}


/* ---------------------------------------------------------
   WHEN SCREEN REALLY GETS NARROW
   --------------------------------------------------------- */

@media (max-width: 1120px) {

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

    .side-stack {
        width:
            100%;

        min-width:
            0;

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


@media (max-width: 850px) {

    .app {
        display:
            block;
    }

    .sidebar {
        display:
            none;
    }

    #device-group .icon-grid,
    #tv-group .icon-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr))
            !important;
    }

    .simulator-grid {
        grid-template-columns:
            1fr !important;
    }

    #device-group,
    #tv-group,
    .simulator-grid > div:nth-child(3),
    .simulator-grid > .remote {
        grid-column:
            1 !important;

        grid-row:
            auto !important;
    }

    .remote {
        max-width:
            140px !important;
    }

    .side-stack {
        grid-template-columns:
            1fr;
    }
}


/* ---------------------------------------------------------
   SAFETY
   --------------------------------------------------------- */

html,
body,
.app,
.main,
.bottom,
.simulator,
.simulator-grid {
    max-width:
        100%;

    overflow-x:
        hidden;
}


/* =========================================================
   GTKZ FORGE — SIDEBAR FINAL OWNER

   Sidebar is one full-height page column.
   No independent vertical scrollbar.
   No browser-scale tricks.
   ========================================================= */

html,
body {
    zoom: 1 !important;
}

.app {
    width: 100% !important;

    min-height: 100vh !important;

    align-items: stretch !important;

    overflow: visible !important;
}


/* ---------------------------------------------------------
   LEFT RAIL
   --------------------------------------------------------- */

.sidebar {
    position: relative !important;

    top: auto !important;
    bottom: auto !important;

    width: 195px !important;
    min-width: 195px !important;

    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;

    align-self: stretch !important;

    overflow-x: hidden !important;
    overflow-y: visible !important;

    scrollbar-width: none !important;

    background:
        linear-gradient(
            180deg,
            #061223 0%,
            #030b16 45%,
            #02070f 100%
        ) !important;

    border-right:
        1px solid
        rgba(22,140,255,.30) !important;
}


/*
 * Kill any native sidebar scrollbar left by earlier rules.
 */
.sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}


/*
 * The rail itself follows the height of main content.
 */
.main {
    min-height: 100% !important;
    align-self: stretch !important;
}


/* ---------------------------------------------------------
   SIDEBAR CONTENT
   --------------------------------------------------------- */

.brand {
    position: relative !important;

    top: auto !important;

    padding:
        7px 7px 12px !important;
}

.nav-primary {
    position: relative !important;

    top: auto !important;
}

.nav-group {
    position: relative !important;

    top: auto !important;

    margin:
        9px 0 !important;
}

.sidebar-footer {
    position: relative !important;

    top: auto !important;
    bottom: auto !important;

    margin:
        14px 0 12px !important;

    padding:
        9px 7px !important;

    height:
        auto !important;

    min-height:
        0 !important;

    max-height:
        none !important;
}


/* ---------------------------------------------------------
   DESKTOP WIDTH
   --------------------------------------------------------- */

@media (min-width: 1500px) {

    .app {
        grid-template-columns:
            205px minmax(0,1fr) !important;
    }

    .sidebar {
        width:
            205px !important;

        min-width:
            205px !important;
    }
}


@media (min-width: 901px) and (max-width: 1499px) {

    .app {
        grid-template-columns:
            195px minmax(0,1fr) !important;
    }

    .sidebar {
        width:
            195px !important;

        min-width:
            195px !important;
    }
}


/* Mobile keeps the existing collapsed behavior. */

@media (max-width: 900px) {

    .sidebar {
        display:
            none !important;
    }
}


/* =========================================================
   GTKZ FORGE — COMMERCIAL DESKTOP SIZE OWNER

   Goal:
   - normal browser zoom: 100%
   - no whole-page scaling
   - readable commercial SaaS density
   - simulator structure preserved
   - normal document scrolling preserved
   ========================================================= */


/* ---------------------------------------------------------
   BASE
   --------------------------------------------------------- */

html,
body {
    zoom: 1 !important;

    width: 100%;

    margin: 0;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    font-size: 14px;
}

body {
    line-height: 1.35;
}


/* ---------------------------------------------------------
   APPLICATION FRAME
   --------------------------------------------------------- */

.app {
    display: grid !important;

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

    width: 100% !important;

    min-height: 100vh;

    align-items: stretch;
}


/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.sidebar {
    width: 205px !important;
    min-width: 205px !important;

    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;

    padding:
        12px 10px !important;

    overflow: visible !important;

    align-self: stretch !important;
}

.brand {
    padding:
        6px 5px 13px !important;
}

.brand-name {
    font-size:
        18px !important;

    line-height:
        1.1 !important;
}

.brand-sub {
    font-size:
        8px !important;
}

.nav-group {
    margin:
        9px 0 !important;
}

.nav-title {
    margin-bottom:
        3px !important;

    font-size:
        10px !important;
}

.nav-item {
    min-height:
        25px !important;

    padding:
        4px 7px !important;

    font-size:
        10px !important;

    line-height:
        1.2 !important;
}

.sidebar-footer {
    margin-top:
        14px !important;

    padding:
        9px !important;

    height:
        auto !important;

    min-height:
        0 !important;
}


/* ---------------------------------------------------------
   MAIN CONTENT
   --------------------------------------------------------- */

.main {
    width: 100%;

    min-width: 0;

    padding:
        10px 12px 18px !important;

    overflow: visible !important;
}


/* ---------------------------------------------------------
   GENERAL PANELS
   --------------------------------------------------------- */

.panel,
.card {
    border-radius:
        10px !important;
}

.panel {
    padding:
        11px !important;
}

.panel-head {
    margin-bottom:
        8px !important;
}

.panel-title {
    font-size:
        14px !important;

    line-height:
        1.2 !important;
}


/* ---------------------------------------------------------
   TOP BAR
   --------------------------------------------------------- */

.topbar {
    min-height:
        46px !important;

    gap:
        8px !important;

    margin-bottom:
        8px !important;
}


/* ---------------------------------------------------------
   KPI CARDS
   --------------------------------------------------------- */

.kpis {
    gap:
        8px !important;

    margin-bottom:
        8px !important;
}

.kpi {
    min-height:
        74px !important;

    padding:
        10px !important;
}

.kpi-value {
    font-size:
        20px !important;
}


/* ---------------------------------------------------------
   ANALYTICS / UPPER CONTENT
   --------------------------------------------------------- */

.analytics {
    gap:
        8px !important;

    margin-bottom:
        8px !important;
}


/* ---------------------------------------------------------
   ACTION ROW
   --------------------------------------------------------- */

.actions {
    gap:
        7px !important;

    margin-bottom:
        8px !important;
}

.action {
    min-height:
        48px !important;

    padding:
        7px 6px !important;

    font-size:
        10px !important;
}


/* ---------------------------------------------------------
   MIDDLE AREA
   --------------------------------------------------------- */

.mid {
    gap:
        8px !important;

    margin-bottom:
        8px !important;
}


/* ---------------------------------------------------------
   LOWER MASTER GRID
   --------------------------------------------------------- */

.bottom {
    display: grid !important;

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

    gap:
        10px !important;

    width:
        100%;

    align-items:
        start;
}


/* ---------------------------------------------------------
   SIMULATOR PANEL
   --------------------------------------------------------- */

.simulator {
    width: 100%;

    min-width: 0;

    padding:
        12px !important;
}


/* ---------------------------------------------------------
   SIMULATOR STRUCTURE

   Step 1 = full row
   Step 2 = full row
   Preview + remote underneath
   --------------------------------------------------------- */

.simulator-grid {
    display: grid !important;

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

    grid-template-rows:
        auto
        auto
        auto;

    gap:
        9px !important;

    width:
        100% !important;

    min-width:
        0 !important;
}


#device-group {
    grid-column:
        1 / 13 !important;

    grid-row:
        1 !important;

    min-width:
        0 !important;
}


#tv-group {
    grid-column:
        1 / 13 !important;

    grid-row:
        2 !important;

    min-width:
        0 !important;
}


/* player */

.simulator-grid > div:nth-child(3) {
    grid-column:
        1 / 11 !important;

    grid-row:
        3 !important;

    min-width:
        0 !important;

    display:
        flex !important;

    flex-direction:
        column !important;
}


/* remote */

.simulator-grid > .remote {
    grid-column:
        11 / 13 !important;

    grid-row:
        3 !important;

    width:
        100% !important;

    max-width:
        125px !important;

    min-width:
        0 !important;

    justify-self:
        center !important;
}


/* ---------------------------------------------------------
   STEP HEADINGS
   --------------------------------------------------------- */

.choice-title {
    margin:
        0 0 2px !important;

    font-size:
        12px !important;

    font-weight:
        700 !important;
}

.choice-sub {
    margin:
        0 0 6px !important;

    font-size:
        8px !important;

    line-height:
        1.3 !important;
}


/* ---------------------------------------------------------
   ONE ROW / EIGHT ICONS
   --------------------------------------------------------- */

#device-group .icon-grid,
#tv-group .icon-grid {
    display: grid !important;

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

    gap:
        7px !important;
}


.device-option,
.tv-option {
    width:
        100% !important;

    min-width:
        0 !important;

    height:
        64px !important;

    min-height:
        64px !important;

    padding:
        7px !important;

    border-radius:
        10px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;
}


.gtkz-device-icon {
    display:
        block !important;

    width:
        38px !important;

    height:
        38px !important;

    max-width:
        38px !important;

    max-height:
        38px !important;

    margin:
        0 auto !important;
}


.tv-option .gtkz-device-icon {
    width:
        62px !important;

    height:
        31px !important;

    max-width:
        62px !important;

    max-height:
        31px !important;
}


.gtkz-device-label {
    display:
        none !important;
}


/* ---------------------------------------------------------
   PLAYER
   --------------------------------------------------------- */

.sim-screen {
    width:
        100% !important;

    min-width:
        0 !important;

    height:
        300px !important;

    min-height:
        300px !important;

    max-height:
        none !important;
}

.sim-live {
    min-height:
        188px !important;

    padding:
        16px !important;
}

.sim-live h3 {
    font-size:
        clamp(27px, 2vw, 36px)
        !important;

    line-height:
        1.05 !important;
}

.sim-live p {
    font-size:
        13px !important;
}

.sim-top {
    min-height:
        34px !important;

    padding:
        7px 9px !important;
}

.sim-channels {
    grid-template-columns:
        repeat(7, minmax(0, 1fr))
        !important;

    gap:
        5px !important;

    padding:
        6px !important;
}

.sim-channel {
    padding:
        8px 3px !important;

    font-size:
        8px !important;

    white-space:
        nowrap;

    overflow:
        hidden;

    text-overflow:
        ellipsis;
}


/* ---------------------------------------------------------
   LAUNCH BUTTON
   --------------------------------------------------------- */

.deploy-button {
    width:
        100% !important;

    min-height:
        44px !important;

    margin-top:
        8px !important;

    padding:
        8px !important;

    font-size:
        14px !important;

    border-radius:
        7px !important;
}


/* ---------------------------------------------------------
   FACTORY REMOTE
   --------------------------------------------------------- */

.remote {
    width:
        100% !important;

    height:
        352px !important;

    min-height:
        352px !important;

    max-width:
        125px !important;

    padding:
        11px 6px !important;
}

.remote-brand {
    min-height:
        23px !important;

    font-size:
        8px !important;

    text-align:
        center !important;
}

.remote-pad {
    width:
        78px !important;

    height:
        78px !important;

    margin:
        13px auto !important;
}

.remote-button {
    width:
        27px !important;

    height:
        27px !important;

    margin:
        2px !important;
}


/* ---------------------------------------------------------
   RIGHT RAIL
   --------------------------------------------------------- */

.side-stack {
    width:
        220px !important;

    min-width:
        220px !important;

    display:
        grid !important;

    grid-template-columns:
        1fr !important;

    gap:
        10px !important;

    align-content:
        start !important;
}

.side-stack .panel {
    width:
        100% !important;

    min-width:
        0 !important;

    padding:
        11px !important;
}

.activity-row,
.status-row {
    padding:
        3px 0 !important;

    gap:
        6px !important;

    font-size:
        9px !important;
}


/* ---------------------------------------------------------
   NORMAL LAPTOP
   --------------------------------------------------------- */

@media (max-width: 1350px) and (min-width: 1001px) {

    .app {
        grid-template-columns:
            190px minmax(0, 1fr)
            !important;
    }

    .sidebar {
        width:
            190px !important;

        min-width:
            190px !important;
    }

    .bottom {
        grid-template-columns:
            minmax(0, 1fr)
            200px !important;
    }

    .side-stack {
        width:
            200px !important;

        min-width:
            200px !important;
    }

    .device-option,
    .tv-option {
        height:
            58px !important;

        min-height:
            58px !important;
    }

    .gtkz-device-icon {
        width:
            34px !important;

        height:
            34px !important;
    }

    .tv-option .gtkz-device-icon {
        width:
            55px !important;

        height:
            28px !important;
    }
}


/* ---------------------------------------------------------
   SMALLER VIEWPORT
   Right rail drops underneath instead of crushing everything.
   --------------------------------------------------------- */

@media (max-width: 1000px) {

    .bottom {
        grid-template-columns:
            1fr !important;
    }

    .side-stack {
        width:
            100% !important;

        min-width:
            0 !important;

        grid-template-columns:
            repeat(2, minmax(0, 1fr))
            !important;
    }
}


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

@media (max-width: 850px) {

    .app {
        display:
            block !important;
    }

    .sidebar {
        display:
            none !important;
    }

    #device-group .icon-grid,
    #tv-group .icon-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr))
            !important;
    }

    .simulator-grid {
        grid-template-columns:
            1fr !important;
    }

    #device-group,
    #tv-group,
    .simulator-grid > div:nth-child(3),
    .simulator-grid > .remote {
        grid-column:
            1 !important;

        grid-row:
            auto !important;
    }

    .simulator-grid > .remote {
        max-width:
            150px !important;
    }

    .side-stack {
        grid-template-columns:
            1fr !important;
    }
}


/* =========================================================
   GTKZ FORGE — SIDEBAR WIDTH + TYPOGRAPHY OWNER
   ========================================================= */

@media (min-width: 1001px) {

    .app {
        grid-template-columns:
            235px minmax(0, 1fr) !important;
    }

    .sidebar {
        width:
            235px !important;

        min-width:
            235px !important;

        padding:
            14px 12px !important;
    }

    .brand {
        padding:
            8px 8px 16px !important;
    }

    .brand-name {
        font-size:
            22px !important;

        line-height:
            1.05 !important;
    }

    .brand-sub {
        font-size:
            10px !important;

        line-height:
            1.25 !important;
    }

    .nav-group {
        margin:
            12px 0 !important;
    }

    .nav-title {
        margin-bottom:
            5px !important;

        font-size:
            12px !important;

        line-height:
            1.2 !important;

        letter-spacing:
            .04em !important;
    }

    .nav-item {
        min-height:
            31px !important;

        padding:
            6px 9px !important;

        font-size:
            12px !important;

        line-height:
            1.25 !important;

        border-radius:
            7px !important;
    }

    .sidebar-footer {
        margin-top:
            18px !important;

        padding:
            11px 9px !important;
    }

    .sidebar-footer strong {
        font-size:
            14px !important;
    }

    .sidebar-footer small {
        font-size:
            10px !important;
    }
}


/* Slightly tighter on smaller laptops */

@media (min-width: 1001px) and (max-width: 1350px) {

    .app {
        grid-template-columns:
            220px minmax(0, 1fr) !important;
    }

    .sidebar {
        width:
            220px !important;

        min-width:
            220px !important;
    }

    .brand-name {
        font-size:
            20px !important;
    }

    .nav-item {
        font-size:
            11.5px !important;
    }
}
