:root {
    --primary-color: #47368C;
    --primary-dark: #352a6b;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #1e293b;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--light-bg);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Superior */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 1.75rem;
}

.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.nav-link i {
    font-size: 1rem;
}

/* Contenedor Principal */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border: none;
}

.card-body {
    padding: 1.5rem;
}

/* Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #f3f0ff;
}

.file-upload-area.dragover {
    border-color: var(--success-color);
    background: #ecfdf5;
}

.upload-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Botones */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.btn-info {
    background: #06b6d4;
}

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

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Progress Bar */
.progress {
    height: 30px;
    border-radius: 10px;
    background: var(--light-bg);
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Tablas */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border-color);
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

/* Historial y Estadísticas */
.history-item {
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}

