:root {
    --bg: #0c111d;
    --panel: #121927;
    --panel-soft: #182133;
    --line: #243146;
    --text: #ecf2ff;
    --muted: #98a7c1;
    --primary: #16e0a0;
    --danger: #ff6b6b;
    --warning: #ffc857;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(22, 224, 160, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(75, 110, 255, 0.14), transparent 25%),
        linear-gradient(180deg, #0a0f18 0%, #101726 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(12, 17, 29, 0.82);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand span {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a,
.nav button {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.nav a.active {
    background: rgba(22, 224, 160, 0.12);
    border-color: rgba(22, 224, 160, 0.25);
}

main {
    padding: 34px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

.eyebrow {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    margin-bottom: 0.7rem;
}

h1,
h2,
h3 {
    margin: 0 0 10px;
}

p {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 0;
}

.metric {
    font-size: 2.1rem;
    font-weight: 700;
}

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

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full {
    grid-column: 1 / -1;
}

.full-width {
    width: 100%;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.94rem;
    color: var(--text);
}

input,
select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}

option {
    color: black;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.btn-compact {
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 0.86rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #35f0c4);
    color: #04130d;
}

.btn-reports {
    width: 100%;
    margin-top: 20px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.14);
    color: #ffd8d8;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.actions form {
    display: flex;
}

.table-actions {
    align-items: flex-start;
    gap: 8px;
}

.form-grid .btn.full {
    width: 100%;
    margin-top: 20px;
}

.flash,
.errors {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.flash {
    background: rgba(22, 224, 160, 0.12);
    border: 1px solid rgba(22, 224, 160, 0.18);
}

.errors {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.16);
    color: #ffd3d3;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

th {
    color: #08130e;
    background: var(--primary);
    font-weight: 700;
    position: sticky;
    top: 73px;
}

tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.02);
}

.table-wrap {
    border-radius: 18px;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge-api {
    background: rgba(22, 224, 160, 0.12);
    color: #8bf7d6;
}

.badge-manual {
    background: rgba(255, 200, 87, 0.12);
    color: #ffd98e;
}

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

.link-primary {
    color: var(--primary);
}

.page-section {
    margin-top: 22px;
}

.auth-shell {
    width: min(460px, calc(100% - 32px));
    margin: 64px auto;
}

.auth-switch {
    margin-top: 18px;
}

.dashboard-layout {
    display: grid;
    gap: 20px;
}

.annual-report-shell {
    display: grid;
    gap: 22px;
}

.annual-hero-card {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.annual-hero-card h1 {
    margin-bottom: 8px;
}

.annual-period-pill {
    align-self: center;
}

.annual-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.annual-highlight-card {
    display: grid;
    gap: 18px;
}

.annual-highlight-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.annual-highlight-header h2 {
    margin-bottom: 0;
}

.annual-highlight-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.annual-highlight-metric {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 12, 21, 0.48);
    display: grid;
    gap: 10px;
}

.annual-highlight-metric strong {
    font-size: 1.3rem;
    line-height: 1.2;
}

.annual-chart-card {
    overflow: hidden;
}

.annual-chart-heading {
    margin-bottom: 20px;
}

.annual-chart-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.annual-chart-switch {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 15px;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.annual-chart-switch.is-active,
.annual-chart-switch:hover {
    border-color: rgba(22, 224, 160, 0.28);
    background: rgba(22, 224, 160, 0.12);
    color: #cffff1;
}

.annual-chart-panel {
    padding: 18px 18px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at top right, rgba(20, 215, 247, 0.12), transparent 25%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.annual-chart-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.annual-chart-current {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.08;
}

.annual-chart-svg {
    display: block;
    width: 100%;
    height: 360px;
    overflow: visible;
}

.annual-chart-guide {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.annual-chart-guide-label {
    fill: var(--muted);
    font-size: 12px;
}

.annual-chart-area {
    fill: rgba(22, 224, 160, 0.12);
}

.annual-chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.annual-chart-point {
    fill: #0c111d;
    stroke: var(--primary);
    stroke-width: 3;
}

.annual-chart-axis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 10px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.annual-chart-axis span {
    text-align: center;
}

.annual-month-cell {
    display: grid;
    gap: 4px;
}

.annual-month-cell-usd {
    font-size: 0.8rem;
    opacity: 0.92;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
    align-items: stretch;
}

.report-top-stack {
    display: grid;
    gap: 20px;
}

.dashboard-sidebar {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
}

.dashboard-sidebar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-actions-card {
    padding: 18px 22px;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-actions form {
    display: block;
}

.dashboard-actions .btn,
.dashboard-actions form .btn {
    width: 100%;
    min-height: 48px;
}

.dashboard-update-form {
    width: 100%;
}

.report-filter-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 22px;
}

.report-filter-form {
    width: 100%;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.report-filter-grid label {
    margin: 0;
}

.report-filter-action {
    display: flex;
    align-items: end;
}

.report-filter-action .btn-reports {
    min-height: 46px;
    white-space: nowrap;
}

.dashboard-balance-management {
    display: grid;
    gap: 16px;
}

.dashboard-balance-management-heading {
    text-align: center;
}

.dashboard-balance-management-heading h2 {
    margin: 30px 0;
}

.btn-update-dashboard {
    min-height: 62px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.manual-balance-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.manual-balance-card .form-grid {
    flex: 1;
    align-content: start;
}

@media (max-width: 900px) {

    .hero,
    .grid-3,
    .grid-2,
    .form-grid,
    .report-filter-grid,
    .dashboard-top-grid,
    .dashboard-actions,
    .dashboard-sidebar-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-action .btn-reports {
        width: 100%;
    }

    .annual-hero-card,
    .annual-highlight-header,
    .annual-chart-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .annual-highlight-grid,
    .annual-highlight-metrics {
        grid-template-columns: 1fr;
    }

    th {
        top: 0;
    }
}

.report-section {
    margin-top: 22px;
}

.report-section-sm {
    margin-top: 18px;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.calendar-toolbar h2,
.profit-calendar-header h3 {
    margin-bottom: 0;
}

.calendar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-nav-btn,
.calendar-today-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.calendar-nav-btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    line-height: 1;
}

.calendar-today-btn {
    padding: 10px 16px;
}

.calendar-nav-btn:hover,
.calendar-today-btn:hover {
    border-color: rgba(22, 224, 160, 0.3);
    background: rgba(22, 224, 160, 0.08);
}

.calendar-nav-btn:disabled,
.calendar-today-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.calendar-stack {
    position: relative;
}

.profit-calendar {
    display: none;
}

.profit-calendar.is-active {
    display: block;
}

.profit-calendar-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.profit-calendar-weekdays,
.profit-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.profit-calendar-weekdays {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

.calendar-day {
    min-height: 94px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    align-content: space-between;
    gap: 12px;
}

.calendar-day.is-positive {
    border-color: rgba(22, 224, 160, 0.3);
    background: linear-gradient(180deg, rgba(22, 224, 160, 0.14), rgba(22, 224, 160, 0.07));
}

.calendar-day.is-negative {
    border-color: rgba(255, 107, 107, 0.28);
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.16), rgba(255, 107, 107, 0.08));
}

.calendar-day.is-neutral {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day.is-outside {
    background: transparent;
    color: rgba(152, 167, 193, 0.45);
}

.calendar-day-number {
    font-size: 0.84rem;
    color: var(--muted);
}

.calendar-day-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.calendar-day.is-positive .calendar-day-value {
    color: #8bf7d6;
}

.calendar-day.is-negative .calendar-day-value {
    color: #ff9f9f;
}

.calendar-day.is-neutral .calendar-day-value {
    color: var(--text);
}

.calendar-day.is-outside .calendar-day-value {
    color: inherit;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.section-heading-actions form,
.calendar-actions form {
    margin: 0;
}

.exchange-balance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.exchange-balance-card {
    display: grid;
    gap: 14px;
    min-height: 176px;
}

.exchange-balance-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.exchange-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.exchange-balance-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.share-progress {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
}

.share-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.share-progress::-webkit-progress-value {
    min-width: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #14d7f7);
}

.share-progress::-moz-progress-bar {
    min-width: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #14d7f7);
}

.exchange-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.cashflow-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.cashflow-detail-grid {
    display: grid;
    gap: 18px;
}

.cashflow-table-wrap {
    margin-top: 8px;
}

.cashflow-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.cashflow-table-heading h4 {
    margin: 0;
}

.cashflow-positive {
    color: #8bf7d6;
}

.cashflow-negative {
    color: #ff9f9f;
}

.statement-shell {
    display: grid;
    gap: 20px;
}

.statement-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 22px;
    align-items: center;
}

.statement-hero > div:first-child {
    align-self: center;
}

.statement-hero h1 {
    margin-bottom: 8px;
}

.statement-hero p {
    margin-bottom: 0;
}

.statement-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.statement-filter-form label {
    min-width: 0;
}

.statement-filter-form .btn {
    width: 100%;
    min-height: 46px;
    white-space: nowrap;
}

.statement-section {
    margin-top: 0;
}

.statement-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.statement-status-badge.is-up {
    background: rgba(22, 224, 160, 0.12);
    color: #8bf7d6;
}

.statement-status-badge.is-down {
    background: rgba(255, 107, 107, 0.14);
    color: #ffb0b0;
}

.statement-status-badge.is-same {
    background: rgba(152, 167, 193, 0.12);
    color: #d5def0;
}

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

.statement-table {
    min-width: 1120px;
}

.statement-table-compact {
    min-width: 980px;
    font-size: 0.88rem;
}

.statement-day-row td {
    padding: 18px 12px 8px;
    border-bottom: 0;
    background: transparent !important;
}

.statement-day-marker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(22, 224, 160, 0.16), rgba(20, 215, 247, 0.05) 55%, rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.statement-day-label {
    color: var(--text);
    font-weight: 800;
}

.statement-day-count {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.empty-state {
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    color: var(--muted);
}

.monthly-summary-card {
    position: relative;
    overflow: hidden;
}

.monthly-summary-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(20, 215, 247, 0.14), transparent 30%),
        radial-gradient(circle at bottom left, rgba(22, 224, 160, 0.12), transparent 32%);
    pointer-events: none;
}

.monthly-summary-header {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}

.summary-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.summary-header-actions form {
    margin: 0;
}

.summary-period-pill {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
}

.capture-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 9px 14px;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.capture-btn:hover {
    border-color: rgba(22, 224, 160, 0.3);
    background: rgba(22, 224, 160, 0.08);
}

.capture-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

.summary-help {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.profile-helper {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-form {
    margin-top: 16px;
}

.profile-helper .btn {
    margin-top: 14px;
}

.monthly-summary-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.summary-tile {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 12, 21, 0.48);
    display: grid;
    align-content: space-between;
    gap: 12px;
}

.summary-tile-featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(22, 224, 160, 0.12), rgba(20, 215, 247, 0.08));
    border-color: rgba(22, 224, 160, 0.16);
}

.summary-tile-wide {
    grid-column: span 2;
}

.summary-kicker {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.74rem;
    font-weight: 700;
}

.summary-value {
    font-size: clamp(1.5rem, 2.5vw, 2.3rem);
    line-height: 1.05;
    font-weight: 800;
}

.summary-inline-value {
    font-size: 1.18rem;
    line-height: 1.2;
    font-weight: 700;
}

.summary-label {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

@media (max-width: 900px) {

    .calendar-toolbar,
    .profit-calendar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profit-calendar-weekdays,
    .profit-calendar-grid {
        gap: 8px;
    }

    .calendar-day {
        min-height: 86px;
        padding: 10px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .exchange-balance-grid {
        grid-template-columns: 1fr;
    }

    .cashflow-summary-grid {
        grid-template-columns: 1fr;
    }

    .statement-hero,
    .statement-filter-form {
        grid-template-columns: 1fr;
    }

    .statement-filter-form .btn {
        width: 100%;
    }

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

    .summary-tile-featured,
    .summary-tile-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .profit-calendar-weekdays {
        font-size: 0.76rem;
    }

    .profit-calendar-grid {
        gap: 6px;
    }

    .calendar-day {
        min-height: 74px;
        border-radius: 14px;
        gap: 8px;
    }

    .calendar-day-value {
        font-size: 0.82rem;
    }

    .monthly-summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-tile,
    .summary-tile-featured,
    .summary-tile-wide {
        grid-column: span 1;
        min-height: auto;
    }

    .summary-period-pill {
        white-space: normal;
    }

    .annual-chart-switcher {
        width: 100%;
    }

    .annual-chart-switch {
        flex: 1 1 100%;
        justify-content: center;
    }

    .annual-chart-svg {
        height: 300px;
    }
}
