:root {
    --sidebar: #111827;
    --surface: #ffffff;
    --line: #e5e7eb;
    --page: #f6f8fb;
    --primary: #1d4ed8;
}

body {
    background: var(--page);
    color: #1f2937;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: var(--sidebar);
    color: white;
    padding: 24px 18px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 28px;
}

.sidebar .nav-link {
    color: #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.app-main {
    min-width: 0;
}

.topbar {
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-heading h1 {
    font-size: 1.7rem;
    margin: 0;
}

.breadcrumb-wrap {
    margin-bottom: 18px;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: #9ca3af;
    font-size: .9rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .active {
    color: #6b7280;
}

.panel, .kpi {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.panel h2, .panel h3 {
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.kpi span {
    display: block;
    color: #6b7280;
    font-size: .9rem;
}

.kpi strong {
    display: block;
    font-size: 2rem;
    line-height: 1.2;
}

.kpi.danger strong { color: #dc2626; }
.kpi.warning strong { color: #b45309; }

.filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: #eef2ff;
}

.login-card {
    box-sizing: border-box;
    width: min(420px, calc(100vw - 32px));
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(31, 41, 55, .08);
}

.login-card h1 {
    color: var(--primary);
    font-weight: 800;
}

.report-disclaimer {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: #4b5563;
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .filters, .form-grid { grid-template-columns: 1fr; }
}
