/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

.header-content h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-content h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Authentication Section */
.auth-section {
    margin-bottom: 30px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.auth-card h2 i {
    color: #667eea;
    margin-right: 10px;
}

.auth-card p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.auth-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.auth-button i {
    margin-right: 10px;
}

.auth-status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-button i {
    font-size: 1.2rem;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* Report Controls */
.report-controls {
    margin-bottom: 30px;
}

.report-controls h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.filters {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.generate-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.generate-btn i {
    font-size: 0.9rem;
}

/* Report Grid */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.report-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.report-card h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.report-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Report Results */
.report-results {
    margin-top: 30px;
}

/* Tables */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.report-table th,
.report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.report-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table tr:hover {
    background: #f8f9fa;
}

.report-table .number {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.report-table .positive {
    color: #28a745;
}

.report-table .negative {
    color: #dc3545;
}

/* Charts */
.chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .nav-tabs {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

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

    .report-table {
        font-size: 0.9rem;
    }

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

/* Print styles */
@media print {
    body {
        background: white !important;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    header,
    .auth-section,
    .nav-tabs,
    .report-controls,
    .loading-overlay,
    footer {
        display: none !important;
    }

    .main-content {
        box-shadow: none;
        border-radius: 0;
    }

    .report-table {
        box-shadow: none;
        border: 1px solid #333;
    }

    .report-table th,
    .report-table td {
        border: 1px solid #333;
    }
}
