/**
 * Reports Page Styles
 * Updated to Warm Professional design system
 */

/* Main Reports Layout */
.reports-main {
    margin-left: 0;
    padding: 2rem;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-card-alt, #faf7f2) 0%, var(--warm-border, #f0ebe3) 100%);
    transition: margin-left 0.3s ease;
}

.reports-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Reports Header */
.reports-header {
    margin-bottom: 2rem;
}

.reports-title {
    font-size: 2.5rem;
    font-weight: var(--font-bold, 700);
    color: var(--text-primary, #2c2c2c);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reports-title i {
    color: var(--warm-accent, #8b7355);
    font-size: 2.2rem;
}

.reports-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted, #7a6a5a);
    max-width: 600px;
    line-height: 1.6;
}

/* Reports Dashboard Layout */
.reports-dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Reports Navigation Sidebar */
.reports-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
    max-width: 200px;
    position: sticky;
    top: 2rem;
}

.reports-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal, 0.2s ease);
    box-shadow: 0 1px 3px 0 rgba(139, 115, 85, 0.1), 0 1px 2px 0 rgba(139, 115, 85, 0.06);
    text-align: left;
    width: 100%;
}

.reports-nav-btn:hover {
    background: var(--bg-card-alt, #faf7f2);
    color: var(--text-secondary, #5a4a3a);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(139, 115, 85, 0.1));
}

.reports-nav-btn.active {
    background: linear-gradient(135deg, var(--warm-accent, #8b7355), var(--gold-accent, #c9a96e));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
}

.reports-nav-btn i {
    font-size: 1.125rem;
    min-width: 18px;
}

/* Reports Content Area */
.reports-module-content {
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(139, 115, 85, 0.08);
    border: 1px solid var(--warm-border, #f0ebe3);
}

/* Reports Tools Section */
.reports-tools-section {
    margin-bottom: 2rem;
}

.reports-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.reports-actions-group {
    display: flex;
    gap: 1rem;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--warm-border, #f0ebe3);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-card-alt, #faf7f2);
    transition: all var(--transition-slow, 0.3s ease);
}

.search-input:focus {
    outline: none;
    border-color: var(--warm-accent, #8b7355);
    background: var(--bg-card, #ffffff);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* Quick Stats Section */
.quick-stats-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--warm-accent, #8b7355);
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card-alt, #faf7f2) 0%, var(--warm-border, #f0ebe3) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--warm-border, #f0ebe3);
    transition: all var(--transition-slow, 0.3s ease);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.1);
}

.stat-icon {
    background: linear-gradient(135deg, var(--warm-accent, #8b7355), var(--gold-accent, #c9a96e));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: var(--font-bold, 700);
    color: var(--text-primary, #2c2c2c);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted, #7a6a5a);
    margin-top: 0.25rem;
}

/* Reports Section */
.reports-section {
    margin-bottom: 2rem;
}

.reports-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.reports-section-title {
    font-size: 1.5rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-section-title i {
    color: var(--warm-accent, #8b7355);
    font-size: 1.3rem;
}

.reports-section-actions {
    display: flex;
    gap: 0.5rem;
}

.view-toggle-btn {
    padding: 0.75rem;
    border: 2px solid var(--warm-border, #f0ebe3);
    background: var(--bg-card, #ffffff);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-slow, 0.3s ease);
    color: var(--text-muted, #7a6a5a);
    font-size: 1rem;
}

.view-toggle-btn:hover {
    border-color: var(--warm-accent, #8b7355);
    color: var(--warm-accent, #8b7355);
}

.view-toggle-btn.active {
    background: var(--warm-accent, #8b7355);
    border-color: var(--warm-accent, #8b7355);
    color: white;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Report Cards */
.report-card {
    background: var(--bg-card, #ffffff);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--warm-border, #f0ebe3);
    cursor: pointer;
    transition: all var(--transition-slow, 0.3s ease);
    box-shadow: 0 2px 10px rgba(139, 115, 85, 0.05);
    position: relative;
    overflow: hidden;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--warm-accent, #8b7355), var(--gold-accent, #c9a96e));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 115, 85, 0.1);
}

.report-card:hover::before {
    opacity: 1;
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.report-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.2);
}

.report-icon.operations {
    background: linear-gradient(135deg, var(--warm-accent, #8b7355), #6d5a45);
}

.report-icon.compliance {
    background: linear-gradient(135deg, #10b981, #059669);
}

.report-icon.safety {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.report-icon.financial {
    background: linear-gradient(135deg, var(--gold-accent, #c9a96e), #b08d5a);
}

.report-icon.quality {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.report-icon.analytics {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.report-priority {
    padding: 0.25rem;
    border-radius: 50%;
    font-size: 0.75rem;
}

.report-priority.high {
    background: #fef3c7;
    color: #d97706;
}

.report-priority.medium {
    background: #f0ebe3;
    color: var(--warm-accent, #8b7355);
}

.report-priority.low {
    background: #f3f4f6;
    color: var(--text-secondary);
}

.report-card-content {
    margin-bottom: 1.5rem;
}

.report-title {
    font-size: 1.25rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.report-description {
    font-size: 0.875rem;
    color: var(--text-muted, #7a6a5a);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.report-metrics {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.metric {
    text-align: center;
    flex: 1;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: var(--font-bold, 700);
    color: var(--text-primary, #2c2c2c);
    line-height: 1;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted, #7a6a5a);
    margin-top: 0.25rem;
}

.report-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.last-updated {
    font-size: 0.75rem;
    color: #94a3b8;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem;
    border: none;
    background: var(--bg-card-alt, #faf7f2);
    border-radius: 6px;
    color: var(--text-muted, #7a6a5a);
    cursor: pointer;
    transition: all var(--transition-slow, 0.3s ease);
    font-size: 0.875rem;
}

.action-btn:hover {
    background: var(--warm-accent, #8b7355);
    color: white;
    transform: translateY(-1px);
}

/* Table View */
.reports-table-container {
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(139, 115, 85, 0.05);
}

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

.reports-table th {
    background: var(--bg-card-alt, #faf7f2);
    padding: 1rem;
    text-align: left;
    font-weight: var(--font-semibold, 600);
    color: var(--text-secondary, #5a4a3a);
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.875rem;
}

.reports-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-muted, #7a6a5a);
}

.reports-table tr:hover {
    background: var(--bg-card-alt, #faf7f2);
}

.table-report-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-report-info i {
    color: var(--warm-accent, #8b7355);
    font-size: 1.125rem;
}

.table-report-info span {
    font-weight: var(--font-medium, 500);
    color: var(--text-primary, #2c2c2c);
}

.category-badge,
.priority-badge,
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: var(--font-medium, 500);
    display: inline-block;
}

.category-badge.operations {
    background: #f0ebe3;
    color: #6d5a45;
}

.category-badge.compliance {
    background: #d1fae5;
    color: #059669;
}

.category-badge.safety {
    background: #fef3c7;
    color: #d97706;
}

.category-badge.financial {
    background: #f5f0e8;
    color: #b08d5a;
}

.category-badge.quality {
    background: #fee2e2;
    color: #dc2626;
}

.category-badge.analytics {
    background: #cffafe;
    color: #0891b2;
}

.priority-badge.high {
    background: #fef3c7;
    color: #d97706;
}

.priority-badge.medium {
    background: #f0ebe3;
    color: var(--warm-accent, #8b7355);
}

.priority-badge.low {
    background: #f3f4f6;
    color: var(--text-secondary);
}

.status-badge.active {
    background: #d1fae5;
    color: #059669;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal Enhancements */
.report-detail-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.summary-card {
    background: var(--bg-card-alt, #faf7f2);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--warm-border, #f0ebe3);
}

.summary-card h3 {
    font-size: 1.125rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    margin-bottom: 1rem;
}

.chart-container {
    background: var(--bg-card-alt, #faf7f2);
    border-radius: 12px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--warm-border, #f0ebe3);
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

.report-data h3 {
    font-size: 1.125rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted, #7a6a5a);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: var(--font-semibold, 600);
    color: var(--text-secondary, #5a4a3a);
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: var(--font-medium, 500);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-slow, 0.3s ease);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--warm-accent, #8b7355), #6d5a45);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
}

.btn-secondary {
    background: var(--bg-card-alt, #faf7f2);
    color: var(--text-muted, #7a6a5a);
    border: 1px solid var(--warm-border, #f0ebe3);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--text-secondary, #5a4a3a);
}

/* Dark Mode Support */
[data-theme="dark"] .reports-main {
    background: linear-gradient(135deg, var(--dark-bg-primary, #1a1a1a) 0%, var(--dark-bg-secondary, #242424) 100%);
}

[data-theme="dark"] .reports-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .reports-section-title,
[data-theme="dark"] .report-title,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .metric-value,
[data-theme="dark"] .table-report-info span,
[data-theme="dark"] .summary-card h3,
[data-theme="dark"] .report-data h3 {
    color: var(--dark-text-primary, #e8e6e1);
}

[data-theme="dark"] .reports-subtitle,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .report-description,
[data-theme="dark"] .metric-label,
[data-theme="dark"] .empty-state {
    color: var(--dark-text-muted, #b8b0a0);
}

[data-theme="dark"] .reports-nav-btn,
[data-theme="dark"] .reports-module-content,
[data-theme="dark"] .report-card,
[data-theme="dark"] .reports-table-container,
[data-theme="dark"] .view-toggle-btn {
    background: var(--dark-bg-card, #2a2a2a);
    border-color: var(--dark-border, #3a3a3a);
    color: var(--dark-text-secondary, #c8c0b0);
}

[data-theme="dark"] .reports-nav-btn:hover,
[data-theme="dark"] .view-toggle-btn:hover {
    background: var(--dark-bg-secondary, #242424);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .chart-container {
    background: var(--dark-bg-secondary, #242424);
    border-color: var(--dark-border, #3a3a3a);
}

[data-theme="dark"] .reports-table th {
    background: var(--dark-bg-secondary, #242424);
    color: var(--dark-text-secondary, #c8c0b0);
}

[data-theme="dark"] .reports-table td {
    color: var(--dark-text-muted, #b8b0a0);
}

[data-theme="dark"] .reports-table tr:hover {
    background: var(--dark-bg-secondary, #242424);
}

[data-theme="dark"] .search-input {
    background: var(--dark-bg-secondary, #242424);
    border-color: var(--dark-border, #3a3a3a);
    color: var(--dark-text-primary, #e8e6e1);
}

[data-theme="dark"] .search-input:focus {
    background: var(--dark-bg-card, #2a2a2a);
    border-color: var(--warm-accent, #8b7355);
}

[data-theme="dark"] .action-btn {
    background: var(--dark-bg-secondary, #242424);
    color: var(--dark-text-muted, #b8b0a0);
}

[data-theme="dark"] .btn-secondary {
    background: var(--dark-bg-secondary, #242424);
    border-color: var(--dark-border, #3a3a3a);
    color: var(--dark-text-secondary, #c8c0b0);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--dark-bg-card, #2a2a2a);
}

[data-theme="dark"] .empty-state-title {
    color: var(--dark-text-secondary, #c8c0b0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .reports-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .reports-sidebar {
        position: static;
        order: 2;
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 100%;
        min-width: auto;
    }

    .reports-nav-btn {
        flex: 1;
        min-width: 120px;
    }

    .reports-module-content {
        order: 1;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .report-summary {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Reports Toolbar
   ========================================================================== */

.reports-toolbar {
    background: var(--bg-card, #ffffff);
    border-radius: var(--radius-md, 12px);
    padding: var(--spacing-lg, 1.5rem);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(139, 115, 85, 0.1));
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.toolbar-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md, 1rem);
    margin-bottom: var(--spacing-md, 1rem);
}

.toolbar-main-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md, 1rem);
    padding-top: var(--spacing-md, 1rem);
    border-top: 1px solid var(--warm-border, #f0ebe3);
}

.toolbar-right-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-title {
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
    margin: 0;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.875rem;
    font-weight: var(--font-medium, 500);
    background: var(--bg-secondary, #f5f0eb);
    color: var(--text-secondary, #5a4a3a);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.filter-pill:hover {
    background: var(--warm-subtle, #ebe5dd);
    border-color: var(--warm-accent, #8b7355);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--warm-accent, #8b7355), var(--gold-accent, #c9a96e));
    color: white;
    border-color: transparent;
}

.pill-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.75rem;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.3);
}

/* AI Tools Dropdown */
.ai-tools-dropdown {
    position: relative;
}

.ai-tools-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card, #ffffff);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(139, 115, 85, 0.1));
    border: 1px solid var(--warm-border, #f0ebe3);
    min-width: 200px;
    z-index: 100;
    padding: 0.5rem;
}

.ai-tools-menu.show {
    display: block;
}

.ai-tool-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary, #5a4a3a);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: var(--radius-sm, 8px);
    transition: all 0.2s ease;
    text-align: left;
}

.ai-tool-item:hover {
    background: var(--bg-secondary, #f5f0eb);
    color: var(--warm-accent, #8b7355);
}

.ai-tool-item i {
    color: var(--warm-accent, #8b7355);
    width: 16px;
    text-align: center;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal-backdrop, 400);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: var(--z-modal, 500);
    background: var(--bg-card, #ffffff);
    border-radius: var(--radius-lg, 16px);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl, 0 20px 40px rgba(139, 115, 85, 0.2));
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg, 1.5rem);
    border-bottom: 1px solid var(--warm-border, #f0ebe3);
}

.modal-header h3 {
    font-size: var(--text-lg, 1.125rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #2c2c2c);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f5f0eb);
    border: none;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-secondary, #5a4a3a);
    cursor: pointer;
    transition: all var(--transition-normal, 0.2s ease);
}

.modal-close:hover {
    background: var(--warm-accent, #8b7355);
    color: var(--text-inverse, #ffffff);
}

.modal-body {
    padding: var(--spacing-lg, 1.5rem);
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md, 1rem);
    padding: var(--spacing-lg, 1.5rem);
    border-top: 1px solid var(--warm-border, #f0ebe3);
}

@media (max-width: 768px) {
    .reports-main {
        padding: 1rem;
    }

    .reports-title {
        font-size: 2rem;
    }

    .reports-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .reports-actions-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-container {
        max-width: 100%;
    }

    .reports-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .reports-sidebar {
        gap: 0.25rem;
    }

    .reports-nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .modal-content.large {
        width: 95%;
        max-height: 95vh;
        margin: 0 auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}


/* ==========================================================================
