/* ── Base ─────────────────────────────────────────────── */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Login page ──────────────────────────────────────── */
.login-body {
    background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    border-radius: 16px;
    border: none;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.login-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto;
}

.login-header h4,
.login-header p {
    color: white !important;
}

/* ── App shell ───────────────────────────────────────── */
.top-bar {
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.wrapper {
    display: flex;
    padding-top: 56px;
    min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
    width: 220px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.65rem 1.25rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar .nav-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .nav-link:hover {
    background: #e9ecef;
    color: #212529;
}

.sidebar .nav-link.active {
    background: #e7f1ff;
    color: #0d6efd;
    border-right: 3px solid #0d6efd;
}

/* ── Main content ────────────────────────────────────── */
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 2rem;
    background: #f5f7fb;
    min-height: calc(100vh - 56px);
}

/* ── Page header ─────────────────────────────────────── */
.page-header h3 {
    color: #1a1f36;
}

/* ── Stat cards ──────────────────────────────────────── */
.stat-card .card-body {
    padding: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .wrapper {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
    }
}
