/* Accounting page layout - Track E B60 OS */

.accounting-page {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-5);
}

.acct-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
    flex-wrap: wrap;
}

.acct-tabs-bar .ds-tabs {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.acct-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--ds-space-5);
    align-items: start;
}

.acct-overview-main {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-5);
    min-width: 0;
}

.acct-rail {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-4);
}

.acct-stat-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--ds-space-4);
}

.acct-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ds-space-2);
}

.acct-line-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--ds-space-3);
    font-size: var(--ds-text-sm);
}

.acct-line-row.is-bold {
    font-weight: var(--ds-fw-bold);
}

.acct-line-amount {
    font-weight: var(--ds-fw-bold);
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
}

.acct-line-amount.is-lg {
    font-size: var(--ds-text-lg);
}

.acct-divider {
    border-top: 1px dashed var(--ds-border);
    padding-top: var(--ds-space-3);
}

.acct-divider-strong {
    border-top: 2px solid var(--ds-border-strong);
    padding-top: var(--ds-space-3);
}

.acct-txn-filters {
    display: flex;
    gap: var(--ds-space-2);
    flex-wrap: wrap;
    margin-bottom: var(--ds-space-4);
}

.acct-txn-filter {
    padding: var(--ds-space-1) var(--ds-space-3);
    border-radius: var(--ds-radius-full);
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-fw-medium);
    border: 1px solid var(--ds-border);
    background: var(--ds-surface);
    color: var(--ds-text-secondary);
    cursor: pointer;
}

.acct-txn-filter.is-active {
    background: var(--ds-primary);
    border-color: var(--ds-primary);
    color: var(--ds-text-on-accent);
}

.acct-bank-list {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-3);
}

.acct-bank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3);
}

.acct-bank-name {
    font-size: var(--ds-text-sm);
    color: var(--ds-text-primary);
    font-weight: var(--ds-fw-medium);
}

.acct-bank-balance {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-fw-bold);
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
}

.acct-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-3);
}

.acct-upcoming-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--ds-space-3);
}

.acct-upcoming-title {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-fw-medium);
    color: var(--ds-text-primary);
}

.acct-upcoming-date {
    font-size: var(--ds-text-xs);
    color: var(--ds-text-secondary);
}

.acct-upcoming-amount {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-fw-bold);
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.acct-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ds-space-3);
}

.acct-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-2);
    padding: var(--ds-space-4);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg-inset);
    cursor: pointer;
    font-size: var(--ds-text-xs);
    font-weight: var(--ds-fw-medium);
    color: var(--ds-text-primary);
    min-height: 80px;
}

.acct-quick-btn:hover {
    border-color: var(--ds-border-strong);
    background: var(--ds-surface);
}

.acct-quick-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ds-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.acct-quick-icon.tile-indigo {
    background: var(--ds-primary-tint);
    color: var(--ds-primary);
}

.acct-quick-icon.tile-pink {
    background: var(--ds-danger-tint);
    color: var(--ds-danger);
}

.acct-quick-icon.tile-green {
    background: var(--ds-success-tint);
    color: var(--ds-success);
}

.acct-quick-icon.tile-orange {
    background: var(--ds-warning-tint);
    color: var(--ds-warning);
}

.acct-date-bar {
    display: flex;
    gap: var(--ds-space-3);
    align-items: center;
    flex-wrap: wrap;
}

.acct-section-actions {
    display: flex;
    gap: var(--ds-space-3);
    justify-content: flex-end;
    flex-wrap: wrap;
}

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

.acct-cf-legend {
    display: flex;
    gap: var(--ds-space-4);
    flex-wrap: wrap;
    font-size: var(--ds-text-xs);
    color: var(--ds-text-secondary);
}

.acct-cf-legend-item {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
}

.acct-cf-legend-line {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.acct-cf-legend-line.is-income {
    background: var(--ds-primary);
}

.acct-cf-legend-line.is-expense {
    background: var(--ds-danger);
}

.acct-cf-legend-line.is-net {
    background: var(--ds-success);
}

.acct-donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ds-space-4);
}

.acct-donut-chart {
    position: relative;
    width: 140px;
    height: 140px;
}

.acct-donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.acct-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--ds-space-3);
}

.acct-donut-center-value {
    font-size: var(--ds-text-md);
    font-weight: var(--ds-fw-bold);
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
}

.acct-donut-center-label {
    font-size: var(--ds-text-xs);
    color: var(--ds-text-secondary);
}

.acct-donut-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
}

.acct-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-2);
    font-size: var(--ds-text-xs);
}

.acct-legend-left {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    color: var(--ds-text-secondary);
}

.acct-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.acct-summary-footer {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
    padding-top: var(--ds-space-3);
    border-top: 1px solid var(--ds-border);
    font-size: var(--ds-text-sm);
}

.acct-summary-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acct-embedded .ds-tabs {
    margin-bottom: var(--ds-space-4);
}

@media (max-width: 1100px) {
    .acct-overview-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .acct-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
