/* Accountant Dashboard Custom Theme Colors */

/* Use the new color scheme throughout */
body {
    background-color: #F4F1E8 !important;
}

/* Buttons */
.primary-button,
.btn-primary-action,
button[class*="primary"] {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    border: 2px solid #E0C387 !important;
    color: #F4F1E8 !important;
}

.export-btn,
.report-btn {
    background: #E0C387 !important;
    border: 2px solid #1C4643 !important;
    color: #1C4643 !important;
    font-weight: 600;
}

.export-btn:hover,
.report-btn:hover {
    background: #1C4643 !important;
    color: #F4F1E8 !important;
}

/* Revenue Cards */
.revenue-card,
.finance-card {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    color: #F4F1E8 !important;
    border: 3px solid #E0C387 !important;
    box-shadow: 0 4px 20px rgba(28, 70, 67, 0.3);
}

.revenue-amount,
.total-amount {
    color: #E0C387 !important;
    font-weight: 700;
}

/* Transaction Cards */
.transaction-card,
.payment-card {
    border-left: 4px solid #2d7a5f !important;
    background: white !important;
    border-top: 2px solid #E0C387 !important;
    border-right: 2px solid #E0C387 !important;
    border-bottom: 2px solid #E0C387 !important;
}

.transaction-card:hover,
.payment-card:hover {
    box-shadow: 0 6px 20px rgba(28, 70, 67, 0.2) !important;
}

/* Status Badges */
.status-badge.paid {
    background: #2d7a5f !important;
    color: white !important;
}

.status-badge.pending {
    background: #E0C387 !important;
    color: #1C4643 !important;
}

.status-badge.overdue {
    background: #8b3a3a !important;
    color: white !important;
}

.status-badge.refunded {
    background: #607d8b !important;
    color: white !important;
}

/* Invoice List */
.invoice-item {
    border-left: 4px solid #1C4643 !important;
    background: white !important;
    border-top: 2px solid #E0C387 !important;
    border-right: 2px solid #E0C387 !important;
    border-bottom: 2px solid #E0C387 !important;
}

.invoice-item:hover {
    background: #F4F1E8 !important;
}

/* Payment Method Badges */
.payment-method-badge {
    background: #F4F1E8 !important;
    border: 2px solid #E0C387 !important;
    color: #1C4643 !important;
}

/* Charts and Graphs */
.chart-container {
    background: white !important;
    border: 2px solid #E0C387 !important;
    border-top: 5px solid #1C4643 !important;
}

/* Stats Cards */
.stat-card-accountant {
    background: white !important;
    border: 2px solid #E0C387 !important;
    border-top: 5px solid #1C4643 !important;
}

.stat-number {
    color: #1C4643 !important;
}

.stat-icon {
    color: #E0C387 !important;
}

.stat-trend-up {
    color: #2d7a5f !important;
}

.stat-trend-down {
    color: #8b3a3a !important;
}

/* Filter Controls */
.date-filter,
.category-filter {
    border: 2px solid #E0C387 !important;
    background: white !important;
}

.date-filter:focus,
.category-filter:focus {
    border-color: #1C4643 !important;
    box-shadow: 0 0 0 3px rgba(28, 70, 67, 0.1) !important;
}

/* Tables */
.financial-table {
    background: white !important;
    border: 2px solid #E0C387 !important;
}

.financial-table thead {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    color: #F4F1E8 !important;
}

.financial-table tbody tr:nth-child(even) {
    background: #F4F1E8 !important;
}

.financial-table tbody tr:hover {
    background: #E0C387 !important;
    color: #1C4643 !important;
}

/* Total Row */
.total-row {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    color: #F4F1E8 !important;
    font-weight: 700;
    border-top: 3px solid #E0C387 !important;
}

/* Tabs */
.tab-button {
    border: 2px solid #E0C387 !important;
    background: white !important;
    color: #1C4643 !important;
}

.tab-button.active {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    color: #F4F1E8 !important;
    border-color: #E0C387 !important;
}

.tab-button:hover {
    background: #E0C387 !important;
    color: #1C4643 !important;
}

/* Modal Enhancements */
.modal-overlay.active {
    background: rgba(28, 70, 67, 0.5) !important;
}

.close-modal-btn {
    background: #8b3a3a !important;
    color: white !important;
    border: 2px solid #F4F1E8 !important;
}

.close-modal-btn:hover {
    background: #732f2f !important;
}

/* Reports Section */
.report-card {
    background: white !important;
    border: 2px solid #E0C387 !important;
    border-left: 5px solid #1F3F3D !important;
}

.report-title {
    color: #1C4643 !important;
}

/* Department Revenue Breakdown */
.dept-revenue-item {
    background: #F4F1E8 !important;
    border-left: 4px solid #E0C387 !important;
    border-top: 1px solid #E0C387 !important;
    border-right: 1px solid #E0C387 !important;
    border-bottom: 1px solid #E0C387 !important;
}

/* Discount/Refund Cards */
.discount-card,
.refund-card {
    background: #fff9e6 !important;
    border-left: 5px solid #E0C387 !important;
    border-top: 2px solid #E0C387 !important;
    border-right: 2px solid #E0C387 !important;
    border-bottom: 2px solid #E0C387 !important;
}

/* Print Invoice Button */
.print-invoice-btn {
    background: white !important;
    border: 2px solid #E0C387 !important;
    color: #1C4643 !important;
}

.print-invoice-btn:hover {
    background: #E0C387 !important;
    transform: translateY(-3px);
}

/* Success Messages */
.success-message {
    background: #e8f5e9 !important;
    border-left: 5px solid #2d7a5f !important;
    color: #1b5e20 !important;
}

/* Warning Messages */
.warning-message {
    background: #fff9e6 !important;
    border-left: 5px solid #E0C387 !important;
    color: #8b6f00 !important;
}

@media print {
    body {
        background: #ffffff !important;
    }

    .app-sidebar,
    .sidebar-nav,
    .profile-section,
    .cycle-flow,
    .filter-bar,
    .tab-row,
    .action-btns,
    .actions,
    .btn-add,
    .btn-export,
    .btn-primary,
    .btn-secondary,
    .export-btn,
    .report-btn,
    .no-print {
        display: none !important;
    }

    .app-layout,
    .app-main {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .page-header {
        margin-bottom: 12px !important;
    }

    .page-header h1,
    .page-header p,
    .section-title,
    .report-title {
        color: #1C4643 !important;
    }

    .financial-table,
    .report-card,
    .chart-container,
    .stat-card-accountant,
    .invoice-item,
    .transaction-card,
    .payment-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Error Messages */
.error-message {
    background: #ffebee !important;
    border-left: 5px solid #8b3a3a !important;
    color: #c62828 !important;
}

/* ── Global Table Header Fix ────────────────────────────────────────────
   All table <th> elements inside the main content area get the dark green
   theme instead of the barely-visible light-gray-on-white default.
──────────────────────────────────────────────────────────────────────── */
.app-main th,
.app-main thead th {
    background: linear-gradient(135deg, #1C4643 0%, #1F3F3D 100%) !important;
    color: #F4F1E8 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #E0C387 !important;
    letter-spacing: 0.5px;
}

/* ── Modal inner tables – keep light styling (overrides the dark-green rule above) ── */
.modal table th,
.modal table thead th {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    letter-spacing: 0.03em;
}

/* Loading States */
.loading-spinner {
    border: 4px solid #F4F1E8;
    border-top: 4px solid #1C4643;
}