/* =============================================
   PROFESSIONAL REPORT STYLES
   Minimal and clean design for business reports
   ============================================= */

/* Report Container */
.report-section {
    background: var(--surface);
    border-radius: 8px;
    padding: 24px;
}

/* Report Header */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.report-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.report-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.report-period-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.report-period-selector select,
.report-period-selector input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
}

.report-period-selector select:focus,
.report-period-selector input:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Report Summary Cards */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.report-summary-card {
    background: var(--neutral-50);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.report-summary-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.report-summary-card .card-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.report-summary-card .card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.report-summary-card .card-value.positive {
    color: var(--success-600);
}

.report-summary-card .card-value.negative {
    color: var(--error-600);
}

/* Report Tables */
.report-table-container {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.report-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--neutral-50);
    border-bottom: 1px solid var(--border);
}

.report-table-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table thead {
    background: var(--neutral-50);
}

.report-table th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th:last-child,
.report-table td:last-child {
    text-align: right;
}

.report-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.15s ease;
}

.report-table tbody tr:last-child {
    border-bottom: none;
}

.report-table tbody tr:hover {
    background-color: var(--neutral-50);
}

.report-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.report-table .amount {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 500;
}

.report-table .amount.positive {
    color: var(--success-600);
}

.report-table .amount.negative {
    color: var(--error-600);
}

.report-table .percentage {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* P&L Statement Specific Styles */
.report-table .row-header {
    font-weight: 600;
    background: var(--neutral-50);
}

.report-table .row-header td {
    padding-top: 16px;
    padding-bottom: 16px;
}

.report-table .row-indent {
    padding-left: 32px !important;
    color: var(--text-secondary);
}

.report-table .row-total {
    font-weight: 600;
    border-top: 2px solid var(--border);
}

.report-table .row-total.profit {
    background: linear-gradient(135deg, var(--success-50), transparent);
}

.report-table .row-total.loss {
    background: linear-gradient(135deg, var(--error-50), transparent);
}

.report-table .row-total td {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Financial Statement Section */
.financial-section {
    margin-bottom: 32px;
}

.financial-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 16px;
    background: var(--neutral-100);
    border-left: 3px solid var(--primary-500);
    margin-bottom: 0;
}

/* Report Charts */
.report-chart-container {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.report-chart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.report-chart-wrapper {
    height: 250px;
    position: relative;
}

/* Report Empty State */
.report-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.report-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.report-empty-state p {
    font-size: 0.875rem;
    margin: 0;
}

/* Report Actions */
.report-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-btn:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
}

.report-btn.primary {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

.report-btn.primary:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
}

.report-btn svg {
    width: 16px;
    height: 16px;
}

/* Print Styles */
@media print {
    .report-section {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .report-controls,
    .report-actions {
        display: none;
    }

    .report-table-container {
        border: none;
        box-shadow: none;
    }

    .report-table th,
    .report-table td {
        padding: 8px 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .report-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .report-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-summary-card .card-value {
        font-size: 1.25rem;
    }

    .report-table-container {
        overflow-x: auto;
    }

    .report-table {
        min-width: 500px;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .report-summary-card {
    background: var(--neutral-800);
    border-color: var(--neutral-700);
}

[data-theme="dark"] .report-table-container {
    background: var(--surface);
    border-color: var(--neutral-700);
}

[data-theme="dark"] .report-table-header {
    background: var(--neutral-800);
    border-color: var(--neutral-700);
}

[data-theme="dark"] .report-table thead {
    background: var(--neutral-800);
}

[data-theme="dark"] .report-table tbody tr:hover {
    background-color: var(--neutral-800);
}

[data-theme="dark"] .report-table .row-header {
    background: var(--neutral-800);
}

[data-theme="dark"] .report-table .row-total.profit {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), transparent);
}

[data-theme="dark"] .report-table .row-total.loss {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), transparent);
}

[data-theme="dark"] .report-chart-container {
    background: var(--surface);
    border-color: var(--neutral-700);
}

[data-theme="dark"] .financial-section-title {
    background: var(--neutral-800);
}

[data-theme="dark"] .report-btn {
    background: var(--neutral-800);
    border-color: var(--neutral-700);
}

[data-theme="dark"] .report-btn:hover {
    background: var(--neutral-700);
}