:root {
    --panel: rgba(15, 23, 42, 0.75);
    --panel-strong: rgba(15, 23, 42, 0.9);
    --border: rgba(148, 163, 184, 0.18);
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.24), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 24%),
        linear-gradient(135deg, #020617 0%, #0f172a 52%, #111827 100%);
}

.page-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.7));
    backdrop-filter: blur(16px);
}

.content-shell {
    padding: 2rem;
}

.topbar-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand-panel,
.glass-card,
.panel-card,
.metric-card,
.flash-shell,
.table-shell,
.judge-form-shell,
.video-shell,
.sticky-action-bar {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.brand-panel {
    padding: 1.5rem;
    border-radius: 1.5rem;
    background:
        linear-gradient(150deg, rgba(15, 118, 110, 0.35), rgba(15, 23, 42, 0.88)),
        var(--panel);
}

.brand-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgb(153 246 228);
}

.brand-title {
    margin-top: 0.8rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    line-height: 1.05;
    font-weight: 800;
    color: white;
}

.brand-copy {
    margin-top: 0.9rem;
    color: rgb(203 213 225);
    font-size: 0.98rem;
    line-height: 1.6;
}

.glass-card,
.metric-card,
.panel-card,
.table-shell,
.judge-form-shell,
.video-shell,
.sticky-action-bar {
    border-radius: 1.25rem;
}

.glass-card {
    padding: 1.25rem;
}

.metric-card {
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
}

.panel-card {
    padding: 1.25rem;
}

.nav-link {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    color: rgb(203 213 225);
    transition: all 160ms ease;
    background: rgba(15, 23, 42, 0.45);
}

.nav-link:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.78);
    color: white;
}

.nav-link-active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 82%, white 10%), color-mix(in srgb, var(--brand-secondary) 75%, black 20%));
    color: white;
}

.primary-chip,
.secondary-chip,
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    transition: transform 160ms ease, opacity 160ms ease;
}

.primary-chip,
.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-secondary) 84%, white 10%));
}

.secondary-chip,
.btn-secondary {
    color: rgb(226 232 240);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.68);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
}

.primary-chip:hover,
.secondary-chip:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.flash-shell {
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
}

.flash-shell.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.flash-shell.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.flash-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgb(148 163 184);
}

.flash-copy {
    margin-top: 0.45rem;
    color: white;
    font-weight: 500;
}

.table-shell {
    overflow: hidden;
}

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

.table-shell th {
    background: rgba(15, 23, 42, 0.94);
    color: rgb(148 163 184);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.table-shell th,
.table-shell td {
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.09);
    vertical-align: top;
}

.table-shell tr:hover td {
    background: rgba(15, 23, 42, 0.48);
}

.badge-success,
.badge-warning,
.badge-danger,
.badge-muted,
.badge-primary {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(16, 185, 129, 0.14);
    color: rgb(110 231 183);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.14);
    color: rgb(253 224 71);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.14);
    color: rgb(253 164 175);
}

.badge-muted {
    background: rgba(148, 163, 184, 0.12);
    color: rgb(203 213 225);
}

.badge-primary {
    background: rgba(20, 184, 166, 0.14);
    color: rgb(153 246 228);
}

.judge-form-shell,
.video-shell {
    padding: 1.35rem;
}

.progress-track {
    height: 0.8rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.sticky-action-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 1.25rem;
}

.input-label {
    display: block;
    margin-bottom: 0.55rem;
    color: rgb(226 232 240);
    font-weight: 700;
}

.input-help {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgb(148 163 184);
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: white;
}

.stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgb(148 163 184);
}

.action-link {
    font-weight: 700;
    color: rgb(94 234 212);
}

.action-link:hover {
    color: white;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: rgb(148 163 184);
}

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

    .sidebar-shell {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .content-shell {
        padding: 1.25rem;
    }

    .topbar-shell {
        flex-direction: column;
    }

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

    .sticky-action-bar {
        bottom: 0.5rem;
    }
}
