@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/poppins-300-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-500-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/poppins-600-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --navy-950: #0b1220;
    --navy-900: #101827;
    --ink: #172033;
    --muted: #667085;
    --line: #e3e8ef;
    --line-strong: #cbd5e1;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --surface: #ffffff;
    --canvas: #f7f9fc;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #92400e;
    --warning-soft: #fef3c7;
    --danger: #b42318;
    --danger-soft: #fee4e2;
    --purple: #6941c6;
    --purple-soft: #ebe9fe;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(16, 24, 40, .06);
    --sidebar: 244px;
    --topbar: 68px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font: 300 14px/1.45 Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(1.55rem, 3vw, 1.9rem); line-height: 1.2; letter-spacing: -.025em; }
h2 { margin-bottom: 5px; font-size: 1.08rem; }
h3 { margin-bottom: 5px; font-size: .95rem; }
.muted { color: var(--muted); }
.small { font-size: .78rem; }
.nowrap { white-space: nowrap; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    grid-template-rows: var(--topbar) minmax(0, 1fr);
}
.topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    grid-column: 1 / -1;
    height: var(--topbar);
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 22px;
    color: #fff;
    background: var(--navy-950);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { min-width: 270px; display: flex; align-items: center; gap: 11px; color: #fff; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; padding: 3px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-copy strong { display: block; font-size: .76rem; letter-spacing: .055em; }
.brand-copy span { display: block; margin-top: 1px; color: #aeb8c8; font-size: .68rem; }
.top-search { flex: 1; max-width: 520px; margin: 0 auto; position: relative; }
.top-search input { width: 100%; height: 40px; padding: 0 14px 0 39px; color: #fff; background: #151f30; border: 1px solid #2a3547; border-radius: 10px; outline: none; }
.top-search input::placeholder { color: #8c98aa; }
.top-search input:focus { border-color: #7185ff; box-shadow: 0 0 0 3px rgba(113, 133, 255, .15); }
.top-search svg { position: absolute; left: 13px; top: 12px; color: #8c98aa; }
.top-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-user-copy strong, .top-user-copy span { display: block; }
.top-user-copy strong { font-size: .78rem; }
.top-user-copy span { color: #aeb8c8; font-size: .66rem; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #26334a; font-size: .72rem; font-weight: 850; }
.mobile-nav { display: none; width: 38px; height: 38px; place-items: center; padding: 0; border: 0; border-radius: 9px; color: #fff; background: #182336; }

.sidebar {
    position: sticky;
    top: var(--topbar);
    height: calc(100vh - var(--topbar));
    display: flex;
    flex-direction: column;
    padding: 21px 13px;
    background: var(--surface);
    border-right: 1px solid var(--line);
}
.nav-label { padding: 0 11px 8px; color: #7b879a; font-size: .64rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 9px; color: #3e4b63; font-weight: 700; }
.nav-link:hover { color: var(--ink); background: #f2f5f9; }
.nav-link.active { color: var(--primary-dark); background: var(--primary-soft); }
.nav-count { min-width: 21px; height: 21px; display: grid; place-items: center; margin-left: auto; padding: 0 5px; border-radius: 999px; color: var(--muted); background: #f2f5f9; font-size: .64rem; }
.sidebar-footer { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.service-card { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.service-title { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 800; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.service-card p { margin: 8px 0 0; font-size: .68rem; color: var(--muted); }

.main { min-width: 0; padding: 30px; }
.content { max-width: 1380px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.eyebrow { margin-bottom: 6px; color: var(--primary-dark); font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.page-subtitle { margin: 0; color: var(--muted); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

.btn { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; font-weight: 800; white-space: nowrap; }
.btn:focus-visible, .module-switch:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37, 99, 235, .2); outline-offset: 2px; }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: #253047; background: #fff; border-color: var(--line-strong); }
.btn-secondary:hover { background: #f8fafc; }
.btn-ghost { color: #3e4b63; background: transparent; }
.btn-ghost:hover { background: #f2f5f9; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-sm { min-height: 33px; padding: 0 11px; font-size: .76rem; }
.btn-link { min-height: 34px; padding: 0 8px; color: #fff; background: transparent; }
.btn:disabled { cursor: not-allowed; opacity: .5; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 19px; border-bottom: 1px solid var(--line); }
.card-body { padding: 19px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { min-height: 116px; padding: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-label { color: var(--muted); font-size: .76rem; font-weight: 700; }
.stat-value { margin-top: 8px; font-size: 1.75rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.stat-meta { margin-top: 9px; color: #7b879a; font-size: .68rem; }
.stat-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; color: var(--primary-dark); background: var(--primary-soft); }
.stat-icon.success { color: var(--success); background: #effbf4; }
.stat-icon.warning { color: var(--warning); background: #fff8e8; }
.stat-icon.danger { color: var(--danger); background: #fff3f2; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); }
.filter-form { flex: 1; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.form-control { min-height: 40px; padding: 0 11px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; }
textarea.form-control { min-height: 92px; padding: 10px 11px; resize: vertical; }
.search-control { min-width: min(270px, 100%); flex: 1; }
.select-control { min-width: 145px; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field label { color: #344054; font-size: .78rem; font-weight: 800; }
.field-help { color: #7b879a; font-size: .7rem; }
.required { color: var(--danger); }

.systems-table { width: 100%; border-collapse: collapse; }
.systems-table th, .systems-table td { padding: 14px 17px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.systems-table th { color: #7b879a; background: #fafbfc; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.systems-table tbody tr:last-child td { border-bottom: 0; }
.systems-table tbody tr:hover { background: #fafbfc; }
.system-identity { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.system-mark { width: 41px; height: 41px; flex: 0 0 41px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--navy-900); font-size: .78rem; font-weight: 900; }
.system-name { display: block; font-weight: 850; }
.system-domain { display: block; margin-top: 2px; color: var(--muted); font-size: .74rem; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: .85rem; }
.metric span { margin-top: 2px; color: #7b879a; font-size: .68rem; }
.empty { padding: 45px 20px; text-align: center; }

.pill { min-height: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 999px; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { color: #137a43; background: var(--success-soft); }
.pill-warning { color: var(--warning); background: var(--warning-soft); }
.pill-danger { color: var(--danger); background: var(--danger-soft); }
.pill-info { color: var(--primary-dark); background: #dbeafe; }
.pill-neutral { color: #475467; background: #f2f4f7; }
.pill-purple { color: var(--purple); background: var(--purple-soft); }
.tag { min-height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; color: #475467; background: #f2f4f7; font-size: .65rem; font-weight: 800; }
.tag-blue { color: var(--primary-dark); background: #dbeafe; }
.tag-purple { color: var(--purple); background: var(--purple-soft); }
.tag-green { color: var(--success); background: var(--success-soft); }
.tag-amber { color: var(--warning); background: var(--warning-soft); }

.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid; border-radius: 11px; }
.alert-success { color: #166534; background: #ecfdf3; border-color: #bbf7d0; }
.alert-danger { color: #991b1b; background: #fef3f2; border-color: #fecaca; }
.alert-warning { color: #78350f; background: #fffbeb; border-color: #fde68a; }
.secret-box { display: grid; gap: 8px; }
.secret-box code { padding: 5px 7px; border-radius: 6px; color: #3f2b0a; background: rgba(255, 255, 255, .65); overflow-wrap: anywhere; }

.detail-hero { padding: 20px; margin-bottom: 15px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.detail-identity .system-mark { width: 52px; height: 52px; flex-basis: 52px; font-size: 1rem; }
.detail-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-title h1 { margin: 0; font-size: 1.45rem; }
.detail-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-stat { min-width: 0; padding-right: 12px; border-right: 1px solid var(--line); }
.detail-stat:last-child { border-right: 0; }
.detail-stat span { display: block; color: #7b879a; font-size: .62rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.detail-stat strong { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 15px; align-items: start; }
.side-stack { display: grid; gap: 15px; }

.plan-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.plan-bar .field { flex: 1; min-width: 190px; margin: 0; }
.module-groups { display: grid; gap: 15px; }
.module-table-wrap { overflow-x: auto; }
.module-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.module-table th, .module-table td { padding: 12px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.module-table th { color: #7b879a; background: #fafbfc; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.module-table tr:last-child td { border-bottom: 0; }
.module-name strong, .module-name span { display: block; }
.module-name strong { font-size: .8rem; }
.module-name span { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }
.state-on { color: var(--success); }
.state-on::before { background: var(--success); }
.state-off { color: var(--muted); }
.state-pending { color: var(--warning); }
.state-pending::before { background: #f59e0b; }
.module-switch { width: 42px; height: 24px; display: inline-flex; align-items: center; padding: 2px; border: 0; border-radius: 999px; background: #cbd5e1; }
.module-switch span { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .2); transition: transform .18s ease; }
.module-switch.on { background: var(--primary); }
.module-switch.on span { transform: translateX(18px); }
.module-switch:disabled { cursor: not-allowed; opacity: .45; }

.info-list { display: grid; gap: 11px; }
.info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.info-row span { color: #7b879a; font-size: .7rem; }
.info-row strong { max-width: 180px; text-align: right; overflow-wrap: anywhere; font-size: .7rem; }
.activity-list { display: grid; }
.activity-item { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; padding-bottom: 15px; }
.activity-item:last-child { padding-bottom: 0; }
.activity-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 12px; bottom: 2px; width: 1px; background: var(--line); }
.activity-dot { z-index: 1; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.activity-item strong { display: block; font-size: .72rem; }
.activity-item p, .activity-item time { display: block; margin: 2px 0 0; color: var(--muted); font-size: .66rem; }

.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.plan-card { position: relative; padding: 18px; overflow: hidden; }
.plan-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.plan-card.purple::before { background: var(--purple); }
.plan-card.green::before { background: var(--success); }
.plan-card.amber::before { background: #d97706; }
.plan-card h2 { margin-bottom: 7px; }
.plan-card p { min-height: 42px; color: var(--muted); font-size: .72rem; }
.plan-card ul { margin: 13px 0 0; padding-left: 18px; color: #475467; font-size: .7rem; }
.plan-card li + li { margin-top: 4px; }
.plan-radio { display: block; cursor: pointer; }
.plan-radio input { position: absolute; opacity: 0; pointer-events: none; }
.plan-radio .plan-card { height: 100%; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.plan-radio:hover .plan-card { transform: translateY(-1px); box-shadow: var(--shadow); }
.plan-radio input:checked + .plan-card { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.comparison { overflow-x: auto; }
.comparison table { width: 100%; min-width: 760px; border-collapse: collapse; }
.comparison th, .comparison td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: center; }
.comparison th:first-child, .comparison td:first-child { text-align: left; }
.comparison th { color: #7b879a; background: #fafbfc; font-size: .66rem; }
.check { color: var(--success); font-weight: 900; }
.dash { color: #cbd5e1; }

.activity-table { width: 100%; border-collapse: collapse; }
.activity-table th, .activity-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.activity-table th { color: #7b879a; background: #fafbfc; font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; }
.activity-table tr:last-child td { border-bottom: 0; }
.event-title { font-weight: 800; }
.event-detail { margin-top: 3px; color: var(--muted); font-size: .7rem; }

.form-card { max-width: 980px; padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 15px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.login-shell {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 30px 20px;
    color: #fff;
    background: #080710;
    font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.login-shell::before, .login-shell::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
}
.login-shell::before {
    left: calc(50% - 295px);
    top: calc(50% - 340px);
    background: linear-gradient(#1845ad, #23a2f6);
}
.login-shell::after {
    left: calc(50% + 45px);
    top: calc(50% + 140px);
    background: linear-gradient(to right, #ff512f, #f09819);
}
.login-shell .login-card {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    padding: 42px 35px;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    border: 2px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(8, 7, 16, .6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.login-shell .login-logo {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin: 0 auto 18px;
    padding: 5px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 15px;
    box-shadow: 0 8px 22px rgba(8, 7, 16, .24);
}
.login-shell .login-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-shell h1 {
    margin-bottom: 7px;
    color: #fff;
    font-size: clamp(1.7rem, 7vw, 2rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .01em;
    text-align: center;
}
.login-shell .muted {
    margin-bottom: 26px;
    color: #e5e5e5;
    text-align: center;
}
.login-shell .field {
    gap: 8px;
    margin-bottom: 20px;
}
.login-shell .field label {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}
.login-shell .form-control {
    width: 100%;
    min-height: 50px;
    padding: 0 12px;
    color: #fff;
    caret-color: #fff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 4px;
    font-size: .875rem;
    font-weight: 300;
}
.login-shell .form-control:focus {
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 0 0 3px rgba(35, 162, 246, .22);
}
.login-shell .form-control:-webkit-autofill,
.login-shell .form-control:-webkit-autofill:hover,
.login-shell .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 1000px #22212a inset;
    transition: background-color 9999s ease-out;
}
.login-shell .btn-primary {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    padding: 15px 0;
    color: #080710;
    background: #fff;
    border: 0;
    border-radius: 5px;
    font-size: 1.125rem;
    font-weight: 600;
}
.login-shell .btn-primary:hover { color: #080710; background: #f1f1f3; }
.login-shell .btn-primary:focus-visible {
    outline-color: rgba(255, 255, 255, .7);
    box-shadow: 0 0 0 4px rgba(35, 162, 246, .28);
}
.login-shell .alert-danger {
    color: #fff;
    background: rgba(180, 35, 24, .42);
    border-color: rgba(254, 202, 202, .48);
}

/* Glassmorphism theme for the authenticated control panel. */
.app-shell {
    --navy-950: #080710;
    --navy-900: #12111c;
    --ink: #fff;
    --muted: #c3c8d4;
    --line: rgba(255, 255, 255, .12);
    --line-strong: rgba(255, 255, 255, .23);
    --primary: #23a2f6;
    --primary-dark: #4ab5fb;
    --primary-soft: rgba(35, 162, 246, .16);
    --surface: rgba(255, 255, 255, .1);
    --canvas: #080710;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, .16);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .16);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, .16);
    --purple: #c4b5fd;
    --purple-soft: rgba(196, 181, 253, .16);
    --shadow: 0 0 40px rgba(8, 7, 16, .48);
    position: relative;
    isolation: isolate;
    color: var(--ink);
    color-scheme: dark;
    background: #080710;
    font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.app-shell::before, .app-shell::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}
.app-shell::before {
    width: 360px;
    height: 360px;
    left: 12%;
    top: 88px;
    background: linear-gradient(#1845ad, #23a2f6);
}
.app-shell::after {
    width: 420px;
    height: 420px;
    right: -110px;
    bottom: -140px;
    background: linear-gradient(to right, #ff512f, #f09819);
}
.app-shell > .topbar { z-index: 40; }
.app-shell > .sidebar { z-index: 35; }
.app-shell > .main { z-index: 1; }
.app-shell .topbar {
    background: rgba(8, 7, 16, .76);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 8px 30px rgba(8, 7, 16, .28);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.app-shell .brand-copy span, .app-shell .top-user-copy span { color: #c3c8d4; }
.app-shell .top-search input {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .14);
}
.app-shell .top-search input::placeholder { color: #aeb4c2; }
.app-shell .top-search input:focus {
    border-color: rgba(35, 162, 246, .72);
    box-shadow: 0 0 0 3px rgba(35, 162, 246, .18);
}
.app-shell .top-search svg { color: #c3c8d4; }
.app-shell .avatar, .app-shell .mobile-nav { background: rgba(255, 255, 255, .13); }
.app-shell .sidebar {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.app-shell .nav-label { color: #aeb4c2; }
.app-shell .nav-link { color: #d7dbe4; }
.app-shell .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.app-shell .nav-link.active {
    color: #fff;
    background: rgba(35, 162, 246, .22);
    box-shadow: inset 0 0 0 1px rgba(35, 162, 246, .22);
}
.app-shell .nav-count { color: #e5e7eb; background: rgba(255, 255, 255, .12); }
.app-shell .sidebar-footer { border-color: rgba(255, 255, 255, .12); }
.app-shell .service-card {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .12);
}
.app-shell .service-card p { color: #b7bdca; }
.app-shell .main { position: relative; background: transparent; }
.app-shell .content { position: relative; }
.app-shell .page-subtitle, .app-shell .stat-label, .app-shell .stat-meta,
.app-shell .system-domain, .app-shell .metric span, .app-shell .field-help,
.app-shell .module-name span, .app-shell .info-row span,
.app-shell .activity-item p, .app-shell .activity-item time,
.app-shell .event-detail { color: var(--muted); }
.app-shell .eyebrow { color: #67c1ff; }
.app-shell .btn:focus-visible, .app-shell .module-switch:focus-visible,
.app-shell input:focus-visible, .app-shell select:focus-visible,
.app-shell textarea:focus-visible { outline-color: rgba(35, 162, 246, .42); }
.app-shell .btn-primary {
    color: #080710;
    background: #fff;
    border-color: #fff;
}
.app-shell .btn-primary:hover { color: #080710; background: #ececf0; }
.app-shell .btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .2);
}
.app-shell .btn-secondary:hover, .app-shell .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.app-shell .btn-ghost { color: #e5e7eb; background: transparent; }
.app-shell .btn-danger { color: #fff; background: #be2940; }
.app-shell .card {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.app-shell .card-header, .app-shell .toolbar, .app-shell .form-actions,
.app-shell .detail-stats, .app-shell .activity-item:not(:last-child)::after {
    border-color: rgba(255, 255, 255, .12);
}
.app-shell .stat-icon { color: #6cc5ff; background: rgba(35, 162, 246, .16); }
.app-shell .stat-icon.success { color: var(--success); background: var(--success-soft); }
.app-shell .stat-icon.warning { color: var(--warning); background: var(--warning-soft); }
.app-shell .stat-icon.danger { color: var(--danger); background: var(--danger-soft); }
.app-shell .form-control {
    color: #fff;
    caret-color: #fff;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .2);
}
.app-shell .form-control::placeholder { color: #aeb4c2; }
.app-shell .form-control:focus {
    border-color: rgba(35, 162, 246, .72);
    box-shadow: 0 0 0 3px rgba(35, 162, 246, .18);
}
.app-shell .form-control option { color: #fff; background: #171620; }
.app-shell .form-control:-webkit-autofill,
.app-shell .form-control:-webkit-autofill:hover,
.app-shell .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 1000px #22212a inset;
}
.app-shell .field label { color: #f4f4f5; }
.app-shell .systems-table th, .app-shell .module-table th,
.app-shell .comparison th, .app-shell .activity-table th {
    color: #c3c8d4;
    background: rgba(255, 255, 255, .07);
}
.app-shell .systems-table th, .app-shell .systems-table td,
.app-shell .module-table th, .app-shell .module-table td,
.app-shell .comparison th, .app-shell .comparison td,
.app-shell .activity-table th, .app-shell .activity-table td {
    border-color: rgba(255, 255, 255, .11);
}
.app-shell .systems-table tbody tr:hover { background: rgba(255, 255, 255, .07); }
.app-shell .systems-table td[data-label]::before { color: #aeb4c2; }
.app-shell .system-mark { background: linear-gradient(145deg, #1845ad, #23a2f6); }
.app-shell .pill-success { color: #86efac; background: rgba(74, 222, 128, .16); }
.app-shell .pill-warning { color: #fde68a; background: rgba(251, 191, 36, .16); }
.app-shell .pill-danger { color: #fda4af; background: rgba(251, 113, 133, .16); }
.app-shell .pill-info { color: #8bd0ff; background: rgba(35, 162, 246, .17); }
.app-shell .pill-neutral { color: #d1d5db; background: rgba(255, 255, 255, .11); }
.app-shell .pill-purple { color: #ddd6fe; background: rgba(196, 181, 253, .16); }
.app-shell .tag { color: #d7dbe4; background: rgba(255, 255, 255, .11); }
.app-shell .tag-blue { color: #8bd0ff; background: rgba(35, 162, 246, .17); }
.app-shell .tag-purple { color: #ddd6fe; background: rgba(196, 181, 253, .16); }
.app-shell .tag-green { color: #86efac; background: rgba(74, 222, 128, .16); }
.app-shell .tag-amber { color: #fde68a; background: rgba(251, 191, 36, .16); }
.app-shell .alert-success { color: #dcfce7; background: rgba(21, 128, 61, .3); border-color: rgba(134, 239, 172, .3); }
.app-shell .alert-danger { color: #ffe4e6; background: rgba(190, 41, 64, .3); border-color: rgba(253, 164, 175, .3); }
.app-shell .alert-warning { color: #fef3c7; background: rgba(146, 64, 14, .32); border-color: rgba(253, 230, 138, .3); }
.app-shell .secret-box code { color: #fff0c7; background: rgba(8, 7, 16, .38); }
.app-shell .detail-stat { border-color: rgba(255, 255, 255, .12); }
.app-shell .detail-stat span { color: #aeb4c2; }
.app-shell .module-switch { background: rgba(255, 255, 255, .24); }
.app-shell .module-switch.on { background: var(--primary); }
.app-shell .state-off { color: #b7bdca; }
.app-shell .activity-dot { box-shadow: 0 0 0 3px rgba(35, 162, 246, .18); }
.app-shell .plan-card p, .app-shell .plan-card ul { color: #cbd0dc; }
.app-shell .plan-radio input:checked + .plan-card {
    border-color: rgba(35, 162, 246, .72);
    box-shadow: 0 0 0 3px rgba(35, 162, 246, .18), var(--shadow);
}
.app-shell .dash { color: rgba(255, 255, 255, .28); }

@media (max-width: 1180px) {
    .stats-grid, .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-layout { grid-template-columns: 1fr; }
    .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 35; left: 0; top: var(--topbar); width: min(290px, 86vw); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 14px 0 36px rgba(15, 23, 42, .14); }
    .sidebar.open { transform: translateX(0); }
    .mobile-nav { display: grid; }
    .main { grid-column: 1; padding: 23px; }
    .brand { min-width: auto; }
    .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .topbar { padding: 0 13px; gap: 10px; }
    .top-search, .top-user-copy { display: none; }
    .main { padding: 17px 13px 27px; }
    .page-head, .detail-top { flex-direction: column; align-items: stretch; }
    .header-actions { justify-content: flex-start; }
    .stats-grid, .plans-grid, .side-stack, .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .toolbar, .filter-form { align-items: stretch; flex-direction: column; }
    .filter-form .form-control, .filter-form .btn { width: 100%; }
    .systems-table thead { display: none; }
    .systems-table, .systems-table tbody, .systems-table tr, .systems-table td { display: block; width: 100%; }
    .systems-table tr { padding: 14px; border-bottom: 1px solid var(--line); }
    .systems-table td { padding: 5px 0; border: 0; }
    .systems-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 110px; color: #7b879a; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
    .detail-stats { grid-template-columns: 1fr 1fr; }
    .detail-stat:nth-child(2) { border-right: 0; }
    .plan-bar { align-items: stretch; flex-direction: column; }
    .plan-bar .field, .plan-bar .btn { width: 100%; }
}
@media (max-width: 480px) {
    .login-shell { padding: 20px 14px; }
    .login-shell .login-card { padding: 32px 22px; }
    .login-shell::before { left: -95px; top: -65px; }
    .login-shell::after { left: auto; right: -85px; top: auto; bottom: -70px; }
    .brand-copy span { display: none; }
    .detail-identity { align-items: flex-start; }
    .detail-stats { grid-template-columns: 1fr; }
    .detail-stat { padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .detail-stat:last-child { border-bottom: 0; }
}
