:root {
    --brand-primary: #1f6b52;
    --brand-primary-soft: rgba(31, 107, 82, 0.14);
    --brand-accent: #ff7a1a;
    --surface-base: #f4efe7;
    --surface-panel: rgba(255, 251, 245, 0.82);
    --surface-border: rgba(31, 42, 37, 0.09);
    --text-primary: #1f2a25;
    --text-muted: #62706a;
    --shadow-soft: 0 24px 60px rgba(31, 42, 37, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(255, 122, 26, 0.18), transparent 28%),
        radial-gradient(circle at right, rgba(31, 107, 82, 0.16), transparent 32%),
        linear-gradient(135deg, #f8f3eb 0%, #efe7dc 48%, #f7f5ef 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 85%);
}

.page-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
}

.hero,
.panel {
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.7s ease forwards;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 251, 245, 0.94), rgba(250, 245, 237, 0.82));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.eyebrow,
.panel-kicker,
.hero-badge span {
    margin: 0 0 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.hero h1,
.panel h2 {
    margin: 0;
}

.hero h1 {
    font-size: clamp(2.3rem, 4vw, 4.4rem);
    line-height: 0.94;
}

.hero-copy,
.panel-meta,
.account-item small,
.loading-row {
    color: var(--text-muted);
}

.hero-copy {
    max-width: 42rem;
    margin: 16px 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.hero-badge {
    min-width: 220px;
    align-self: flex-start;
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--brand-primary);
    color: #fff7ee;
}

.hero-badge strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.3;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.panel {
    padding: 24px;
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    background: var(--surface-panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    animation-delay: var(--delay, 0.12s);
}

.panel:nth-child(2) {
    --delay: 0.22s;
}

.panel:nth-child(3) {
    --delay: 0.32s;
}

.panel-wide {
    grid-column: span 1;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.panel-kicker {
    margin-bottom: 8px;
}

.panel-meta {
    margin: 0;
    font-size: 0.95rem;
}

.chart-wrap {
    position: relative;
    min-height: 320px;
}

.cash-total {
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
}

.account-list {
    display: grid;
    gap: 12px;
}

.account-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(31, 42, 37, 0.06);
}

.account-item strong,
.tax-amount {
    font-family: "JetBrains Mono", monospace;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(31, 42, 37, 0.08);
}

th {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.tax-date {
    white-space: nowrap;
}

.loading-row,
.empty-state,
.error-state {
    text-align: center;
    padding: 24px 12px;
}

.error-state {
    color: #9c2f1d;
}

@keyframes rise-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100vw - 20px, 1180px);
        padding-top: 20px;
    }

    .hero,
    .panel {
        padding: 20px;
        border-radius: 22px;
    }

    .panel-head {
        flex-direction: column;
    }

    th,
    td {
        padding-inline: 8px;
    }
}
