:root {
    --brand: #2563eb;
    --brand-dark: #1e40af;
    --sidebar-w: 240px;
}

body {
    background: #f3f4f6;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: #111827;
    color: #e5e7eb;
    flex-shrink: 0;
    min-height: 100vh;
}

.sidebar .brand-link {
    display: block;
    text-decoration: none;
}

.sidebar .brand {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #1f2937;
    background: #fff;
}

.sidebar .brand-logo {
    max-width: 100%;
    height: auto;
    display: block;
}

.sidebar a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
}

.sidebar a:hover, .sidebar a.active {
    background: #1f2937;
    color: #fff;
}

.sidebar .section-label {
    padding: 0.9rem 1.25rem 0.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content {
    padding: 1.25rem;
}

.kpi-card {
    background: #fff;
    border-radius: 0.6rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    border: 1px solid #eef0f3;
}

.kpi-card .kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.kpi-card .kpi-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.card-panel {
    background: #fff;
    border-radius: 0.6rem;
    padding: 1.1rem;
    border: 1px solid #eef0f3;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom-width: 1px;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-brand:hover { background: var(--brand-dark); color:#fff; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #111827);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .app-wrapper { flex-direction: column; }
    .sidebar { width: 100%; min-height: auto; }
}
