:root {
    --app-radius: 14px;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
    --bs-primary: #3b82f6;
    --bs-secondary: #64748b;
    --bs-success: #10b981;
    --bs-info: #06b6d4;
    --bs-warning: #f59e0b;
    --bs-danger: #ef4444;
    --bs-border-color: #334155;
}

[data-bs-theme="light"] {
    --bs-body-bg: #f8fafc;
    --bs-body-color: #0f172a;
}

body {
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.15), transparent 45%), var(--bs-body-bg);
    min-height: 100vh;
}

.app-navbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(6px);
}

.app-surface {
    background-color: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--app-radius);
}

[data-bs-theme="light"] .app-surface {
    background-color: rgba(255, 255, 255, 0.9);
}

.card {
    border-radius: var(--app-radius);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.18);
}

.card-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(148, 163, 184, 0.2);
}

.form-control {
    border-radius: 10px;
}

.btn {
    border-radius: 10px;
}

.theme-toggle-btn {
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.45);
}

.theme-toggle-btn:hover {
    border-color: rgba(148, 163, 184, 0.75);
    color: #ffffff;
    background: rgba(30, 41, 59, 0.75);
}

[data-bs-theme="light"] .theme-toggle-btn {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.25);
}

[data-bs-theme="light"] .theme-toggle-btn:hover {
    color: #020617;
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.45);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 1.75rem;
}

.page-shell {
    display: grid;
    gap: 1rem;
}

.panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    padding: 1rem;
}

[data-bs-theme="light"] .panel {
    background: rgba(255, 255, 255, 0.92);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    font-size: 0.82rem;
    cursor: pointer;
}

.filter-chip:hover {
    border-color: rgba(59, 130, 246, 0.6);
    color: #e2e8f0;
}

.filter-chip.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.9);
    color: #dbeafe;
}

[data-bs-theme="light"] .filter-chip {
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    border-color: rgba(15, 23, 42, 0.2);
}

[data-bs-theme="light"] .filter-chip.active {
    color: #1e3a8a;
    background: rgba(59, 130, 246, 0.12);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.stat-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: rgba(30, 41, 59, 0.45);
}

[data-bs-theme="light"] .stat-card {
    background: rgba(248, 250, 252, 0.95);
}

.stat-label {
    font-size: 0.78rem;
    color: #94a3b8;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.25rem;
}
