:root {
    --ink: #134e4a;
    --muted: #64748b;
    --water: #0284c7;
    --fund: #0f766e;
    --warn: #d97706;
}

html, body {
    font-family: "Cairo", "Segoe UI", sans-serif;
    background: #f3f6f4;
}

.app-bar {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand {
    letter-spacing: .04em;
}

.app-drawer {
    border-left: 1px solid rgba(255,255,255,.06);
}

.app-main {
    min-height: 100vh;
}

.page-shell {
    padding: 24px 28px 48px;
    max-width: 1400px;
}

.page-title {
    margin-bottom: 4px;
}

.page-sub {
    color: var(--muted);
    margin-bottom: 20px;
}

.balances-strip {
    background: #103c3b;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 10px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.balances-strip-title {
    color: #9fd3ce;
    font-size: .85rem;
    font-weight: 700;
    margin-left: 8px;
}

.balance-chip {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 6px 12px;
    min-width: 120px;
    color: #e2e8f0;
}

.balance-chip-label {
    display: block;
    font-size: .75rem;
    color: #9fd3ce;
}

.balance-chip strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.balance-chip-hint {
    color: #9fd3ce;
    font-size: .85rem;
}

.filter-bar {
    margin-bottom: 16px;
}

.filter-count {
    color: var(--muted);
    font-size: .85rem;
    margin-top: 8px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(15, 118, 110, .06);
    border: 1px solid rgba(15, 118, 110, .08);
}

.kpi-label {
    color: var(--muted);
    font-size: .9rem;
}

.kpi-value {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 6px 0 2px;
}

.kpi-hint {
    font-size: .85rem;
    color: var(--muted);
}

.panel {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 118, 110, .06);
    border: 1px solid rgba(15, 118, 110, .08);
    height: 100%;
}

.chart-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    margin-top: 12px;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.chart-stack {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    height: 150px;
    border-radius: 10px 10px 4px 4px;
    overflow: hidden;
    background: #eef4f2;
}

.bar-water { background: var(--water); width: 100%; }
.bar-fund { background: var(--fund); width: 100%; }
.bar-expense { background: #f59e0b; width: 100%; opacity: .85; }

.chart-label {
    font-size: .7rem;
    color: var(--muted);
}

.legend {
    display: flex;
    gap: 14px;
    font-size: .85rem;
    color: var(--muted);
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    display: inline-block;
    margin-left: 6px;
}

.status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: .8rem;
}

.cell-ok { background: #dcfce7; color: #166534; }
.cell-partial { background: #fef3c7; color: #92400e; }
.cell-due { background: #fee2e2; color: #991b1b; }
.cell-none { background: #f1f5f9; color: #64748b; }

.progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .page-shell { padding: 16px; }
}

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #082f2e, #0f766e);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.login-title {
    margin: 0;
    color: #0f766e;
    font-weight: 800;
}

.login-label {
    display: block;
    margin: 12px 0 6px;
    color: #134e4a;
    font-weight: 600;
}

.login-input {
    width: 100%;
    border: 1px solid #d1e3e0;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    margin-top: 20px;
    border: 0;
    border-radius: 12px;
    padding: 12px;
    background: #0f766e;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
