:root {
    --brand-primary: #1f3c88;
    --brand-primary-dark: #112454;
    --brand-accent: #0ea5e9;
    --surface: #ffffff;
    --surface-alt: #f7f8fb;
    --border-color: #e4e8f0;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
}

.topbar {
    background: linear-gradient(90deg, var(--brand-primary-dark), var(--brand-primary));
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 56px);
}

.sidebar .list-group-item {
    border: 0;
    border-radius: 0.5rem;
    margin-bottom: 0.2rem;
}

.sidebar .list-group-item.active {
    background: #e8eefb;
    color: #0f2466;
    font-weight: 600;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    box-shadow: 0 6px 18px rgba(31, 60, 136, 0.06);
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.card {
    border-radius: 0.85rem;
}

.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, #dbeafe, #eff6ff 45%, #f8fafc);
}

.login-wrap {
    padding-top: 12vh;
}

.statement-pill {
    background: #f9fbff;
    border: 1px solid #e7edf8;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.statement-pill .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.statement-pill .value {
    font-weight: 600;
}

.statement-pill-strong {
    background: #e9f4ff;
    border-color: #bfe3ff;
}

.statement-sheet {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #dbe2f0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.statement-sheet-header {
    background: linear-gradient(120deg, #12264d, #1f3c88 55%, #2860c3);
    color: #fff;
    padding: 1.25rem 1.4rem;
}

.statement-sheet-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.statement-sheet-subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

.statement-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.statement-meta-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.55rem;
    padding: 0.45rem 0.6rem;
}

.statement-meta-item .k {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.statement-meta-item .v {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.statement-body {
    padding: 1.1rem 1.2rem 1.3rem;
}

.statement-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.statement-summary-card {
    border: 1px solid #dce5f3;
    border-radius: 0.7rem;
    padding: 0.65rem 0.75rem;
    background: #f8fbff;
}

.statement-summary-card .k {
    font-size: 0.71rem;
    text-transform: uppercase;
    color: #637189;
    letter-spacing: 0.04em;
}

.statement-summary-card .v {
    font-size: 1.04rem;
    font-weight: 700;
    color: #0f172a;
}

.statement-summary-card.closing {
    background: linear-gradient(120deg, #112454, #1f3c88);
    border-color: #17306c;
}

.statement-summary-card.closing .k,
.statement-summary-card.closing .v {
    color: #fff;
}

.statement-block {
    border: 1px solid #dce4f1;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.9rem;
    margin-bottom: 0.85rem;
}

.statement-block h2 {
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1a3265;
    margin-bottom: 0.65rem;
}

.statement-block p {
    margin-bottom: 0.32rem;
    font-size: 0.9rem;
}

.statement-table {
    border: 1px solid #dce4f1;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.statement-table .table {
    margin-bottom: 0;
}

.statement-table .table thead th {
    background: #f0f4fb;
    border-bottom: 1px solid #d5dfef;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #29406f;
    padding: 0.58rem 0.6rem;
}

.statement-table .table tbody td {
    font-size: 0.88rem;
    border-color: #edf1f8;
    padding: 0.56rem 0.6rem;
}

.statement-table .table tbody tr:nth-child(even) {
    background: #fafcff;
}

.statement-legal {
    border-top: 1px solid #e7edf8;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    font-size: 0.84rem;
    color: #5d6a80;
}

.badge-soft-success {
    color: #0f5132;
    background-color: #d1e7dd;
}

.badge-soft-secondary {
    color: #41464b;
    background-color: #e2e3e5;
}

.badge-soft-danger {
    color: #842029;
    background-color: #f8d7da;
}

.badge-soft-warning {
    color: #664d03;
    background-color: #fff3cd;
}

@media (max-width: 991.98px) {
    .sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .statement-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .topbar,
    .sidebar,
    .btn,
    .alert {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }

    .statement-sheet {
        border: 0;
        box-shadow: none;
    }

    .statement-sheet-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
