:root {
    --brand-primary: #2f6f4f;
    --brand-dark: #1b2a2f;
    --sidebar-width: 250px;
}

body {
    background-color: #f4f6f8;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

.login-page {
    background: linear-gradient(135deg, #1b2a2f 0%, #2f6f4f 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
}

/* ---- Layout ---- */
.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--brand-dark);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.app-sidebar .brand {
    padding: 1.25rem 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-sidebar a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.92rem;
}

.app-sidebar a:hover,
.app-sidebar a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left: 3px solid var(--brand-primary);
}

.app-main {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
}

.app-topbar {
    margin-left: var(--sidebar-width);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
}

.stat-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

@media (max-width: 991px) {
    .app-sidebar { transform: translateX(-100%); transition: transform 0.2s; z-index: 1050; }
    .app-sidebar.show { transform: translateX(0); }
    .app-main, .app-topbar { margin-left: 0; }
}

/* Dark mode */
body.dark-mode {
    background-color: #121826;
    color: #e5e7eb;
}
body.dark-mode .card,
body.dark-mode .app-topbar,
body.dark-mode .modal-content {
    background-color: #1b2333 !important;
    color: #e5e7eb;
}
body.dark-mode .table {
    color: #e5e7eb;
}
body.dark-mode .table-light th {
    background-color: #243048;
    color: #e5e7eb;
}
body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #243048;
    color: #e5e7eb;
    border-color: #374151;
}
body.dark-mode .text-muted { color: #9ca3af !important; }
body.dark-mode .border-bottom { border-color: #374151 !important; }
body.dark-mode .bg-light { background-color: #1e2a3a !important; }
