:root {
    --ink: #182230;
    --muted: #667085;
    --line: #d9e2ec;
    --soft: #f4f7f9;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --blue: #2563eb;
    --warn: #b45309;
    --danger: #b42318;
}

body {
    background:
        radial-gradient(circle at 20% 0%, rgba(15, 118, 110, .09), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, var(--soft) 42%, #eef3f7 100%);
    color: var(--ink);
    min-height: 100vh;
}

.app-nav {
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(217, 226, 236, .9);
    box-shadow: 0 8px 22px rgba(24, 34, 48, .05);
    backdrop-filter: blur(12px);
}

.navbar-brand {
    color: var(--accent-strong);
    letter-spacing: .01em;
}

.nav-link {
    color: #344054;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-strong);
}

.btn {
    border-radius: 7px;
    font-weight: 600;
}

.btn-dark {
    background: #17202a;
    border-color: #17202a;
}

.page-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title h1 {
    font-weight: 750;
    letter-spacing: 0;
}

.panel {
    background: #fff;
    border: 1px solid rgba(217, 226, 236, .95);
    border-radius: 8px;
    padding: 1.15rem;
    box-shadow: 0 12px 28px rgba(24, 34, 48, .06);
}

.metric {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.metric::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--blue));
    opacity: .85;
}

.metric-label {
    color: var(--muted);
    font-size: .88rem;
}

.metric-value {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0;
}

.balance-panel {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-left: 4px solid var(--accent);
}

.balance-formula {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
}

.deduction-meter {
    min-width: 180px;
    text-align: right;
    padding-left: 1rem;
    border-left: 1px solid var(--line);
}

.table td, .table th {
    vertical-align: middle;
}

.table thead th {
    color: #475467;
    font-size: .82rem;
    text-transform: uppercase;
}

.badge-soft {
    background: #e7f5f2;
    color: #115e59;
}

.form-section {
    max-width: 920px;
}

.chart-box {
    min-height: 320px;
}

.hero-section {
    min-height: calc(100vh - 180px);
}

.hero-summary {
    border-top: 4px solid var(--accent);
}

.form-control, .form-select {
    border-color: #cfd8e3;
    border-radius: 7px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .14);
}

code {
    color: #115e59;
}

@media (max-width: 576px) {
    .page-title {
        align-items: stretch;
        flex-direction: column;
    }

    .balance-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .deduction-meter {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 1rem;
        text-align: left;
    }
}
