:root {
    --bg: #04101f;
    --bg-soft: #071728;
    --bg-panel: #0b1d32;
    --bg-panel-2: #102742;
    --text: #e8eef8;
    --muted: #9eb0c8;
    --border: rgba(148, 163, 184, 0.22);
    --brand: #3b82f6;
    --brand-dark: #2563eb;
    --brand-soft: rgba(59, 130, 246, 0.15);
    --hero: linear-gradient(135deg, #06101d 0%, #10203a 55%, #183152 100%);
    --shell-glow: 0 18px 50px rgba(2, 6, 23, 0.35);
    --card-shadow: 0 14px 28px rgba(2, 6, 23, 0.20);
    --radius-lg: 1.15rem;
    --radius-md: 0.85rem;
}

html,
body {
    min-height: 100%;
}

body,
.admin-shell,
.public-shell {
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 26%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%) !important;
    color: var(--text);
}

.admin-shell .app-navbar,
.public-hero {
    background: var(--hero);
    color: #f8fafc;
}

.public-hero,
.app-navbar {
    box-shadow: var(--shell-glow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-toggler {
    color: #f8fafc;
}

.app-navbar .nav-link {
    font-weight: 500;
    opacity: 0.94;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    color: #dbeafe;
    opacity: 1;
}

.app-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.25);
}

.app-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.admin-user-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-weight: 600;
}

main.container-fluid,
main.container {
    position: relative;
    z-index: 1;
}

.card,
.alert,
.login-card,
.hero-card,
.table-responsive {
    border-radius: var(--radius-lg);
}

.card,
.alert,
.login-card {
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%) !important;
    color: var(--text) !important;
}

.card-header,
.card-header.bg-white,
.bg-white {
    background: transparent !important;
    color: var(--text) !important;
    border-bottom-color: var(--border) !important;
}

.list-group-item {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.text-muted,
.small.text-muted,
.section-subtle {
    color: var(--muted) !important;
}

.stat-card {
    border-radius: var(--radius-lg);
}

.stat-label {
    display: inline-block;
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #f8fbff;
}

.table-responsive {
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
}

.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-border-color: var(--border);
}

.table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #b8c5d8;
    background: rgba(255, 255, 255, 0.02);
    border-bottom-width: 1px;
}

.table td,
.table th {
    vertical-align: middle;
}

.page-link {
    border-radius: 0.65rem;
    background: var(--bg-panel);
    border-color: var(--border);
    color: #dbeafe;
}

.page-link:hover {
    background: var(--brand-soft);
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.3);
}

.odd-pill {
    display: inline-block;
    min-width: 3.75rem;
    padding: 0.38rem 0.58rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #f8fbff;
    font-weight: 700;
    text-align: center;
}

.trigger-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
    font-weight: 700;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.35);
}

.btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.45);
    color: #ffffff;
}

.btn-outline-warning {
    color: #fcd34d;
    border-color: rgba(250, 204, 21, 0.35);
}

.btn-outline-warning:hover {
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.45);
    color: #fff8db;
}

.card-header h2,
.card-header .h5,
.display-6,
.h3,
.h4,
.h5 {
    color: #f8fbff;
}

.form-control,
.form-select,
.btn,
.badge {
    border-radius: var(--radius-md);
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fbff;
    border: 1px solid var(--border);
}

.form-control::placeholder {
    color: #8fa2bb;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.12);
}

.form-select option {
    color: #0f172a;
}

.alert {
    padding: 0.9rem 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.16);
    color: #d1fae5;
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fee2e2;
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.hero-card {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #f8fafc;
    backdrop-filter: blur(10px);
}

.badge.text-bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #dbeafe !important;
    border: 1px solid var(--border);
}

.login-card {
    margin-top: 2.5rem;
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        padding-top: 1rem;
    }

    .admin-user-badge {
        margin-bottom: 0.35rem;
    }
}