/* Reports Screen Layout & Cards */
.reports-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .reports-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

.date-presets-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.preset-btn {
    background: var(--bg-body);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
}

.preset-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.preset-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a0a12;
    font-weight: 600;
}

.custom-date-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
}

.date-input-group input {
    height: 38px;
    width: 130px;
    padding: 0 10px;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* KPI Grid */
.reports-kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Accordion sections */
.reports-sections-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-section-card .admin-card-body {
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.report-section-card.expanded .admin-card-body {
    max-height: 2000px;
    padding-top: 20px;
    padding-bottom: 20px;
    overflow: visible;
}

.section-toggle-header {
    cursor: pointer;
}

.section-chevron {
    transition: transform 0.3s ease;
    color: var(--text-dim);
}

.report-section-card.expanded .section-chevron {
    transform: rotate(180deg);
}

/* Split layouts inside bodies */
.report-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .report-split-layout {
        grid-template-columns: 1fr;
    }
}

.chart-container-wrapper {
    height: 280px;
    position: relative;
}

/* Gold highlighting */
.gold-highlight-row {
    background: rgba(201, 162, 39, 0.03) !important;
}

.gold-highlight-row td:first-child {
    border-left: 3px solid var(--accent);
}

/* Revenue Summary */
.report-revenue-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .report-revenue-summary {
        grid-template-columns: 1fr;
    }
}

.rev-summary-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rev-summary-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
}

.rev-summary-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

#rep-collected-revenue {
    color: var(--success);
}

#rep-estimated-revenue {
    color: var(--warning);
}

/* PRINT MEDIA OVERRIDES */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .sidebar, .top-header, .reports-toolbar, .section-chevron, .export-actions, .pagination, .table-action-btn {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
    }

    .report-section-card {
        border: none !important;
        background: none !important;
        page-break-inside: avoid;
        margin-bottom: 40px;
    }

    .report-section-card .admin-card-body {
        max-height: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .admin-table {
        color: #000 !important;
        border: 1px solid #ddd !important;
    }

    .admin-table th, .admin-table td {
        border-bottom: 1px solid #ddd !important;
        color: #000 !important;
    }

    .kpi-card {
        border: 1px solid #ddd !important;
        color: #000 !important;
    }
}
