/* Enterprise Reports Styles - Extracted from reports.html */
/* This file contains all styles for the reports page */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #3c4043 0%, #2d3748 50%, #1a202c 100%);
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.6;
}

.enterprise-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

/* Enterprise Header */
.enterprise-header {
    background: linear-gradient(135deg, rgba(229,231,235,0.95) 0%, rgba(243,244,246,0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(156,163,175,0.3);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.enterprise-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), transparent);
}

.enterprise-header h1 {
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.enterprise-header .subtitle {
    color: #475569;
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.8;
}

.version-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(59,130,246,0.3);
}

/* Enterprise Cards */
.enterprise-card {
    background: linear-gradient(135deg, rgba(229,231,235,0.9) 0%, rgba(243,244,246,0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(156,163,175,0.3);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 
        0 10px 15px -3px rgba(0,0,0,0.15),
        0 4px 6px -2px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enterprise-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 25px -5px rgba(0,0,0,0.2),
        0 10px 10px -5px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148,163,184,0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 8px 25px -8px rgba(59,130,246,0.5);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Stats Grid */
.enterprise-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(229,231,235,0.9) 0%, rgba(243,244,246,0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(156,163,175,0.3);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59,130,246,0.3);
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-change {
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.amount-positive { color: #10b981; }
.amount-negative { color: #ef4444; }

/* Buttons */
.btn-enterprise {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59,130,246,0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -8px rgba(59,130,246,0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(100,116,139,0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16,185,129,0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(245,158,11,0.3);
}

/* Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(229,231,235,0.9);
    border: 1px solid rgba(156,163,175,0.5);
    border-radius: 12px;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    background: rgba(243,244,246,1);
}

/* Quick Filter Bar */
.quick-filter-bar {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.quick-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid rgba(148,163,184,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #1e293b;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.quick-search::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Alerts */
.enterprise-alert {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-info {
    border-left-color: #3b82f6;
    background: rgba(59,130,246,0.2);
    color: #1f2937;
    font-weight: 600;
}

.alert-success {
    border-left-color: #10b981;
    background: rgba(16,185,129,0.2);
    color: #1f2937;
    font-weight: 600;
}

.alert-warning {
    border-left-color: #f59e0b;
    background: rgba(245,158,11,0.2);
    color: #1f2937;
    font-weight: 600;
}

.alert-error {
    border-left-color: #ef4444;
    background: rgba(239,68,68,0.2);
    color: #1f2937;
    font-weight: 600;
}

/* Action Bar */
.action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.1);
}

/* Report Description */
.report-description {
    background: linear-gradient(135deg, rgba(16,185,129,0.2) 0%, rgba(5,150,105,0.15) 100%);
    border: 1px solid rgba(16,185,129,0.4);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    color: #1f2937;
    font-weight: 600;
}

/* Report Generator Layout */
.report-generator-row {
    display: flex;
    align-items: end;
    gap: 24px;
    margin-bottom: 20px;
}

.report-select-container {
    flex: 1;
    max-width: 400px;
}

.report-buttons-container {
    display: flex;
    gap: 12px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, rgba(243,244,246,0.95) 0%, rgba(229,231,235,0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(156,163,175,0.3);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(148,163,184,0.2);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 24px 24px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(148,163,184,0.2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(249,250,251,0.5);
    border-radius: 0 0 24px 24px;
}

.maintenance-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(249,250,251,0.6) 100%);
    border: 1px solid rgba(209,213,219,0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 16px;
}

.section-content {
    color: #374151;
}

/* Performance Optimizations */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(59,130,246,0.3);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.performance-badge {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

.performance-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(59,130,246,0.9), rgba(99,102,241,0.9));
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(59,130,246,0.4);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.performance-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.performance-indicator.warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.9), rgba(217,119,6,0.9));
}

.performance-indicator.error {
    background: linear-gradient(135deg, rgba(239,68,68,0.9), rgba(220,38,38,0.9));
}

/* Virtual Scrolling Support */
.virtual-table-container {
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 12px;
    overflow: hidden;
}

.virtual-table-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-bottom: 2px solid #e5e7eb;
}

.virtual-table-body {
    overflow-y: auto;
    overflow-x: auto;
}

.virtual-row {
    position: absolute;
    width: 100%;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.lazy-chunk-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .enterprise-container { padding: 16px; }
    .enterprise-header { padding: 24px; text-align: center; }
    .enterprise-header h1 { font-size: 2rem; }
    .enterprise-stats { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .report-generator-row { flex-direction: column; align-items: stretch; }
    .report-buttons-container { justify-content: stretch; }
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    .modal-header, .modal-body, .modal-footer {
        padding: 20px;
    }
    .maintenance-section {
        padding: 16px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    .btn-enterprise,
    .quick-filter-bar,
    .action-bar,
    nav {
        display: none !important;
    }
    .enterprise-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
