:root {
    --bg: #050608;
    --bg-soft: #080a0d;
    --panel: #0b0d10;
    --panel-2: #0f1217;
    --panel-3: #12161c;

    --border: #20252d;
    --border-soft: #181c22;

    --text: #f4f6f8;
    --text-2: #c4cad3;
    --muted: #7d8797;
    --muted-2: #5d6675;

    --blue: #8db7ff;
    --blue-2: #5c8fe9;

    --green: #19e3a0;
    --red: #ff646e;
    --yellow: #f4c95d;

    --radius: 12px;
    --radius-sm: 8px;

    --sidebar: 280px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 80% -10%,
            rgba(73, 107, 167, .08),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

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

    font-size: 14px;
}

a {
    color: inherit;
}

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

button {
    cursor: pointer;
}

/* ============================================================
   SHELL
   ============================================================ */

.shell {
    min-height: 100vh;
    display: flex;
}

.side {
    position: fixed;
    inset: 0 auto 0 0;

    width: var(--sidebar);

    display: flex;
    flex-direction: column;

    padding: 20px;

    background:
        linear-gradient(
            180deg,
            #090b0e 0%,
            #07090b 100%
        );

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

    z-index: 50;
}

.main {
    width: calc(100% - var(--sidebar));
    margin-left: var(--sidebar);

    min-height: 100vh;

    padding: 0;
}

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

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

    padding: 2px 10px 22px;
    margin-bottom: 18px;

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

.brand img {
    width: 50px;
    height: 50px;

    object-fit: contain;

    border-radius: 12px;

    border: 1px solid #29303a;

    background: #101319;

    padding: 4px;
}

.brand-copy {
    min-width: 0;
}

.brand-copy b {
    display: block;

    color: #fff;

    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;

    letter-spacing: -.3px;
}

.brand-copy span {
    display: block;

    margin-top: 5px;

    color: #738096;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: .4px;
}

/* ============================================================
   NAV
   ============================================================ */

.nav-title {
    padding: 8px 12px 8px;

    color: #687386;

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

    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav a {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 44px;

    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: 10px;

    color: #8994a5;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.nav a svg {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;

    stroke: currentColor;
}

.nav a:hover {
    color: #e8edf4;
    background: #10141a;
    border-color: #1e242d;
}

.nav a.on {
    color: #f5f7fa;

    background: #171b21;

    border-color: #292f38;

    box-shadow:
        inset 3px 0 0 #8caef1;
}

.nav a.on svg {
    color: #a6c5ff;
}

/* ============================================================
   SIDEBAR BOTTOM
   ============================================================ */

.sidebottom {
    margin-top: auto;

    padding-top: 18px;

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

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

    padding: 10px;

    margin-bottom: 10px;
}

.user-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 0 4px rgba(25, 227, 160, .08);
}

.user-info {
    min-width: 0;
}

.user-info small {
    display: block;

    color: #677284;

    font-size: 10px;
}

.user-info strong {
    display: block;

    max-width: 190px;

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

    color: #dce2ea;

    font-size: 12px;
}

.logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    height: 42px;

    border: 1px solid #252b34;
    border-radius: 9px;

    background: #0c0f13;

    color: #aab3c0;

    text-decoration: none;

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

.logout:hover {
    background: #14181e;
    color: #fff;
}

/* ============================================================
   PAGE
   ============================================================ */

.page {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding: 38px 44px 60px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;

    margin-bottom: 28px;
}

.eyebrow {
    color: #667285;

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

    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-header h1,
.page-header h2 {
    margin: 7px 0 5px;

    color: #fff;

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

    letter-spacing: -1.2px;
}

.page-header p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

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

.card,
.panel,
.box {
    border: 1px solid var(--border);

    border-radius: var(--radius);

    background:
        linear-gradient(
            180deg,
            rgba(16,19,24,.72),
            rgba(9,11,14,.92)
        );

    box-shadow:
        0 10px 30px rgba(0,0,0,.12);
}

.card-header,
.panel-header {
    padding: 22px 24px;

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

.card-header h2,
.card-header h3,
.panel-header h2,
.panel-header h3 {
    margin: 0;

    color: #fff;

    font-size: 18px;
}

.card-header p,
.panel-header p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
}

/* ============================================================
   STAT GRID
   ============================================================ */

.stats,
.stat-grid,
.cards {
    display: grid;

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

    gap: 13px;

    margin-bottom: 20px;
}

.stat,
.stat-card {
    position: relative;

    min-height: 112px;

    padding: 19px;

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

    border-radius: 12px;

    background: #0a0c0f;
}

.stat-label,
.stat-card small {
    color: #6e798b;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.stat-value,
.stat-card strong {
    display: block;

    margin-top: 8px;

    color: #fff;

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

    letter-spacing: -.6px;
}

.stat-icon {
    position: absolute;

    top: 17px;
    right: 17px;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 1px solid #242a33;

    border-radius: 9px;

    background: #11151b;

    color: #8eaeeb;
}

/* ============================================================
   TABLE
   ============================================================ */

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

table {
    width: 100%;

    border-collapse: collapse;
}

thead th {
    padding: 14px 17px;

    background: #090b0e;

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

    color: #687384;

    text-align: left;

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

    letter-spacing: 1.25px;
    text-transform: uppercase;

    white-space: nowrap;
}

tbody td {
    padding: 16px 17px;

    border-bottom: 1px solid #171b21;

    color: #b9c1cd;

    vertical-align: middle;
}

tbody tr:hover td {
    background: rgba(255,255,255,.018);
}

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

/* ============================================================
   IP / MONOSPACE
   ============================================================ */

code,
.mono,
.ip,
.transit,
.public-key {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.ip {
    color: #f1f4f8;

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

.transit {
    display: inline-block;

    padding: 5px 8px;

    border: 1px solid #252b34;
    border-radius: 6px;

    background: #11151a;

    color: #9eb6df;

    font-size: 12px;
}

.public-key {
    max-width: 350px;

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

    color: #8994a5;

    font-size: 11px;
}

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

.badge,
.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 26px;

    padding: 4px 9px;

    border-radius: 999px;

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

    letter-spacing: .3px;
}

.badge:before,
.status:before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: currentColor;
}

.badge-success,
.status-success,
.status-active,
.badge.active {
    color: var(--green);

    background: rgba(25,227,160,.07);

    border: 1px solid rgba(25,227,160,.18);
}

.badge-danger,
.status-danger,
.status-inactive,
.badge.inactive {
    color: var(--red);

    background: rgba(255,100,110,.07);

    border: 1px solid rgba(255,100,110,.18);
}

.badge-warning,
.status-warning {
    color: var(--yellow);

    background: rgba(244,201,93,.07);

    border: 1px solid rgba(244,201,93,.18);
}

/* ============================================================
   BUTTONS
   ============================================================ */

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 38px;

    padding: 0 14px;

    border: 1px solid #2a3039;

    border-radius: 8px;

    background: #10141a;

    color: #dfe5ec;

    text-decoration: none;

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

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .1s ease;
}

button:hover,
.btn:hover {
    background: #171c23;

    border-color: #3b4450;
}

button:active,
.btn:active {
    transform: translateY(1px);
}

button.primary,
.btn.primary {
    background: #e9edf3;

    border-color: #e9edf3;

    color: #080a0d;
}

button.primary:hover,
.btn.primary:hover {
    background: #fff;

    border-color: #fff;
}

button.danger,
.btn.danger {
    color: #ff777e;

    border-color: rgba(255,100,110,.25);

    background: rgba(255,100,110,.06);
}

button.danger:hover,
.btn.danger:hover {
    background: rgba(255,100,110,.12);

    border-color: rgba(255,100,110,.45);
}

/* ============================================================
   FORMS
   ============================================================ */

form {
    max-width: 100%;
}

label {
    display: block;

    margin-bottom: 14px;

    color: #9da7b5;

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

    letter-spacing: .4px;
}

input,
select,
textarea {
    width: 100%;

    min-height: 42px;

    margin-top: 7px;

    padding: 0 12px;

    border: 1px solid #292f38;

    border-radius: 8px;

    outline: none;

    background: #090c10;

    color: #edf1f6;

    font-size: 13px;
}

textarea {
    min-height: 100px;

    padding-top: 11px;

    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #515b69;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #536d98;

    box-shadow:
        0 0 0 3px rgba(83,109,152,.10);
}

/* ============================================================
   SEARCH
   ============================================================ */

.search,
.searchbox {
    width: 100%;

    min-height: 44px;

    padding-left: 14px;

    border: 1px solid #252b34;

    border-radius: 9px;

    background: #0b0e12;
}

.search:focus,
.searchbox:focus {
    border-color: #526b93;
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    padding: 12px 14px;

    margin-bottom: 15px;

    border-radius: 8px;

    border: 1px solid #29303a;

    background: #10141a;

    color: #d9e0e9;

    font-size: 12px;
}

.alert.success {
    border-color: rgba(25,227,160,.22);

    background: rgba(25,227,160,.06);

    color: #6ef0c0;
}

.alert.error {
    border-color: rgba(255,100,110,.22);

    background: rgba(255,100,110,.06);

    color: #ff7c83;
}

/* ============================================================
   ACTION ROW
   ============================================================ */

.actions,
.toolbar,
.action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar {
    justify-content: space-between;

    margin-bottom: 16px;
}

/* ============================================================
   EMPTY
   ============================================================ */

.empty,
.empty-state {
    padding: 70px 25px;

    text-align: center;

    color: var(--muted);
}

.empty h3,
.empty-state h3 {
    margin: 0 0 7px;

    color: #e9edf2;

    font-size: 17px;
}

.empty p,
.empty-state p {
    margin: 0;

    color: #697486;

    font-size: 12px;
}

/* ============================================================
   LOGIN
   ============================================================ */

.loginbody {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(73,107,167,.12),
            transparent 35%
        ),
        #050608;
}

.loginbox {
    width: min(430px, 100%);

    padding: 34px;

    border: 1px solid #252b34;

    border-radius: 16px;

    background:
        linear-gradient(
            180deg,
            #0d1015,
            #080a0d
        );

    box-shadow:
        0 30px 80px rgba(0,0,0,.4);
}

.loginlogo {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 30px;
}

.loginlogo img {
    width: 48px;
    height: 48px;

    object-fit: contain;

    padding: 4px;

    border: 1px solid #29303a;

    border-radius: 11px;

    background: #11151b;
}

.loginlogo b {
    display: block;

    color: #fff;

    font-size: 18px;
}

.loginlogo span {
    display: block;

    margin-top: 2px;

    color: #707b8d;

    font-size: 10px;

    letter-spacing: 1.5px;
}

.loginbox h1 {
    margin: 8px 0;

    color: #fff;

    font-size: 30px;

    letter-spacing: -1px;
}

.loginbox > p {
    margin: 0 0 24px;

    color: #7d8796;

    line-height: 1.6;
}

.loginbox .primary {
    width: 100%;

    min-height: 44px;
}

.loginbox .foot {
    margin-top: 22px;

    color: #505a69;

    font-size: 10px;

    text-align: center;
}

/* ============================================================
   CODE / SYSTEM
   ============================================================ */

pre {
    overflow-x: auto;

    margin: 0;

    padding: 18px;

    border: 1px solid #20262f;

    border-radius: 9px;

    background: #07090c;

    color: #b6c0cf;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 11px;

    line-height: 1.7;
}

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

@media (max-width: 1000px) {

    :root {
        --sidebar: 225px;
    }

    .page {
        padding: 30px;
    }
}

@media (max-width: 760px) {

    .shell {
        display: block;
    }

    .side {
        position: relative;

        width: 100%;

        min-height: auto;

        padding: 14px;

        border-right: 0;

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

    .brand {
        margin-bottom: 10px;
    }

    .nav {
        display: grid;

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

    .sidebottom {
        display: none;
    }

    .main {
        width: 100%;

        margin-left: 0;
    }

    .page {
        padding: 24px 17px 40px;
    }

    .page-header {
        display: block;
    }

    .page-header h1,
    .page-header h2 {
        font-size: 28px;
    }

    .stats,
    .stat-grid,
    .cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {

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

    .stats,
    .stat-grid,
    .cards {
        grid-template-columns: 1fr;
    }

    .loginbox {
        padding: 25px;
    }
}

/* ============================================================
   CXV TRANSIT — DASHBOARD UI
   UI ONLY — NO APPLICATION LOGIC
   ============================================================ */

.cxv-page-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:24px;
    margin-bottom:30px;
}

.cxv-eyebrow {
    font-size:11px;
    font-weight:800;
    letter-spacing:2px;
    color:#71809a;
    margin-bottom:8px;
}

.cxv-page-head h1 {
    margin:0;
    font-size:36px;
    line-height:1.1;
    font-weight:800;
    letter-spacing:-1px;
}

.cxv-page-head p {
    margin:9px 0 0;
    color:#8290a8;
    font-size:15px;
}

.cxv-head-actions {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.cxv-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:42px;
    padding:0 17px;
    border:1px solid #252b35;
    border-radius:10px;
    background:#111419;
    color:#edf2f8;
    text-decoration:none;
    font-size:13px;
    font-weight:700;
    transition:.18s ease;
}

.cxv-btn:hover {
    border-color:#3b4555;
    background:#171b21;
    transform:translateY(-1px);
}

.cxv-btn-primary {
    background:#f1f3f6;
    border-color:#f1f3f6;
    color:#080a0d;
}

.cxv-btn-primary:hover {
    background:#ffffff;
    color:#080a0d;
}


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

.cxv-stat-card {
    min-height:145px;
    padding:21px;
    border:1px solid #242a33;
    border-radius:16px;
    background:#0f1217;
    box-sizing:border-box;
}

.cxv-stat-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:#7f8da5;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.5px;
    font-weight:700;
}

.cxv-icon {
    width:31px;
    height:31px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:9px;
    background:#181d25;
    color:#aeb9ca;
    font-size:14px;
}

.cxv-stat-value {
    margin-top:14px;
    font-size:35px;
    line-height:1;
    font-weight:800;
    letter-spacing:-1px;
    color:#f5f7fa;
}

.cxv-green {
    color:#20d99b;
}

.cxv-stat-label {
    margin-top:10px;
    color:#68758b;
    font-size:12px;
}


.cxv-section-title {
    margin:0 0 15px;
}

.cxv-section-title h2 {
    margin:0;
    font-size:20px;
    font-weight:800;
}

.cxv-section-title p {
    margin:5px 0 0;
    color:#6f7d94;
    font-size:13px;
}

.cxv-section-space {
    margin-top:34px;
}


.cxv-action-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:13px;
    margin-bottom:34px;
}

.cxv-action-card {
    display:flex;
    align-items:center;
    gap:13px;
    min-height:82px;
    padding:15px;
    border:1px solid #242a33;
    border-radius:13px;
    background:#0f1217;
    color:#eef2f7;
    text-decoration:none;
    transition:.18s ease;
}

.cxv-action-card:hover {
    border-color:#3b4555;
    background:#13171d;
    transform:translateY(-2px);
}

.cxv-action-icon {
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#191e26;
    color:#c8d1df;
    font-weight:800;
}

.cxv-action-card div:nth-child(2) {
    flex:1;
    min-width:0;
}

.cxv-action-card strong {
    display:block;
    font-size:13px;
}

.cxv-action-card span {
    display:block;
    margin-top:4px;
    color:#6e7b91;
    font-size:11px;
}

.cxv-action-card b {
    color:#66748a;
}


.cxv-panel {
    overflow:hidden;
    border:1px solid #242a33;
    border-radius:16px;
    background:#0f1217;
}

.cxv-panel-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:21px 23px;
    border-bottom:1px solid #20252d;
}

.cxv-panel-head h2 {
    margin:0;
    font-size:19px;
    font-weight:800;
}

.cxv-panel-head p {
    margin:5px 0 0;
    color:#6f7d94;
    font-size:12px;
}


.cxv-table-wrap {
    width:100%;
    overflow-x:auto;
}

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

.cxv-table th {
    padding:15px 20px;
    text-align:left;
    border-bottom:1px solid #222831;
    color:#76849b;
    font-size:11px;
    letter-spacing:.6px;
    font-weight:800;
}

.cxv-table td {
    padding:17px 20px;
    border-bottom:1px solid #1d222a;
    color:#e8edf4;
    font-size:13px;
}

.cxv-table tbody tr:last-child td {
    border-bottom:0;
}

.cxv-table tbody tr:hover {
    background:#12161c;
}

.cxv-mono {
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
    letter-spacing:.1px;
}

.cxv-muted {
    color:#69768b !important;
}

.cxv-action-badge {
    display:inline-flex;
    align-items:center;
    min-height:27px;
    padding:0 9px;
    border-radius:7px;
    background:#191e26;
    border:1px solid #252c36;
    color:#c7d0de;
    font-size:11px;
    font-weight:700;
}


.cxv-info-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:13px;
}

.cxv-info-card {
    padding:17px;
    border:1px solid #242a33;
    border-radius:13px;
    background:#0f1217;
}

.cxv-info-card span {
    display:block;
    color:#6f7c91;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.5px;
    font-weight:700;
}

.cxv-info-card strong {
    display:block;
    margin-top:8px;
    color:#edf1f6;
    font-size:14px;
}

.cxv-info-card strong:first-letter {
    color:#20d99b;
}


.cxv-empty {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:150px;
    color:#78859a;
    text-align:center;
}

.cxv-empty-icon {
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#181d24;
    margin-bottom:10px;
    font-size:18px;
}

.cxv-empty strong {
    color:#dfe5ed;
    font-size:13px;
}

.cxv-empty span {
    margin-top:5px;
    font-size:11px;
}


@media (max-width:1100px) {

    .cxv-stat-grid,
    .cxv-action-grid,
    .cxv-info-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

}

@media (max-width:700px) {

    .cxv-page-head {
        flex-direction:column;
    }

    .cxv-page-head h1 {
        font-size:29px;
    }

    .cxv-stat-grid,
    .cxv-action-grid,
    .cxv-info-grid {
        grid-template-columns:1fr;
    }

    .cxv-panel-head {
        align-items:flex-start;
        flex-direction:column;
    }

}

