/* Accounting Platform - Custom Styles */

:root {
    --sidebar-width: 220px;
    --navbar-height: 56px;
}

body {
    padding-top: var(--navbar-height);
    font-size: 0.9rem;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: margin-left 0.2s ease;
}

#sidebar .sidebar-content {
    padding: 0.5rem 0;
}

#sidebar .nav-link {
    padding: 0.4rem 1rem;
    color: #495057;
    font-size: 0.85rem;
    border-radius: 0;
}

#sidebar .nav-link:hover {
    background-color: rgba(0,0,0,0.05);
    color: #0d6efd;
}

#sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

#sidebar .nav-link i {
    width: 1.25rem;
    margin-right: 0.4rem;
    text-align: center;
}

#sidebar .nav-header {
    padding: 0.75rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.05em;
}

/* Main content */
#main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--navbar-height));
}

/* Mobile sidebar toggle */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.show {
        margin-left: 0;
    }
    #main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Tables */
.table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom-width: 2px;
}

.table td {
    vertical-align: middle;
}

.table-accounting {
    font-variant-numeric: tabular-nums;
}

.table-accounting td.amount,
.table-accounting th.amount {
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* Cards */
.card {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 0.6rem 1rem;
}

/* Account tree indentation */
.account-level-0 { padding-left: 1rem; }
.account-level-1 { padding-left: 2.5rem; }
.account-level-2 { padding-left: 4rem; }
.account-level-3 { padding-left: 5.5rem; }

/* Bank register */
.register-row-cleared {
    background-color: #f0f9f0;
}
.register-row-uncleared {
    background-color: #fffbf0;
}

/* Journal entry form - line items */
.journal-lines-table th,
.journal-lines-table td {
    padding: 0.3rem 0.5rem;
}

.journal-lines-table input,
.journal-lines-table select {
    font-size: 0.85rem;
}

/* Reports */
.report-table {
    font-variant-numeric: tabular-nums;
}

.report-table .total-row {
    font-weight: bold;
    border-top: 2px solid #000;
}

.report-table .subtotal-row {
    font-weight: 600;
    border-top: 1px solid #999;
}

.report-table .indent-1 { padding-left: 2rem; }
.report-table .indent-2 { padding-left: 3.5rem; }

/* Print styles */
@media print {
    .navbar, #sidebar, .btn, .no-print { display: none !important; }
    #main-content { margin-left: 0; width: 100%; }
    body { padding-top: 0; }
    .card { border: none; box-shadow: none; }
    .card-header { background: none; }
}

/* Flash messages */
.alert {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
}

/* Badge colors for sources */
.badge.bg-manual { background-color: #6c757d !important; }
.badge.bg-bank { background-color: #0d6efd !important; }
.badge.bg-import { background-color: #198754 !important; }
.badge.bg-check { background-color: #fd7e14 !important; }

/* Void entries */
.void-entry {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Reconciliation */
.recon-cleared {
    background-color: #d4edda !important;
}

/* Amount formatting */
.amount-positive { color: #198754; }
.amount-negative { color: #dc3545; }

/* Compact tables for accounting data */
.table-compact th,
.table-compact td {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}
