/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs .container {
    display: flex;
    gap: 10px;
    padding: 0;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover:not(:disabled) {
    background: var(--light);
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.tab-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-btn i {
    margin-right: 8px;
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    margin: 30px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Section */
.upload-section {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.highlight {
    border-color: var(--primary-color);
    background: var(--light);
}

.upload-area i {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-area input[type="file"] {
    display: none;
}

.file-info {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.upload-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.upload-options label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn-primary, .btn-success, .btn-secondary, .btn-large {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.stat-card h3 {
    font-size: 2rem;
    margin: 10px 0;
}

.stat-card p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:hover {
    background: var(--light);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.table-controls input,
.table-controls select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* Charts */
.chart-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-item h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Stats Section */
.stats-section {
    margin: 30px 0;
}

.stats-section h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

/* Filter Controls */
.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
    margin: 20px 0;
}

/* Export Options */
.export-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.export-section {
    margin: 30px 0;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.pagination button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
}