.v2-financials {
    margin-top: 0;
    padding: 0 0 8px;
}

.v2-financials-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0 16px;
}

.v2-financials-kicker {
    display: block;
    margin-bottom: 7px;
    color: #8f67ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}

.v2-financials-head h2 {
    margin: 0;
    color: #eef1f6;
    font-size: 24px;
    line-height: 1.2;
}

.v2-financials-head p {
    margin: 7px 0 0;
    color: #8d98a8;
    font-size: 12px;
    line-height: 1.5;
}

.v2-financials-status[hidden] {
    display: none;
}

.v2-financials-status {
    color: #8d98a8;
    font-size: 11px;
}

.v2-financials-loading,
.v2-financials-empty {
    padding: 18px 0;
    color: #8d98a8;
    font-size: 12px;
}

.v2-financials-overview {
    display: grid;
    gap: 10px;
}

.v2-financials-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-surface);
    border-radius: 7px;
}

.v2-financials-summary-item {
    min-width: 0;
    padding: 13px 14px;
    border-right: 1px solid var(--v2-border);
}

.v2-financials-summary-item:last-child {
    border-right: 0;
}

.v2-financials-label {
    display: block;
    margin-bottom: 6px;
    color: #7f8b9c;
    font-size: 10px;
    line-height: 1.25;
}

.v2-financials-value {
    display: block;
    color: #eef1f6;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.v2-financials-primary-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, .95fr);
    gap: 10px;
}

.v2-financials-secondary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.v2-financials-panel {
    min-width: 0;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-surface);
    border-radius: 7px;
}

.v2-financials-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 13px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-financials-panel-head h3 {
    margin: 0;
    color: #e7ebf1;
    font-size: 12px;
    font-weight: 650;
}

.v2-financials-period-switch {
    display: inline-flex;
    gap: 3px;
}

.v2-financials-period-switch button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 8px 7px 6px;
    color: #7f8b9c;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
}

.v2-financials-period-switch button.is-active {
    border-bottom-color: #8f67ff;
    color: #bca8ff;
}

.v2-financials-chart-wrap {
    min-height: 260px;
    padding: 12px 10px 7px;
}

.v2-financials-chart {
    display: block;
    width: 100%;
    height: 238px;
    overflow: visible;
}

.v2-financials-chart-grid {
    stroke: var(--v2-border);
    stroke-width: 1;
}

.v2-financials-chart-axis {
    fill: #6f7b8b;
    font-size: 9px;
}

.v2-financials-chart-period {
    fill: #8b96a5;
    font-size: 9px;
    text-anchor: middle;
}

.v2-financials-chart-bar-revenue {
    fill: #8f67ff;
}

.v2-financials-chart-bar-income {
    fill: #2cc56e;
}

.v2-financials-chart-bar-cashflow {
    fill: #3b82f6;
}

.v2-financials-chart-zero {
    stroke: #475365;
    stroke-width: 1;
}

.v2-financials-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 13px 12px;
    color: #8995a5;
    font-size: 9px;
}

.v2-financials-legend span::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 1px;
    vertical-align: -1px;
}

.v2-financials-legend .is-revenue::before {
    background: #8f67ff;
}

.v2-financials-legend .is-income::before {
    background: #2cc56e;
}

.v2-financials-legend .is-cashflow::before {
    background: #3b82f6;
}

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

.v2-financials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.v2-financials-table th,
.v2-financials-table td {
    padding: 9px 11px;
    border-bottom: 1px solid var(--v2-border);
    white-space: nowrap;
    text-align: right;
}

.v2-financials-table th:first-child,
.v2-financials-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--v2-bg-surface);
    text-align: left;
}

.v2-financials-table thead th {
    color: #687588;
    font-size: 9px;
    font-weight: 600;
}

.v2-financials-table tbody td {
    color: #cbd3dd;
}

.v2-financials-table tbody td:first-child {
    color: #9aa6b5;
}

.v2-financials-table tbody tr:last-child td {
    border-bottom: 0;
}

.v2-financials-metric-list {
    margin: 0;
}

.v2-financials-metric-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-financials-metric-row:last-child {
    border-bottom: 0;
}

.v2-financials-metric-row dt {
    color: #8390a1;
    font-size: 10px;
}

.v2-financials-metric-row dd {
    margin: 0;
    color: #e7ebf1;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.v2-financials-foot {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 2px 2px;
    color: #697687;
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .v2-financials-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .v2-financials-summary-item:nth-child(3) {
        border-right: 0;
    }

    .v2-financials-summary-item:nth-child(-n+3) {
        border-bottom: 1px solid var(--v2-border);
    }

    .v2-financials-primary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .v2-financials-secondary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .v2-financials-head {
        padding: 14px 0 12px;
    }

    .v2-financials-head h2 {
        font-size: 21px;
    }

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

    .v2-financials-summary-item,
    .v2-financials-summary-item:nth-child(3) {
        border-right: 1px solid var(--v2-border);
        border-bottom: 1px solid var(--v2-border);
    }

    .v2-financials-summary-item:nth-child(even) {
        border-right: 0;
    }

    .v2-financials-summary-item:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .v2-financials-primary-grid,
    .v2-financials-secondary-grid {
        grid-template-columns: 1fr;
    }

    .v2-financials-secondary-grid > :last-child {
        grid-column: auto;
    }

    .v2-financials-chart-wrap {
        min-height: 230px;
    }

    .v2-financials-chart {
        height: 210px;
    }

    .v2-financials-foot {
        flex-direction: column;
        gap: 2px;
    }
}


/* Financial semantic hierarchy */

.v2-financials-summary-item {
    position: relative;
}

.v2-financials-summary-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 13px;
    right: 13px;
    height: 2px;
    background: transparent;
}

.v2-financials-summary-item.is-primary::before {
    background: #8f67ff;
}

.v2-financials-summary-item.is-cash::before {
    background: #3b82f6;
}

.v2-financials-summary-item.is-positive::before {
    background: #2cc56e;
}

.v2-financials-summary-item.is-negative::before {
    background: #ef4444;
}

.v2-financials-summary-item.is-primary
.v2-financials-value {
    color: #c8b7ff;
}

.v2-financials-summary-item.is-cash
.v2-financials-value {
    color: #78adff;
}

.v2-financials-summary-item.is-positive
.v2-financials-value {
    color: #52d486;
}

.v2-financials-summary-item.is-negative
.v2-financials-value {
    color: #f16666;
}


/* Metric meaning, not generic decoration */

.v2-financials-metric-row.is-positive dd {
    color: #52d486;
}

.v2-financials-metric-row.is-negative dd {
    color: #f16666;
}

.v2-financials-metric-row.is-cash dd {
    color: #78adff;
}


/* Section identity */

.v2-financials-secondary-grid
.v2-financials-panel {
    position: relative;
    overflow: hidden;
}

.v2-financials-secondary-grid
.v2-financials-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 42px;
    background: #566273;
}

.v2-financials-secondary-grid
.v2-financials-panel:nth-child(1)::before {
    background: #8f67ff;
}

.v2-financials-secondary-grid
.v2-financials-panel:nth-child(2)::before {
    background: #2cc56e;
}

.v2-financials-secondary-grid
.v2-financials-panel:nth-child(3)::before {
    background: #3b82f6;
}

.v2-financials-secondary-grid
.v2-financials-panel:nth-child(4)::before {
    background: #8a95a5;
}


/* Slight visual priority for the two core panels */

.v2-financials-primary-grid
.v2-financials-panel {
    border-color: #2a3442;
}

.v2-financials-primary-grid
.v2-financials-panel:first-child
.v2-financials-panel-head {
    box-shadow: inset 3px 0 0 #8f67ff;
}

.v2-financials-primary-grid
.v2-financials-panel:last-child
.v2-financials-panel-head {
    box-shadow: inset 3px 0 0 #566273;
}


/* Keep N/A deliberately quiet */

.v2-financials-value,
.v2-financials-metric-row dd {
    transition: color .12s ease;
}



/* Financials readability refinement */

.v2-financials-label {
    font-size: var(--v2-font-label);
    line-height: 1.35;
}

.v2-financials-value {
    font-size: 15px;
    line-height: 1.3;
}

.v2-financials-panel-head {
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
}

.v2-financials-panel-head h3 {
    font-size: 13px;
    line-height: 1.35;
}

.v2-financials-period-switch button {
    font-size: var(--v2-font-label);
}

.v2-financials-table {
    font-size: var(--v2-font-body);
}

.v2-financials-table th,
.v2-financials-table td {
    padding: 11px 12px;
}

.v2-financials-table thead th {
    font-size: var(--v2-font-label);
}

.v2-financials-table tbody td {
    font-size: var(--v2-font-body);
    line-height: 1.35;
}

.v2-financials-table tbody td:not(:first-child) {
    font-weight: 550;
}

.v2-financials-metric-row {
    padding: 11px 13px;
}

.v2-financials-metric-row dt {
    font-size: var(--v2-font-body);
    line-height: 1.35;
}

.v2-financials-metric-row dd {
    font-size: var(--v2-font-secondary);
    line-height: 1.35;
}

.v2-financials-chart-axis,
.v2-financials-chart-period {
    font-size: 10px;
}

.v2-financials-legend {
    font-size: var(--v2-font-label);
}

.v2-financials-foot {
    font-size: 10px;
}

@media (max-width: 768px) {
    .v2-financials-table {
        font-size: 12px;
    }

    .v2-financials-table thead th {
        font-size: var(--v2-font-label);
    }

    .v2-financials-table tbody td {
        font-size: 12px;
    }

    .v2-financials-metric-row dt {
        font-size: 12px;
    }

    .v2-financials-metric-row dd {
        font-size: 13px;
    }
}


/* Financial workspace navigation */

.v2-financials-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 42px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--v2-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.v2-financials-nav::-webkit-scrollbar {
    display: none;
}

.v2-financials-nav button {
    height: 42px;
    flex: 0 0 auto;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 0 2px;
    color: #8e9aaa;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
}

.v2-financials-nav button:hover {
    color: #d8dee7;
}

.v2-financials-nav button.is-active {
    border-bottom-color: #8f67ff;
    color: #e6ddff;
}


/* Statement views */

.v2-financials-statement-view {
    display: grid;
    gap: 10px;
}

.v2-financials-statement-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 2px 8px;
}

.v2-financials-statement-head h3 {
    margin: 0;
    color: #eef1f6;
    font-size: 18px;
    line-height: 1.25;
}

.v2-financials-statement-head p {
    margin: 5px 0 0;
    color: #8491a2;
    font-size: 11.5px;
    line-height: 1.45;
}

.v2-financials-statement-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.v2-financials-statement-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
}

.v2-financials-statement-table th,
.v2-financials-statement-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--v2-border);
    white-space: nowrap;
    text-align: right;
}

.v2-financials-statement-table th:first-child,
.v2-financials-statement-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 190px;
    background: var(--v2-bg-surface);
    text-align: left;
}

.v2-financials-statement-table thead th {
    color: #8290a2;
    font-size: 11px;
    font-weight: 650;
}

.v2-financials-statement-table tbody td {
    color: #e1e6ed;
    font-size: 12.5px;
    font-weight: 550;
}

.v2-financials-statement-table tbody td:first-child {
    color: #a8b3c1;
    font-weight: 500;
}

.v2-financials-statement-table tbody tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 768px) {
    .v2-financials-nav {
        gap: 20px;
    }

    .v2-financials-nav button {
        font-size: 12px;
    }

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

    .v2-financials-statement-table {
        font-size: 12px;
    }

    .v2-financials-statement-table th,
    .v2-financials-statement-table td {
        padding: 12px 13px;
    }

    .v2-financials-statement-table tbody td {
        font-size: 12px;
    }
}


/* Growth / Profitability / Value */

.v2-financials-detail-view {
    display: grid;
    gap: 10px;
}

.v2-financials-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.v2-financials-detail-card {
    position: relative;
    min-height: 118px;
    padding: 16px;
    border: 1px solid var(--v2-border);
    border-radius: 7px;
    background: var(--v2-bg-surface);
}

.v2-financials-detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #596575;
}

.v2-financials-detail-card.is-positive::before {
    background: #22c55e;
}

.v2-financials-detail-card.is-negative::before {
    background: #ef4444;
}

.v2-financials-detail-card.is-cash::before {
    background: #3b82f6;
}

.v2-financials-detail-label {
    display: block;
    margin-bottom: 12px;
    color: #93a0b0;
    font-size: 11.5px;
    font-weight: 600;
}

.v2-financials-detail-value {
    display: block;
    color: #eef1f6;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.v2-financials-detail-card.is-positive
.v2-financials-detail-value {
    color: #22c55e;
}

.v2-financials-detail-card.is-negative
.v2-financials-detail-value {
    color: #ef4444;
}

.v2-financials-detail-card.is-cash
.v2-financials-detail-value {
    color: #4b93ff;
}

.v2-financials-detail-desc {
    display: block;
    margin-top: 9px;
    color: #6f7c8d;
    font-size: 10.5px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .v2-financials-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .v2-financials-detail-grid {
        grid-template-columns: 1fr;
    }

    .v2-financials-detail-card {
        min-height: 100px;
    }

    .v2-financials-detail-value {
        font-size: 20px;
    }
}
