/* public/css/accounting.css */

#feature-accounting .accounting-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.accounting-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chart-of-accounts-container h5,
.accounting-reports h5 {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 0.5rem;
}

#chart-of-accounts-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

#chart-of-accounts-list th,
#chart-of-accounts-list td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

#chart-of-accounts-list th {
    background-color: var(--md-sys-color-surface-container-low);
    font-weight: 500;
}

/* Remove bottom border for the last row */
#chart-of-accounts-list tr:last-child td {
    border-bottom: none;
}

#chart-of-accounts-list .account-type-asset { color: var(--md-sys-color-primary); }
#chart-of-accounts-list .account-type-liability { color: var(--md-sys-color-error); }
#chart-of-accounts-list .account-type-equity { color: #d67a29; /* Orange */ }
#chart-of-accounts-list .account-type-revenue { color: #38761d; /* Green */ }
#chart-of-accounts-list .account-type-expense { color: #b5912a; /* Goldish */ }


/* Add these new styles to public/css/accounting.css */

.accounting-report-container {
    margin-top: 1.5rem;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color-light);
}

.report-header h5 {
    margin: 0;
    padding: 0;
    border: none;
}

.report-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.report-table-container th,
.report-table-container td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

.report-table-container th {
    background-color: var(--md-sys-color-surface-container-low);
    font-weight: 500;
    position: sticky;
    top: 0;
}

.report-table-container tr:last-child td {
    border-bottom: none;
}

.report-table-container td.debit,
.report-table-container td.credit {
    text-align: right;
    font-family: 'Roboto Mono', monospace;
}



/* Add these new styles to public/css/accounting.css */

.report-controls {
    display: flex;
    align-items: center;
}

.report-table-container .pl-item {
    padding-left: 20px; /* Indent revenue/expense items */
}

.report-table-container .pl-total-row {
    font-weight: 500;
    border-top: 1px solid var(--border-color-light);
}

.report-table-container .pl-net-income-row {
    font-weight: bold;
    background-color: var(--md-sys-color-surface-container-low);
    border-top: 2px solid var(--md-sys-color-outline);
}



/* Add these new styles to public/css/accounting.css */

.report-table-container .bs-item {
    padding-left: 20px;
}

.report-table-container .bs-total-row {
    font-weight: 500;
    border-top: 1px solid var(--border-color-light);
}

.report-table-container .bs-grand-total-row {
    font-weight: bold;
    background-color: var(--md-sys-color-surface-container-low);
    border-top: 2px solid var(--md-sys-color-outline);
}

.unbalanced-warning {
    color: var(--md-sys-color-error);
    background-color: var(--md-sys-color-error-container);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}


/* Add these new styles to public/css/accounting.css */

.report-table-container .cf-item {
    padding-left: 20px;
}

.report-table-container .cf-total-row {
    font-weight: 500;
    border-top: 1px solid var(--border-color-light);
}

.report-table-container .cf-grand-total-row {
    font-weight: bold;
    background-color: var(--md-sys-color-surface-container-low);
    border-top: 2px solid var(--md-sys-color-outline);
}


/* Add these styles to public/css/accounting.css */

#ai-confirmation-table-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
}

#ai-confirmation-table {
    width: 100%;
    border-collapse: collapse;
}

#ai-confirmation-table th,
#ai-confirmation-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color-light);
    text-align: left;
}

#ai-confirmation-table th {
    position: sticky;
    top: 0;
    background-color: var(--md-sys-color-surface-container-high);
}

#ai-confirmation-table select {
    width: 100%;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}
