:root {
    --navy-950: #0d1729;
    --navy-900: #111d32;
    --navy-800: #192740;
    --ink: #0b1830;
    --muted: #73819a;
    --muted-2: #9ba7bc;
    --line: #dde3ec;
    --line-soft: #ebeff5;
    --surface: #ffffff;
    --page: #f4f6f9;
    --accent: #f86e47;
    --accent-dark: #e75834;
    --accent-soft: #fff0eb;
    --green: #13b981;
    --green-soft: #e8f8f2;
    --amber: #d48b08;
    --amber-soft: #fff6df;
    --red: #d9425f;
    --red-soft: #ffedf1;
    --blue: #4169e1;
    --blue-soft: #edf2ff;
    --shadow-sm: 0 1px 2px rgba(15, 31, 55, .04), 0 6px 18px rgba(15, 31, 55, .05);
    --shadow-lg: 0 22px 60px rgba(15, 31, 55, .15);
    --radius: 16px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: 270px;
    flex-direction: column;
    color: #b8c9e8;
    background:
        radial-gradient(circle at 20% 0, rgba(70, 98, 151, .2), transparent 35%),
        var(--navy-950);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 82px;
    padding: 0 24px;
    color: white;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: linear-gradient(145deg, #ff835d, #f05c38);
    box-shadow: 0 10px 24px rgba(248, 110, 71, .27);
    font-size: 18px;
    font-weight: 800;
}

.brand strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 1px; color: #8fa7ce; font-size: 9px; font-weight: 700; letter-spacing: .17em; }

.sidebar-nav { flex: 1; padding: 18px; overflow-y: auto; }
.nav-label { margin: 11px 12px 12px; color: #667ca2; font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 27px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 49px;
    margin: 2px 0;
    padding: 0 16px;
    border-left: 3px solid transparent;
    border-radius: 12px;
    color: #a8bfe2;
    font-weight: 600;
    transition: .18s ease;
}
.nav-link:hover { color: white; background: rgba(255, 255, 255, .045); }
.nav-link.active {
    color: white;
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(248, 110, 71, .18), rgba(248, 110, 71, .08));
}
.nav-icon { display: grid; width: 21px; place-items: center; color: #88a4d4; font-size: 17px; }
.nav-link.active .nav-icon { color: var(--accent); }

.sidebar-bottom { padding: 0 20px 20px; }
.api-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(151, 172, 208, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}
.status-dot {
    width: 9px;
    height: 9px;
    flex: none;
    margin-top: 5px;
    border-radius: 50%;
    background: #43dd9f;
    box-shadow: 0 0 0 4px rgba(67, 221, 159, .11);
}
.api-status strong, .sidebar-user strong { display: block; color: white; font-size: 12px; }
.api-status small { display: block; max-width: 165px; margin-top: 2px; overflow: hidden; color: #7187ac; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(151, 172, 208, .12);
}
.sidebar-user small { color: #7187ac; font-size: 10px; text-transform: capitalize; }

.avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    color: white;
    background: #526485;
    font-size: 10px;
    font-weight: 800;
}
.avatar-light { border-color: var(--line); color: var(--ink); background: #f1f4f8; }

.main-column { min-height: 100vh; margin-left: 270px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
}
.breadcrumbs { display: flex; align-items: center; gap: 12px; color: #8a96aa; font-size: 12px; }
.breadcrumbs b { color: #ccd2dc; }
.breadcrumbs strong { color: #65728a; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.access-pill {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #66738b;
    background: white;
    font-size: 10px;
    font-weight: 700;
}
.mobile-menu { display: none !important; }

.page-content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 38px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.page-heading h1 { margin: 0; color: var(--ink); font-size: clamp(27px, 3vw, 38px); line-height: 1.12; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: white;
    background: var(--accent);
    box-shadow: 0 9px 20px rgba(248, 110, 71, .19);
    font-size: 12px;
    font-weight: 750;
    transition: .16s ease;
}
.button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button-secondary { border-color: var(--line); color: #536078; background: white; box-shadow: none; }
.button-secondary:hover { color: var(--ink); background: #f8fafc; }
.button-danger { color: var(--red); border-color: #f3cbd3; background: white; box-shadow: none; }
.button-danger:hover { color: white; background: var(--red); }
.button-small { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 11px; }
.button-block { width: 100%; }
.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #647189;
    background: white;
}
.icon-button:hover { color: var(--ink); background: #f5f7fa; }
.icon-button-dark { width: 30px; height: 30px; border: 0; color: #7e92b5; background: transparent; }

.alert {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.alert > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; font-weight: 800; }
.alert strong { display: block; font-size: 12px; }
.alert p { margin: 1px 0 0; font-size: 11px; }
.alert button { border: 0; color: inherit; background: transparent; font-size: 21px; }
.alert-success { border-color: #cbeede; color: #147654; background: #f2fbf7; }
.alert-success > span { background: #dcf6eb; }
.alert-error { border-color: #f3cbd4; color: #a62c47; background: #fff5f7; }
.alert-error > span { background: #ffe3e9; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--line-soft); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card { display: flex; min-height: 125px; align-items: center; gap: 17px; padding: 22px; }
.stat-icon { display: grid; width: 45px; height: 45px; flex: none; place-items: center; border-radius: 13px; font-size: 19px; }
.stat-icon.orange { color: var(--accent); background: var(--accent-soft); }
.stat-icon.green { color: #079d6d; background: var(--green-soft); }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-card p { margin: 0; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin: 1px 0; color: var(--ink); font-size: 27px; line-height: 1.1; }
.stat-card small { color: #96a2b5; font-size: 9px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .9fr); gap: 18px; margin-bottom: 18px; }
.section-kicker { margin: 0 0 7px; color: #93a1b7; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.chart-card .card-body { padding: 22px 24px 18px; }
.traffic-total { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 18px; }
.traffic-total strong { font-size: 30px; letter-spacing: -.04em; }
.traffic-total span { color: var(--green); font-size: 10px; font-weight: 700; }
.bar-chart { display: grid; height: 190px; grid-template-columns: repeat(12, minmax(18px, 1fr)); align-items: end; gap: 8px; padding-top: 20px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 52px, #eef1f5 53px); }
.bar-item { display: flex; height: 100%; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar {
    width: 100%;
    max-width: 52px;
    min-height: 5px;
    border-radius: 5px 5px 0 0;
    background: #d7dde7;
    transition: .18s ease;
}
.bar-item:last-child .bar { background: var(--accent); }
.bar:hover { filter: brightness(.94); }
.bar-item small { color: #8e9aae; font-size: 8px; }
.range-pill { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #6d7890; font-size: 9px; font-weight: 700; }

.activity-list { padding: 10px 24px 16px; }
.activity-item { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; }
.activity-item:not(:last-child)::after { position: absolute; top: 38px; bottom: -8px; left: 14px; width: 1px; content: ""; background: var(--line); }
.activity-symbol { z-index: 1; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: white; font-size: 11px; }
.activity-item strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item small { color: #93a0b3; font-size: 9px; }
.live-label { display: flex; align-items: center; gap: 6px; color: #0da977; font-size: 9px; font-weight: 700; }
.live-label::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: #29ce91; box-shadow: 0 0 0 3px #e0f8ef; }

.table-card { overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 12px 18px;
    color: #8190a8;
    background: #fafbfd;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table td { padding: 14px 18px; border-top: 1px solid var(--line-soft); color: #59667e; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fcfdff; }
.entity { display: flex; min-width: 170px; align-items: center; gap: 10px; }
.entity-mark { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 9px; color: #56657e; background: #eef2f7; font-size: 9px; font-weight: 800; }
.entity strong, .domain-cell strong { display: block; color: var(--ink); font-size: 10px; }
.entity small, .domain-cell small { display: block; margin-top: 2px; color: #95a1b4; font-size: 9px; }
.domain-cell strong::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; content: ""; background: #6ed1aa; box-shadow: 0 0 0 3px #e9f8f2; }
.key-code, code.inline-code {
    display: inline-flex;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: #61708b;
    background: #f7f9fb;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    white-space: nowrap;
}
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.text-link { color: var(--accent); font-size: 10px; font-weight: 750; }
.text-link:hover { color: var(--accent-dark); }
.empty-state { padding: 55px 25px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 12px; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: 22px; }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0 0 17px; font-size: 11px; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-badge span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active { color: #078a61; background: var(--green-soft); }
.status-suspended { color: var(--amber); background: var(--amber-soft); }
.status-expired, .status-revoked, .status-disabled { color: var(--red); background: var(--red-soft); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.filters { display: flex; min-width: 0; align-items: center; gap: 9px; flex-wrap: wrap; }
.search-box { position: relative; min-width: 250px; }
.search-box::before { position: absolute; top: 50%; left: 13px; content: "⌕"; color: #98a4b6; transform: translateY(-50%); }
.search-box input { width: 100%; height: 38px; padding: 0 13px 0 35px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: white; font-size: 11px; }
.search-box input:focus { border-color: #9cb0d0; box-shadow: 0 0 0 3px #edf2f8; }
.filter-select { height: 38px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 9px; color: #647189; outline: none; background: white; font-size: 10px; }

.form-card { max-width: 980px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { display: block; margin: 0 0 7px; color: #283750; font-size: 10px; font-weight: 750; }
.required::after { margin-left: 3px; color: var(--accent); content: "*"; }
.input, .select, .textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #d5dce7;
    border-radius: 9px;
    color: var(--ink);
    outline: none;
    background: white;
    font-size: 11px;
    transition: .15s ease;
}
.textarea { min-height: 96px; padding-top: 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(248, 110, 71, .1); }
.input::placeholder, .textarea::placeholder { color: #9ba6b7; }
.input[readonly] { color: #66738b; background: #f7f9fb; }
.field-hint { display: block; margin-top: 6px; color: #8d9ab0; font-size: 9px; }
.field-error { display: block; margin-top: 6px; color: var(--red); font-size: 9px; }
.is-disabled { opacity: .52; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.checkbox-row label { margin: 0; color: #59667d; font-size: 10px; }
.form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-heading { margin: 0 0 15px; }
.form-section-heading h3 { margin: 0; font-size: 13px; }
.form-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: #f0f2f6;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: grid; min-height: 38px; margin: 0; place-items: center; border-radius: 8px; color: #66738c; font-size: 9px; font-weight: 650; cursor: pointer; }
.segmented input:checked + label { color: var(--accent-dark); background: white; box-shadow: 0 2px 8px rgba(25, 39, 64, .08); }
.footer-box { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.footer-box .form-grid { margin-top: 15px; }
.info-strip { margin-top: 10px; padding: 9px 12px; border-radius: 8px; color: #738096; background: #f5f7fa; font-size: 9px; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card { padding: 21px; }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.project-card h3 { margin: 13px 0 4px; font-size: 16px; }
.project-card p { min-height: 40px; margin: 0; color: var(--muted); font-size: 10px; }
.project-code { display: inline-flex; padding: 6px 8px; border-radius: 7px; color: var(--accent-dark); background: var(--accent-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.project-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.project-metric { padding: 13px 4px; text-align: center; }
.project-metric:not(:last-child) { border-right: 1px solid var(--line-soft); }
.project-metric strong { display: block; font-size: 15px; }
.project-metric small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.project-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.permission-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.permission-option input { width: 16px; height: 16px; accent-color: var(--accent); }
.permission-option strong { display: block; font-size: 10px; }
.permission-option small { display: block; color: var(--muted); font-size: 8px; }
.project-assignment { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.project-assignment:last-child { border-bottom: 0; }
.project-assignment input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.project-assignment strong { display: block; font-size: 10px; }
.project-assignment small { color: var(--muted); font-size: 8px; }

.details-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.detail-item span { display: block; margin-bottom: 5px; color: #8a97ab; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.detail-item strong { display: block; color: var(--ink); font-size: 11px; }
.licence-key-panel { padding: 18px; border: 1px dashed #cbd4e1; border-radius: 12px; background: #f8fafc; }
.key-row { display: flex; align-items: center; gap: 9px; }
.key-row .input { min-width: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.notice { padding: 14px; border-radius: 11px; color: #68758c; background: #f5f7fa; font-size: 10px; }
.notice strong { display: block; margin-bottom: 3px; color: var(--ink); }

dialog {
    width: min(840px, calc(100vw - 32px));
    max-height: calc(100vh - 24px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(9, 18, 31, .58); backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 26px 19px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.03em; }
.dialog-content { max-height: calc(100vh - 165px); padding: 22px 26px; overflow-y: auto; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 26px; border-top: 1px solid var(--line); background: #fbfcfd; }

.pagination { display: flex; justify-content: flex-end; gap: 5px; padding: 16px 18px; border-top: 1px solid var(--line-soft); }
.page-link { display: grid; min-width: 32px; height: 32px; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: #637087; background: white; font-size: 10px; }
.page-link.active { border-color: var(--accent); color: white; background: var(--accent); }
.page-link.disabled { color: #b3bdcb; background: #f8fafc; }

.code-block { position: relative; margin: 0; padding: 18px; overflow-x: auto; border-radius: 12px; color: #d8e5f8; background: var(--navy-950); font: 11px/1.7 "SFMono-Regular", Consolas, monospace; white-space: pre; }
.docs-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
.docs-nav { align-self: start; padding: 12px; position: sticky; top: 84px; }
.docs-nav a { display: block; padding: 9px 10px; border-radius: 8px; color: #66738a; font-size: 10px; }
.docs-nav a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.docs-content { display: grid; gap: 18px; }
.docs-content h2 { margin: 0 0 8px; font-size: 18px; }
.docs-content p, .docs-content li { color: #67758c; font-size: 11px; }
.endpoint { display: inline-flex; gap: 8px; align-items: center; }
.method { padding: 4px 7px; border-radius: 6px; color: #087956; background: var(--green-soft); font-size: 9px; font-weight: 800; }

.guest-body { min-height: 100vh; background: #f5f7fa; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, 1fr) minmax(500px, 1.12fr); }
.login-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    padding: 34px clamp(38px, 5vw, 72px);
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 10% 85%, rgba(248, 110, 71, .16), transparent 27%),
        radial-gradient(circle at 94% 0, rgba(99, 128, 183, .18), transparent 33%),
        var(--navy-950);
}
.login-story::after {
    position: absolute;
    right: -280px;
    bottom: -340px;
    width: 540px;
    height: 540px;
    border: 1px solid rgba(143, 167, 206, .1);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 95px rgba(143, 167, 206, .025);
}
.login-brand { height: auto; padding: 0; }
.story-content { position: relative; z-index: 1; max-width: 650px; margin: auto 0; padding: 80px 0; }
.story-content .eyebrow::before { display: inline-block; width: 18px; height: 1px; margin: 0 10px 3px 0; content: ""; background: var(--accent); }
.story-content h1 { max-width: 610px; margin: 27px 0 18px; font-size: clamp(44px, 5vw, 72px); line-height: 1.01; letter-spacing: -.06em; }
.story-content h1 span { display: block; color: #ff7b54; }
.story-copy { max-width: 560px; color: #aac0e2; font-size: 15px; line-height: 1.8; }
.feature-list { display: grid; gap: 13px; margin: 34px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 11px; color: #bfd0e9; font-size: 12px; }
.feature-list li::before { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #47d8a1; background: rgba(71, 216, 161, .1); content: "✓"; font-size: 11px; font-weight: 800; }
.story-footer { position: relative; z-index: 1; color: #657c9f; font-size: 9px; }
.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 38px; background: radial-gradient(circle at 83% 10%, #fff0eb, transparent 25%), #f5f7fa; }
.login-card { width: min(460px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 25px 65px rgba(24, 40, 68, .11); }
.login-emblem { display: grid; width: 50px; height: 50px; margin: 0 auto 22px; place-items: center; border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-size: 19px; }
.login-card h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; text-align: center; }
.login-subtitle { margin: 6px 0 28px; color: var(--muted); font-size: 11px; text-align: center; }
.login-card .field { margin-bottom: 16px; }
.password-field { position: relative; }
.password-field .input { padding-right: 60px; }
.password-toggle { position: absolute; top: 0; right: 5px; height: 44px; padding: 0 9px; border: 0; color: #7f8da3; background: transparent; font-size: 9px; font-weight: 700; }
.login-meta { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 20px; }
.demo-box { margin-top: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; color: #758198; background: #f8fafc; font-size: 9px; line-height: 1.7; }
.demo-box strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 10px; }
.demo-box code { color: var(--accent-dark); font-family: "SFMono-Regular", Consolas, monospace; }
.secure-note { margin-top: 18px; color: #9aa6b7; font-size: 8px; text-align: center; }
.secure-note::before { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; content: ""; background: #36cf98; }

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .login-shell { grid-template-columns: 1fr 1fr; }
    .story-content h1 { font-size: 52px; }
}

@media (max-width: 980px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: none; background: rgba(9, 18, 31, .52); }
    .sidebar-open .sidebar-backdrop { display: block; }
    .main-column { margin-left: 0; }
    .mobile-menu { display: inline-grid !important; }
    .topbar { padding: 0 22px; }
    .breadcrumbs { margin-right: auto; margin-left: 13px; }
    .dashboard-grid, .details-grid { grid-template-columns: 1fr; }
    .login-shell { display: block; }
    .login-story { display: none; }
    .login-panel { min-height: 100vh; }
}

@media (max-width: 720px) {
    .page-content { padding: 24px 16px; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .page-actions { width: 100%; }
    .page-actions .button { flex: 1; }
    .stats-grid, .project-grid, .form-grid, .permission-grid, .detail-list { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .filters { align-items: stretch; flex-direction: column; }
    .search-box { min-width: 0; }
    .filter-select { width: 100%; }
    .topbar { padding: 0 14px; }
    .topbar-actions .access-pill { display: none; }
    .breadcrumbs { gap: 7px; font-size: 10px; }
    .bar-chart { gap: 4px; }
    .card-header, .card-body { padding-right: 17px; padding-left: 17px; }
    .project-assignment { grid-template-columns: auto 1fr; }
    .project-assignment .input { grid-column: 2; }
    .docs-grid { grid-template-columns: 1fr; }
    .docs-nav { position: static; }
    .dialog-header { padding: 20px; }
    .dialog-content { padding: 18px 20px; }
    .dialog-footer { padding: 13px 20px; }
    .login-panel { padding: 18px; }
    .login-card { padding: 28px 21px; }
}
