/* ── Base ──────────────────────────────────────────────────────────────── */

body {
    background: #e8f4fd;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */

.navbar {
    background: linear-gradient(135deg, #1a365d, #2b6cb0) !important;
    border-bottom: 1px solid #2b6cb0 !important;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.15);
}

.navbar .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.15s ease;
    border-radius: 6px;
    margin: 0 2px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.navbar .btn-outline-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #1a365d;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #d4e6f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #f0f8ff;
    border-bottom: 1px solid #d4e6f1;
}

.card-footer {
    background: #f0f8ff;
    border-top: 1px solid #d4e6f1;
}

.card-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-bottom: 3px solid #22c55e !important;
}

.card-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    border-bottom: 3px solid #ef4444 !important;
}

.card-stats {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-stats:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ── Stats ─────────────────────────────────────────────────────────────── */

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-success .stat-icon { color: #16a34a; }
.card-danger .stat-icon { color: #dc2626; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.card-success .stat-value { color: #16a34a; }
.card-danger .stat-value { color: #dc2626; }

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-light {
    --bs-table-bg: #ffffff;
    --bs-table-hover-bg: #f0f8ff;
    --bs-table-striped-bg: #f8fafc;
    color: #2c3e50;
}

.table-light thead th {
    background: #f0f8ff;
    border-bottom: 2px solid #d4e6f1;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #475569;
}

.table-light tbody tr {
    transition: background-color 0.15s ease;
}

.table-light tbody tr.table-danger {
    --bs-table-bg: #fef2f2;
}

.table-light tbody tr.table-danger:hover {
    --bs-table-bg: #fee2e2;
}

/* ── Alerts ────────────────────────────────────────────────────────────── */

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn-outline-primary {
    border-color: #d4e6f1;
    color: #2b6cb0;
}

.btn-outline-primary:hover {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: #fff;
}

.btn-outline-secondary {
    border-color: #d4e6f1;
    color: #475569;
}

.btn-outline-secondary:hover {
    background: #e8f4fd;
    border-color: #c8dce8;
    color: #1a365d;
}

.btn-outline-info {
    border-color: #d4e6f1;
    color: #2b6cb0;
}

.btn-outline-info:hover {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: #fff;
}

.btn-primary {
    background: #2b6cb0;
    border-color: #2b6cb0;
}

.btn-primary:hover {
    background: #1a365d;
    border-color: #1a365d;
}

/* ── Badges ────────────────────────────────────────────────────────────── */

.badge {
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.35em 0.65em;
}

.bg-success {
    background: #22c55e !important;
}

.bg-danger {
    background: #ef4444 !important;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */

.toast {
    background: #ffffff !important;
    border: 1px solid #d4e6f1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast-header {
    background: #f0f8ff !important;
    border-bottom: 1px solid #d4e6f1 !important;
    color: #2c3e50 !important;
}

.toast .btn-close {
    filter: none;
}

/* ── Pre / Code ────────────────────────────────────────────────────────── */

pre {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #2c3e50 !important;
}

pre code {
    color: #0369a1 !important;
}

/* ── Search Input ──────────────────────────────────────────────────────── */

input.form-control-sm {
    background: #ffffff;
    border-color: #d4e6f1;
    color: #2c3e50;
}

input.form-control-sm::placeholder {
    color: #94a3b8;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #e8f4fd;
}

::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

/* ── Page Title ────────────────────────────────────────────────────────── */

h1, h2, h3 {
    color: #1a365d;
}

.text-secondary {
    color: #64748b !important;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .card-stats {
        margin-bottom: 0.5rem;
    }
}

/* ── Animations ────────────────────────────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease forwards;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
