:root {
    --bg: #0b0d10;
    --panel: #12151a;
    --panel-2: #181c22;
    --border: #292e36;
    --text: #f4f5f7;
    --muted: #8f97a3;
    --orange: #ff7a00;
    --orange-soft: rgba(255,122,0,.12);
    --red: #ff5c66;
    --green: #5ed49b;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    padding: 28px 18px;
    background: #080a0d;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.brand {
    margin: 2px 10px 34px;
}

.brand-main {
    color: var(--orange);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: .12em;
}

.brand-sub {
    margin-top: 3px;
    color: #d6d9de;
    font-size: 13px;
}

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

nav a {
    padding: 11px 12px;
    color: #9ea5af;
    text-decoration: none;
    border-radius: 8px;
    transition: .15s ease;
}

nav a:hover {
    background: #111419;
    color: white;
}

nav a.active {
    background: var(--orange-soft);
    color: var(--orange);
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 18px 10px 0;
}

.signed-in {
    font-size: 13px;
    color: #c5cad1;
    margin-bottom: 8px;
}

.logout {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.main {
    grid-column: 2;
    padding: 42px;
    min-width: 0;
}

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

.page-header.split {
    gap: 30px;
}

.page-header h1 {
    margin: 4px 0 7px;
    font-size: 31px;
    letter-spacing: -.03em;
}

.page-header p {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-grid.small {
    grid-template-columns: repeat(3, minmax(140px, 220px));
}

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-card {
    padding: 20px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 29px;
    font-weight: 800;
}

.section-grid,
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr);
    gap: 20px;
}

.panel {
    overflow: hidden;
}

.panel-header {
    padding: 19px 21px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
}

.panel-header a {
    font-size: 12px;
    color: var(--orange);
    text-decoration: none;
}

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

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

th {
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    padding: 13px 18px;
    background: #101319;
}

td {
    padding: 15px 18px;
    border-top: 1px solid #22262d;
    font-size: 13px;
}

td a {
    color: white;
    text-decoration: none;
}

.table-sub {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

.right {
    text-align: right;
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge.active {
    color: var(--green);
    background: rgba(94,212,155,.11);
}

.badge.suspended {
    color: var(--red);
    background: rgba(255,92,102,.11);
}

.small-button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--orange);
    color: #0a0a0a;
    font-weight: 800;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
}

.small-button {
    padding: 7px 11px;
    font-size: 11px;
}

.danger-button {
    background: rgba(255,92,102,.12);
    color: var(--red);
    border: 1px solid rgba(255,92,102,.3);
}

.search-bar {
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
}

.search-bar input {
    width: min(500px, 100%);
}

.search-bar a {
    align-self: center;
    margin-left: 5px;
    color: var(--muted);
    font-size: 13px;
}

input {
    background: #0c0f13;
    color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    outline: none;
}

input:focus {
    border-color: var(--orange);
}

.details {
    display: grid;
    grid-template-columns: 150px 1fr;
    margin: 0;
    padding: 20px;
    row-gap: 15px;
}

.details dt {
    color: var(--muted);
    font-size: 12px;
}

.details dd {
    margin: 0;
    font-size: 13px;
}

.activity-list {
    padding: 4px 20px 12px;
}

.activity-item {
    padding: 14px 0;
    border-bottom: 1px solid #22262d;
    font-size: 12px;
}

.activity-item > div {
    color: var(--muted);
    margin-top: 3px;
}

.activity-item small {
    display: block;
    color: #656d78;
    margin-top: 5px;
}

.flash,
.error-box {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 8px;
}

.flash {
    color: #a7f0ce;
    background: rgba(94,212,155,.1);
    border: 1px solid rgba(94,212,155,.2);
}

.error-box {
    color: #ffadb2;
    background: rgba(255,92,102,.1);
    border: 1px solid rgba(255,92,102,.2);
}

.empty-state {
    color: var(--muted);
    padding: 20px 0;
}

.empty-state.large {
    padding: 50px;
    text-align: center;
}

.empty-state h2 {
    color: white;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(420px, 100%);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 34px;
}

.login-brand {
    margin-bottom: 32px;
}

.login-card h1 {
    margin: 0 0 5px;
    font-size: 25px;
}

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

.login-card form {
    margin-top: 26px;
}

.login-card label {
    display: block;
    margin-bottom: 16px;
    color: #c8ccd2;
    font-size: 12px;
}

.login-card input {
    display: block;
    width: 100%;
    margin-top: 7px;
}

.login-card button {
    width: 100%;
    margin-top: 7px;
}

@media (max-width: 980px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

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

    .sidebar {
        position: static;
        width: 100%;
    }

    .main {
        padding: 25px 18px;
    }
}

select,
textarea {
    background: #0c0f13;
    color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
}

textarea {
    resize: vertical;
}

select:focus,
textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange);
    color: #080808;
    text-decoration: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 800;
    font-size: 13px;
}

.secondary {
    background: #20242a;
    color: #e4e7eb;
    border: 1px solid #343a43;
}

.button-row,
.quick-actions,
.panel-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.top-gap {
    margin-top: 20px;
}

.small-value {
    font-size: 17px;
}

.stat-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(140px,1fr)
        );
}

.stat-card.highlight {
    border-color:
        rgba(255,122,0,.45);
}

.badge.bypass {
    color: #ffae54;
    background:
        rgba(255,122,0,.13);
}

.filters {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}

.filters input {
    min-width: 280px;
}

.filters a {
    color: var(--muted);
    font-size: 13px;
}

.form-panel,
.panel-form {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );
    gap: 16px;
}

.form-grid label,
.panel-form > label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #c9ced6;
    font-size: 12px;
}

.checkbox-row {
    flex-direction: row !important;
    align-items: center;
    gap: 9px !important;
}

.checkbox-row input {
    width: auto;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 22px;
}

.form-actions a {
    color: var(--muted);
}

.quick-actions {
    padding: 0 22px 22px;
}

.panel-actions {
    padding: 0 20px 20px;
}

.feature-list {
    padding: 6px 20px;
}

.feature-row {
    display: grid;
    grid-template-columns:
        minmax(160px,1fr)
        170px
        auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom:
        1px solid #24282f;
}

.feature-row:last-child {
    border-bottom: 0;
}

.announcement-row,
.staff-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 20px;
    border-bottom:
        1px solid #24282f;
}

.announcement-row p {
    color: var(--muted);
    white-space: pre-wrap;
}

.announcement-row small {
    color: #6f7782;
}

.raw-list {
    padding: 12px;
}

.raw-list pre {
    margin: 8px 0;
    padding: 12px;
    overflow-x: auto;
    background: #0a0c0f;
    border: 1px solid #252a31;
    border-radius: 7px;
    color: #b7bdc6;
    font-size: 11px;
    white-space: pre-wrap;
}

.padded {
    padding: 20px;
}

.role-label {
    color: var(--orange);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 4px 0 10px;
}

.truncate {
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .feature-row {
        grid-template-columns: 1fr;
    }
}
