:root {
    color-scheme: dark;
    --bg: #05070b;
    --bg-2: #080d14;
    --panel: #101720;
    --panel-2: #131c28;
    --panel-3: #0b1119;
    --line: #26364b;
    --line-soft: #172334;
    --text: #f5f9ff;
    --muted: #8fa3bd;
    --cyan: #4fdcff;
    --cyan-2: #168fbd;
    --green: #45e09a;
    --yellow: #ffd25f;
    --orange: #ff9b54;
    --red: #ff4f6f;
    --purple: #b99cff;
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(79, 220, 255, .045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(185, 156, 255, .035) 1px, transparent 1px),
        linear-gradient(135deg, #06080d 0%, #0a1018 45%, #05070b 100%);
    background-size: 34px 34px, 34px 34px, auto;
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    font-size: 14px;
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(79, 220, 255, .08), transparent 19%),
        linear-gradient(115deg, transparent 0%, rgba(255, 79, 111, .11) 44%, transparent 72%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .42) 100%);
    mix-blend-mode: screen;
    opacity: .42;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
}

.side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    padding: 26px 18px;
    border-right: 1px solid rgba(79, 220, 255, .14);
    background:
        linear-gradient(180deg, rgba(13, 21, 32, .94), rgba(5, 8, 13, .98)),
        linear-gradient(90deg, rgba(79, 220, 255, .12), transparent 45%);
    box-shadow: 18px 0 60px rgba(0, 0, 0, .24);
}

.side:before {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--cyan), var(--red), transparent);
    opacity: .8;
}

.brand {
    position: relative;
    margin-bottom: 28px;
    padding: 0 4px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.brand h1 {
    margin: 8px 0 0;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 950;
}

.eyebrow {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(79, 220, 255, .34);
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 900;
    overflow: hidden;
    transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}

.nav a:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
}

.nav a:hover {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(79, 220, 255, .18);
    color: var(--text);
    transform: translateX(2px);
}

.nav a.active {
    background:
        linear-gradient(90deg, rgba(79, 220, 255, .2), rgba(185, 156, 255, .08)),
        rgba(16, 23, 32, .9);
    border-color: rgba(79, 220, 255, .34);
    color: var(--text);
    box-shadow: inset 0 0 24px rgba(79, 220, 255, .08), 0 12px 34px rgba(0, 0, 0, .22);
}

.nav a.active:before {
    background: linear-gradient(180deg, var(--cyan), var(--green));
}

.main {
    min-width: 0;
    padding: 30px 34px 58px;
    animation: page-in .26s ease-out both;
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.title h2 {
    margin: 5px 0 0;
    font-size: 34px;
    line-height: 1.02;
    font-weight: 950;
}

.title .muted {
    margin-top: 7px;
    max-width: 840px;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 16px;
}

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

.stats {
    grid-template-columns: repeat(5, minmax(132px, 1fr));
    margin-bottom: 20px;
}

.stat,
.panel,
.auth-box {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(19, 28, 40, .96), rgba(9, 14, 21, .96)),
        linear-gradient(135deg, rgba(79, 220, 255, .08), transparent 36%);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat:before,
.panel:before,
.auth-box:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--green), var(--red), transparent);
    opacity: .72;
    animation: scanline 4.8s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateX(-45%);
        opacity: .22;
    }
    45% {
        opacity: .82;
    }
    100% {
        transform: translateX(45%);
        opacity: .22;
    }
}

.stat {
    min-height: 92px;
    padding: 19px;
}

.stat-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 1.9px;
    text-transform: uppercase;
}

.stat-value {
    margin-top: 10px;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.critical .stat-value,
.stat.critical .stat-value,
.stat-value.critical {
    color: var(--red);
}

.high .stat-value,
.stat.high .stat-value,
.stat-value.high {
    color: var(--orange);
}

.medium .stat-value,
.stat.medium .stat-value,
.stat-value.medium {
    color: var(--yellow);
}

.panel {
    padding: 21px;
    margin-bottom: 18px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 17px;
}

.panel-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 950;
}

.filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px 120px;
    gap: 12px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

input,
select,
button,
.btn {
    min-height: 40px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: rgba(4, 8, 13, .92);
    color: var(--text);
    padding: 0 13px;
    font: inherit;
    outline: none;
}

input,
select {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .015);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus {
    border-color: rgba(79, 220, 255, .78);
    background: rgba(6, 12, 19, .98);
    box-shadow: 0 0 0 3px rgba(79, 220, 255, .12), inset 0 0 26px rgba(79, 220, 255, .035);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 950;
    white-space: nowrap;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

button:hover,
.btn:hover {
    border-color: rgba(79, 220, 255, .62);
    background: #101b28;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .26);
}

.btn-primary,
button.primary {
    background: linear-gradient(180deg, var(--cyan), var(--cyan-2));
    border-color: rgba(79, 220, 255, .92);
    color: #031018;
    box-shadow: 0 14px 30px rgba(79, 220, 255, .18);
}

.btn-danger {
    background: linear-gradient(180deg, #7d1830, #45101d);
    border-color: #9b2940;
    color: #ffe5e9;
    box-shadow: 0 14px 30px rgba(255, 79, 111, .16);
}

.btn-danger:hover {
    border-color: var(--red);
    background: linear-gradient(180deg, #9b213b, #541322);
}

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

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 11px;
    text-align: left;
    background: rgba(20, 27, 39, .96);
    color: #9db2cb;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line-soft);
}

td {
    padding: 13px 11px;
    border-bottom: 1px solid rgba(38, 54, 75, .46);
    vertical-align: top;
}

tbody tr {
    transition: background .14s ease, box-shadow .14s ease;
}

tbody tr:hover {
    background: rgba(79, 220, 255, .045);
    box-shadow: inset 2px 0 0 rgba(79, 220, 255, .72);
}

.code {
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid rgba(143, 163, 189, .26);
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.pill.critical,
.pill.ban,
.pill.applied {
    color: #ffdce2;
    border-color: rgba(255, 79, 111, .62);
    background: rgba(255, 79, 111, .15);
}

.pill.high {
    color: #ffe4cf;
    border-color: rgba(255, 155, 84, .62);
    background: rgba(255, 155, 84, .14);
}

.pill.medium,
.pill.queued {
    color: #fff1c9;
    border-color: rgba(255, 210, 95, .6);
    background: rgba(255, 210, 95, .12);
}

.pill.low,
.pill.unban,
.pill.dismissed {
    color: #ccffe5;
    border-color: rgba(69, 224, 154, .55);
    background: rgba(69, 224, 154, .11);
}

.pill.expired,
.pill.rejected {
    color: #cdd8e6;
    border-color: rgba(143, 163, 189, .34);
    background: rgba(143, 163, 189, .08);
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(79, 220, 255, .22);
    border-radius: 8px;
    background: rgba(79, 220, 255, .08);
    font-weight: 800;
}

.alert.success {
    border-color: rgba(69, 224, 154, .42);
    background: rgba(69, 224, 154, .11);
}

.alert.error {
    border-color: rgba(255, 79, 111, .46);
    background: rgba(255, 79, 111, .12);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 26px;
    background:
        linear-gradient(90deg, rgba(79, 220, 255, .045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(185, 156, 255, .035) 1px, transparent 1px),
        linear-gradient(135deg, #05070b, #0d1420);
    background-size: 34px 34px, 34px 34px, auto;
}

.auth-box {
    width: min(420px, 100%);
    padding: 26px;
}

.auth-box h1 {
    margin: 8px 0 18px;
    font-size: 28px;
}

@media (max-width: 1100px) {
    .shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

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

@media (max-width: 760px) {
    .shell {
        display: block;
    }

    .side {
        position: relative;
        height: auto;
    }

    .main {
        padding: 22px 16px 38px;
    }

    .topbar,
    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .stats,
    .two-col,
    .filters {
        grid-template-columns: 1fr;
    }

    .title h2 {
        font-size: 28px;
    }
}
