
:root {
    --surface-light: rgba(255, 255, 255, 0.96);
    --surface-dark: rgba(15, 23, 42, 0.75);
    --border-light: rgba(148, 163, 184, 0.35);
    --border-dark: rgba(71, 85, 105, 0.55);
    --text-light: #0f172a;
    --text-dark: #f8fafc;
    --shadow-light: 0 25px 50px -12px rgba(59, 130, 246, 0.35);
    --shadow-dark: 0 25px 50px -12px rgba(14, 165, 233, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 45%, #ede9fe 100%);
    color: var(--text-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: radial-gradient(circle at top, #111827 0%, #020617 65%);
    color: var(--text-dark);
}

#appContainer {
    min-height: 100vh;
}

.card {
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -20px rgba(37, 99, 235, 0.35);
}

body.dark-mode .card {
    background: var(--surface-dark);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-dark);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    height: 2.5rem;
    width: 2.5rem;
    background: rgba(37, 99, 235, 0.12);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.18);
    transform: translateX(4px);
}

body.dark-mode .nav-link {
    color: #cbd5f5;
}

body.dark-mode .nav-link:hover {
    background: rgba(30, 41, 59, 0.85);
}

.active-nav {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(147, 51, 234, 0.85));
    color: #ffffff;
    transform: translateX(6px);
    box-shadow: 0 18px 30px -12px rgba(79, 70, 229, 0.45);
}

.active-nav .nav-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.btn {
    border-radius: 9999px;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    color: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.25);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(147, 51, 234, 1));
    color: #ffffff;
    box-shadow: 0 20px 40px -20px rgba(79, 70, 229, 0.65);
}

.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 24px 48px -24px rgba(79, 70, 229, 0.7);
}

.form-control {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    background: rgba(148, 163, 184, 0.12);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.92);
}

body.dark-mode .form-control {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(51, 65, 85, 0.7);
}

body.dark-mode .form-control:focus {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: none;
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    width: 2.75rem;
    border-radius: 9999px;
}

body.dark-mode .stat-label {
    color: #94a3b8;
}

tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.08);
}

body.dark-mode tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.12);
}

.modal-content {
    background: var(--surface-light);
    border-radius: 1rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}

body.dark-mode .modal-content {
    background: var(--surface-dark);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-dark);
}

@media (max-width: 768px) {
    body:not(.dark-mode) {
        background: #f8fafc;
        color: #1f2937;
    }

    body:not(.dark-mode) .card {
        background: #ffffff;
        box-shadow: 0 18px 36px -22px rgba(15, 23, 42, 0.28);
    }

    body:not(.dark-mode) .btn.bg-white\/85,
    body:not(.dark-mode) .btn.bg-white\/80 {
        color: #1f2937;
    }
}

@media (min-width: 1024px) {
    #sidebar {
        transform: none !important;
    }
}
