:root {
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe3ee;
    --brand: #0f766e;
    --brand-2: #2563eb;
    --warm: #f59e0b;
    --surface: #ffffff;
    --soft: #f3f7fb;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--ink);
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.app-navbar {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
}

.navbar-brand,
.nav-link {
    letter-spacing: 0;
}

.hero-section {
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 110px 0 48px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.82)),
        url("https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-block;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #99f6e4;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    font-size: clamp(2.15rem, 6vw, 4.75rem);
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-copy p {
    max-width: 650px;
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.quick-panel {
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
}

.quick-panel-top,
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quick-panel-top {
    color: var(--muted);
    font-weight: 700;
}

.quick-amount {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: var(--brand);
    margin: 0.75rem 0 1.25rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.quick-grid div,
.summary-card,
.history-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.quick-grid div {
    padding: 0.9rem;
}

.quick-grid small,
.summary-card small,
.history-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.section-pad {
    padding: 84px 0;
}

.muted-section {
    background: var(--soft);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 1.75rem;
}

.section-heading h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-top: 0.35rem;
}

.calculator-shell,
.result-panel,
.calc-form,
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.calculator-shell {
    padding: 1rem;
}

.calc-tabs {
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.calc-tabs .nav-link {
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
}

.calc-tabs .nav-link.active {
    background: var(--brand);
    border-color: var(--brand);
}

.calc-form,
.result-panel {
    padding: 1.25rem;
}

.form-label {
    font-weight: 700;
}

.form-text {
    color: var(--muted);
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand-2);
    border-color: var(--brand-2);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.summary-card {
    padding: 1rem;
}

.summary-card strong {
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.chart-bars {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(88px, 140px) 1fr minmax(96px, auto);
    gap: 0.75rem;
    align-items: center;
}

.bar-label,
.bar-value {
    font-weight: 700;
}

.bar-track {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.bar-fill.alt {
    background: var(--warm);
}

.table-wrap {
    overflow-x: auto;
}

.table thead th {
    white-space: nowrap;
    color: var(--muted);
    background: #f8fafc;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.history-card {
    padding: 1rem;
}

.history-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
}

.history-card .amount {
    color: var(--brand);
    font-size: 1.25rem;
    font-weight: 800;
}

.accordion-item {
    border-color: var(--line);
}

.app-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 1.25rem 0;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
    }

    .history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .section-pad {
        padding: 60px 0;
    }

    .hero-section {
        padding-top: 92px;
    }

    .quick-grid,
    .summary-grid,
    .history-grid {
        grid-template-columns: 1fr;
    }

    .bar-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .calc-tabs .nav-link {
        width: 100%;
    }

    .calc-tabs .nav-item {
        flex: 1 1 100%;
    }
}
