/* =========================
   Navo Reports Domain

   Controls:
   - Reports Dashboard
   - Financial Position
   - Profit & Loss
   - Shared report heroes
   - Report filters
   - KPI cards
   - Statement cards
   - Breakdown tables
   - Responsive layouts
========================= */


/* =========================
   Report Tokens
========================= */

:root {
    --reports-surface: rgba(15, 23, 42, 0.88);
    --reports-surface-strong: rgba(15, 23, 42, 0.96);
    --reports-surface-soft: rgba(23, 34, 56, 0.82);
    --reports-row: rgba(2, 6, 23, 0.34);
    --reports-row-hover: rgba(45, 212, 191, 0.05);

    --reports-border: rgba(255, 255, 255, 0.11);
    --reports-border-strong: rgba(255, 255, 255, 0.17);
    --reports-border-soft: rgba(255, 255, 255, 0.075);

    --reports-heading: #f8fafc;
    --reports-text: #e2e8f0;
    --reports-muted: #94a3b8;
    --reports-muted-strong: #cbd5e1;

    --reports-blue: #60a5fa;
    --reports-teal: #2dd4bf;
    --reports-green: #22c55e;
    --reports-amber: #f59e0b;
    --reports-red: #ef4444;

    --reports-radius-lg: 24px;
    --reports-radius: 18px;
    --reports-radius-sm: 13px;

    --reports-shadow:
        0 18px 48px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);

    --reports-shadow-soft:
        0 12px 34px rgba(0, 0, 0, 0.19),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


/* =========================
   Page Foundation
========================= */

.reports-page,
.financial-report-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

.reports-page *,
.reports-page *::before,
.reports-page *::after,
.financial-report-page *,
.financial-report-page *::before,
.financial-report-page *::after {
    box-sizing: border-box;
}

.reports-page .card,
.reports-page .panel,
.reports-page .table-card,
.reports-page .stat-card,
.financial-report-page .card,
.financial-report-page .panel,
.financial-report-page .table-card,
.financial-report-page .stat-card,
.financial-report-page .statement-card,
.financial-report-page .financial-detail-card {
    margin: 0;
}

.reports-page h1,
.reports-page h2,
.reports-page h3,
.reports-page p,
.financial-report-page h1,
.financial-report-page h2,
.financial-report-page h3,
.financial-report-page p {
    overflow-wrap: break-word;
}


/* =========================
   Unified Report Heroes
========================= */

.reports-header,
.financial-report-hero,
.profit-loss-hero {
    background:
        radial-gradient(
            circle at 6% 16%,
            rgba(45, 212, 191, 0.09),
            transparent 35%
        ),
        radial-gradient(
            circle at 94% 8%,
            rgba(96, 165, 250, 0.08),
            transparent 32%
        ),
        linear-gradient(
            115deg,
            rgba(15, 23, 42, 0.99) 0%,
            rgba(17, 29, 52, 0.98) 52%,
            rgba(20, 34, 62, 0.96) 100%
        );
    border: 1px solid var(--reports-border);
    border-radius: var(--reports-radius-lg);
    box-shadow: var(--reports-shadow);
    min-height: 184px;
    overflow: hidden;
    padding: 30px;
    position: relative;
    text-align: left !important;
    width: 100%;
}

.financial-report-hero,
.profit-loss-hero {
    align-items: center !important;
    display: grid !important;
    gap: 30px;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    justify-content: normal !important;
}

.reports-header::before,
.financial-report-hero::before,
.profit-loss-hero::before {
    background:
        linear-gradient(
            90deg,
            rgba(2, 6, 23, 0.28) 0%,
            rgba(2, 6, 23, 0.06) 62%,
            transparent 100%
        );
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.reports-header::after,
.financial-report-hero::after,
.profit-loss-hero::after {
    background:
        linear-gradient(
            90deg,
            rgba(45, 212, 191, 0.7),
            rgba(96, 165, 250, 0.42),
            transparent
        );
    bottom: 0;
    content: "";
    height: 3px;
    left: 30px;
    opacity: 0.52;
    position: absolute;
    right: 30px;
}

.reports-header > *,
.financial-report-hero > *,
.profit-loss-hero > * {
    position: relative;
    z-index: 1;
}

.financial-report-hero-content,
.profit-loss-hero > div:first-child {
    justify-self: start;
    margin: 0;
    max-width: 820px;
    min-width: 0;
    text-align: left;
    width: 100%;
}

.reports-header .eyebrow,
.financial-report-hero .eyebrow,
.profit-loss-hero .eyebrow {
    color: var(--reports-teal);
    display: block;
    font-size: 0.69rem;
    font-weight: 950;
    letter-spacing: 0.13em;
    line-height: 1.2;
    margin: 0;
    text-align: left !important;
    text-transform: uppercase;
}

.reports-header h1,
.financial-report-hero h1,
.profit-loss-hero h1 {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(2.15rem, 4vw, 3.45rem);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 0.98;
    margin: 8px 0 0 !important;
    max-width: 820px;
    text-align: left !important;
}

.reports-header p,
.financial-report-hero .page-subtitle,
.profit-loss-hero .page-subtitle {
    color: var(--reports-muted-strong);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.62;
    margin: 15px 0 0 !important;
    max-width: 760px;
    text-align: left !important;
}

.financial-report-hero .page-actions,
.profit-loss-hero .page-actions {
    align-items: stretch;
    align-self: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    margin: 0;
    min-width: 160px;
}

.financial-report-hero .page-actions .button,
.profit-loss-hero .page-actions .button {
    margin: 0;
    min-width: 160px;
    width: 100%;
}

/* =========================
   Reports Dashboard Hero
========================= */

.reports-page > header.page-header.reports-header {
    align-items: center !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: start !important;
    text-align: left !important;
}

.reports-page > header.page-header.reports-header > div {
    align-items: flex-start !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    justify-self: start !important;
    margin: 0 !important;
    max-width: 820px !important;
    padding: 0 !important;
    text-align: left !important;
    width: min(100%, 820px) !important;
}

.reports-page > header.page-header.reports-header .eyebrow {
    margin: 0 !important;
    text-align: left !important;
}

.reports-page > header.page-header.reports-header h1 {
    margin:
        8px
        0
        0 !important;
    max-width: none !important;
    text-align: left !important;
    width: 100% !important;
}

.reports-page > header.page-header.reports-header p {
    margin:
        15px
        0
        0 !important;
    max-width: 760px !important;
    text-align: left !important;
    width: 100% !important;
}


/* =========================
   Reports Dashboard Snapshot
========================= */

.reports-hero-card {
    align-items: stretch;
    display: grid;
    gap: 28px;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(310px, 0.8fr);
    overflow: hidden;
    padding: 30px;
    position: relative;
}

.reports-hero-card > div {
    min-width: 0;
}

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

.reports-hero-label {
    color: var(--reports-muted);
    display: block;
    font-size: 0.69rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.reports-hero-card > div:first-child > strong {
    color: var(--reports-heading);
    display: block;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(2.8rem, 5vw, 4.4rem);
    font-weight: 950;
    letter-spacing: -0.07em;
    line-height: 0.95;
}

.reports-hero-card > div:first-child > p {
    color: var(--reports-muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 14px 0 0;
    max-width: 580px;
}

.reports-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.reports-hero-actions > span {
    color: var(--reports-muted);
    flex: 1 1 240px;
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.45;
}

.reports-hero-metrics {
    align-content: stretch;
    display: grid;
    gap: 12px;
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.reports-hero-metrics > div {
    background: var(--reports-row);
    border: 1px solid var(--reports-border-soft);
    border-radius: var(--reports-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
    padding: 16px;
}

.reports-hero-metrics span {
    color: var(--reports-muted);
    display: block;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.reports-hero-metrics strong {
    color: var(--reports-heading);
    display: block;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-top: 6px;
}


/* =========================
   Section Heading Cards
========================= */

.reports-section-heading,
.reports-center-heading {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin: 0;
    min-height: 108px;
    padding: 24px;
}

.reports-section-heading > div,
.reports-center-heading > div {
    min-width: 0;
}

.reports-section-heading .eyebrow,
.reports-center-heading .eyebrow {
    color: var(--reports-teal);
    display: block;
    font-size: 0.67rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.reports-section-heading h2,
.reports-center-heading h2 {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.05;
    margin: 0;
}

.reports-section-heading > p,
.reports-center-heading > p {
    color: var(--reports-muted);
    flex: 0 1 500px;
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.5;
    margin: 0;
    max-width: 500px;
    text-align: right;
}


/* =========================
   Action Cards
========================= */

.reports-action-grid {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-action-grid > * {
    height: 100%;
}

.reports-action-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    margin: 0;
    min-height: 210px;
    overflow: hidden;
    padding: 24px;
    position: relative;
    text-decoration: none;
}

.reports-action-card::before {
    background:
        linear-gradient(
            90deg,
            var(--reports-teal),
            var(--reports-blue)
        );
    content: "";
    height: 3px;
    left: 0;
    opacity: 0.78;
    position: absolute;
    right: 0;
    top: 0;
}

.reports-action-card .eyebrow {
    color: var(--reports-teal);
    font-size: 0.65rem;
    margin: 0;
}

.reports-action-card h2 {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.4rem;
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.1;
    margin: 5px 0 0;
}

.reports-action-card p {
    color: var(--reports-muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    max-width: 620px;
}

.reports-action-card strong {
    color: var(--reports-heading);
    font-size: 0.8rem;
    font-weight: 950;
    margin-top: auto;
}


/* =========================
   KPI Cards
========================= */

.reports-kpi-grid,
.financial-kpi-grid {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

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

.reports-kpi-grid > *,
.financial-kpi-grid > * {
    height: 100%;
    margin: 0;
}

.reports-kpi-card,
.financial-kpi-grid .stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 142px;
    overflow: hidden;
    padding: 20px;
}

.reports-kpi-card::before,
.financial-kpi-grid .stat-card::before {
    content: none;
    display: none;
}

.reports-kpi-card span,
.financial-kpi-grid .stat-card > span {
    color: var(--reports-muted);
    display: block;
    font-size: 0.65rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reports-kpi-card strong,
.financial-kpi-grid .stat-card > strong {
    color: var(--reports-heading);
    display: block;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.55rem, 2.8vw, 2.15rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 12px 0 0;
}

.reports-kpi-card small,
.financial-kpi-grid .stat-card > small {
    color: var(--reports-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 10px;
}


/* =========================
   Breakdown Cards
========================= */

.reports-breakdown-grid {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-breakdown-grid > * {
    height: 100%;
    margin: 0;
    min-width: 0;
}

.reports-table-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 330px;
    min-width: 0;
    overflow: hidden;
    padding: 22px;
}

.reports-card-header {
    flex: 0 0 auto;
    min-height: 78px;
    padding: 0 0 16px;
}

.reports-card-header h3 {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0;
}

.reports-card-header p {
    color: var(--reports-muted);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 6px 0 0;
}

.reports-table-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    width: 100%;
}

.reports-table {
    min-width: 520px;
    width: 100%;
}

.reports-table th,
.reports-table td {
    padding: 13px 12px;
}

.reports-table td:last-child,
.reports-table th:last-child {
    text-align: right;
}


/* =========================
   Report Filters
========================= */

.financial-position-filter-card,
.profit-loss-filter-card,
.financial-report-page .filter-card,
.financial-report-page .search-filter-card {
    margin: 0;
    overflow: visible;
    padding: 18px;
}

.financial-position-filter-card .search-filter-form,
.financial-position-filter-card .filter-form,
.profit-loss-filter-card .search-filter-form,
.profit-loss-filter-card .filter-form,
.financial-report-page .search-filter-form,
.financial-report-page .filter-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns:
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        auto;
}

.financial-report-page .form-group {
    margin: 0;
    min-width: 0;
}

.financial-report-page .form-group label {
    color: var(--reports-muted);
    display: block;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.financial-report-page input,
.financial-report-page select {
    min-height: 44px;
}

.financial-report-page .filter-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.financial-position-filter-card .filter-summary,
.profit-loss-filter-card .filter-summary,
.financial-report-page .filter-summary {
    color: var(--reports-muted);
    font-size: 0.7rem;
    font-weight: 750;
    margin: 10px 0 0;
}


/* =========================
   Report Basis Notice
========================= */

.financial-position-note,
.financial-report-page .report-basis,
.financial-report-page .financial-position-note {
    background:
        linear-gradient(
            90deg,
            rgba(45, 212, 191, 0.075),
            rgba(96, 165, 250, 0.035)
        );
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--reports-radius-sm);
    margin: 0;
    padding: 12px 15px;
}

.financial-position-note-content {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
}

.financial-position-note-content > span,
.financial-report-page .report-basis {
    color: var(--reports-text);
    font-size: 0.71rem;
    font-weight: 750;
    line-height: 1.45;
}

.financial-position-generated-date {
    color: var(--reports-text);
    flex: 0 0 auto;
    font-size: 0.71rem;
    font-weight: 900;
    white-space: nowrap;
}


/* =========================
   Statement Cards
========================= */

.financial-statement-grid {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.financial-statement-grid > .statement-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    min-width: 0;
    padding: 22px;
}

.statement-card .section-header,
.financial-detail-card .section-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--reports-border-soft);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 0 0 16px;
}

.statement-card .section-header h2,
.financial-detail-card .section-header h2 {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.4rem;
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.1;
    margin: 0;
}

.statement-lines {
    display: grid;
    gap: 12px;
    margin: 0;
}

.statement-line {
    align-items: center;
    background: var(--reports-row);
    border: 1px solid var(--reports-border-soft);
    border-radius: var(--reports-radius-sm);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 58px;
    padding: 15px 17px;
    transition:
        background 0.16s ease,
        border-color 0.16s ease;
}

.statement-line:hover {
    background: var(--reports-row-hover);
    border-color: rgba(45, 212, 191, 0.16);
}

.statement-line span {
    color: var(--reports-text);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.4;
}

.statement-line strong {
    color: var(--reports-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.1rem;
    font-weight: 950;
    letter-spacing: -0.025em;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.statement-line.total-line {
    background: rgba(45, 212, 191, 0.075);
    border-color: rgba(45, 212, 191, 0.2);
}


/* =========================
   Profit and Loss Balance
========================= */

.profit-loss-page .financial-statement-grid,
.financial-report-page .financial-statement-grid {
    align-items: stretch;
}

.profit-loss-page .statement-card,
.financial-report-page .statement-card {
    height: 100%;
}

.profit-loss-page .statement-lines,
.financial-report-page .statement-lines {
    align-content: start;
    flex: 1 1 auto;
}

.profit-loss-page .statement-card:last-child .statement-lines,
.financial-report-page .statement-card:last-child .statement-lines {
    gap: 12px;
}


/* =========================
   Supporting Detail Cards
========================= */

.financial-detail-card,
.financial-net-card {
    margin: 0;
}

.financial-detail-card {
    padding: 22px;
}

.financial-detail-card .section-subtitle {
    color: var(--reports-muted);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.5;
    margin: 6px 0 0;
}

.financial-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.financial-table {
    min-width: 820px;
    width: 100%;
}

.financial-net-card {
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.financial-net-card::before {
    background: var(--reports-teal);
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.financial-net-card .statement-line {
    background: rgba(45, 212, 191, 0.07);
    border-color: rgba(45, 212, 191, 0.18);
    min-height: 86px;
}

.financial-net-card .statement-line strong {
    font-size: clamp(2rem, 4vw, 3rem);
}


/* =========================
   Recurring Revenue
========================= */

.recurring-revenue-stats,
.recurring-revenue-overview-grid,
.recurring-revenue-list-card,
.recurring-revenue-filter-card {
    margin: 0;
}

.recurring-revenue-stats .stat-card {
    min-height: 142px;
}

.recurring-revenue-list-card {
    padding: 22px;
}

.recurring-revenue-list-card table {
    min-width: 1080px;
}


/* =========================
   Utility States
========================= */

.pnl-positive,
.report-positive {
    color: var(--reports-green) !important;
}

.pnl-negative,
.report-negative {
    color: var(--reports-red) !important;
}

.pnl-neutral,
.report-neutral {
    color: var(--reports-muted) !important;
}


/* =========================
   Responsive
========================= */

@media (max-width: 1180px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .reports-breakdown-grid > *:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1050px) {
    .reports-hero-card {
        grid-template-columns: 1fr;
    }

    .reports-hero-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;
    }

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

@media (max-width: 900px) {
    .financial-report-hero,
    .profit-loss-hero {
        align-items: flex-start !important;
        grid-template-columns: 1fr;
    }

    .financial-report-hero .page-actions,
    .profit-loss-hero .page-actions {
        align-self: auto;
        flex-direction: row;
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .financial-report-hero .page-actions .button,
    .profit-loss-hero .page-actions .button {
        min-width: 0;
        width: auto;
    }

    .financial-position-filter-card .search-filter-form,
    .financial-position-filter-card .filter-form,
    .profit-loss-filter-card .search-filter-form,
    .profit-loss-filter-card .filter-form,
    .financial-report-page .search-filter-form,
    .financial-report-page .filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .financial-report-page .filter-actions {
        grid-column: 1 / -1;
    }

    .financial-statement-grid {
        grid-template-columns: 1fr;
    }

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

    .reports-section-heading > p,
    .reports-center-heading > p {
        max-width: none;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .reports-page,
    .financial-report-page {
        gap: 18px;
    }

    .reports-header,
    .financial-report-hero,
    .profit-loss-hero,
    .reports-hero-card,
    .reports-section-heading,
    .reports-center-heading,
    .reports-action-card,
    .reports-table-card,
    .financial-statement-grid > .statement-card,
    .financial-detail-card,
    .financial-net-card {
        padding: 20px;
    }

    .reports-action-grid,
    .reports-kpi-grid,
    .reports-breakdown-grid,
    .financial-kpi-grid {
        grid-template-columns: 1fr;
    }

    .reports-breakdown-grid > *:last-child {
        grid-column: auto;
    }

    .reports-hero-metrics {
        grid-template-columns: 1fr;
    }

    .financial-position-filter-card .search-filter-form,
    .financial-position-filter-card .filter-form,
    .profit-loss-filter-card .search-filter-form,
    .profit-loss-filter-card .filter-form,
    .financial-report-page .search-filter-form,
    .financial-report-page .filter-form {
        grid-template-columns: 1fr;
    }

    .financial-report-page .filter-actions,
    .financial-report-hero .page-actions,
    .profit-loss-hero .page-actions,
    .reports-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .financial-report-page .filter-actions .button,
    .financial-report-hero .page-actions .button,
    .profit-loss-hero .page-actions .button,
    .reports-hero-actions .button {
        width: 100%;
    }

    .financial-position-note-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .financial-position-generated-date {
        white-space: normal;
    }

    .statement-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .statement-line strong {
        text-align: left;
    }
}

@media (max-width: 460px) {
    .reports-header h1,
    .financial-report-hero h1,
    .profit-loss-hero h1 {
        font-size: 2.1rem;
    }
}


/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
    .reports-page *,
    .reports-page *::before,
    .reports-page *::after,
    .financial-report-page *,
    .financial-report-page *::before,
    .financial-report-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}