:root {
    /* Paleta CLARA y profesional */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Acentos del logo - más suaves para fondo claro */
    --navy: #0B1F3A;
    --navy-light: #1e3a5f;
    --green: #00C853;
    --green-light: #00E676;
    --green-soft: rgba(0, 200, 83, 0.08);
    --green-glow: rgba(0, 200, 83, 0.15);

    /* Estados */
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.08);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.08);

    /* Gradientes y efectos */
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.08);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(0, 200, 83, 0.12);

    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== NAVBAR CLARA ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.875rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    border-bottom-color: transparent;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
}

.nav-brand img.logo {
    width: 200px;
    height: auto;
    transition: var(--transition);
}

.nav-brand img.logo:hover {
    transform: scale(1.02);
}

.nav-brand i { 
    font-size: 1.5rem; 
    color: var(--green);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--navy);
    background: var(--green-soft);
}

.nav-links a:hover::before, .nav-links a.active::before {
    width: 60%;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ===== CARDS CLARAS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--accent), var(--info));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: rgba(0, 200, 83, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card h2 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.card h2 i {
    color: var(--green);
    font-size: 1.1rem;
}

/* ===== KPI GRID ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--green-soft) 0%, transparent 70%);
    transition: var(--transition-slow);
    opacity: 0;
}

.kpi-card:hover::after {
    opacity: 1;
    top: -30%;
    right: -30%;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 200, 83, 0.25);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-white);
    position: relative;
    z-index: 1;
    transition: var(--transition-bounce);
    flex-shrink: 0;
}

.kpi-icon.blue { 
    background: linear-gradient(135deg, #6366f1, #818cf8);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}
.kpi-icon.green { 
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.kpi-icon.purple { 
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}
.kpi-icon.orange { 
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(-5deg);
}

.kpi-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.2;
}

.kpi-card:hover .kpi-info h3 {
    color: var(--green);
}

.kpi-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* ===== RANKING ===== */
.ranking-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xs);
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.ranking-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--green), transparent);
    opacity: 0;
    transition: var(--transition);
}

.ranking-item:hover {
    background: var(--bg-primary);
    transform: translateX(6px);
    border-color: rgba(0, 200, 83, 0.15);
    box-shadow: var(--shadow);
}

.ranking-item:hover::before {
    opacity: 1;
}

.rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(11, 31, 58, 0.2);
    transition: var(--transition-bounce);
    flex-shrink: 0;
}

.ranking-item:hover .rank {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(11, 31, 58, 0.3);
}

.rank-info { flex: 1; }
.rank-info strong { 
    display: block; 
    color: var(--text-primary); 
    font-weight: 700;
    font-size: 0.95rem;
}
.rank-info span { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    font-weight: 500;
}

.rank-score {
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    flex-shrink: 0;
}

.rank-score.excelente { 
    color: var(--success); 
    background: var(--success-soft); 
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.rank-score.regular { 
    color: var(--warning); 
    background: var(--warning-soft); 
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.rank-score.bajo { 
    color: var(--danger); 
    background: var(--danger-soft); 
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== ALERTS ===== */
.alert-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--danger-soft);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-xs);
    transition: var(--transition);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.alert-item:hover {
    background: rgba(239, 68, 68, 0.12);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.alert-item i { 
    color: var(--danger); 
    margin-top: 2px; 
    font-size: 1.1rem;
}
.alert-item strong { 
    color: var(--text-primary); 
    font-weight: 700;
}
.alert-item p { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}
.alert-item small { 
    display: block; 
    color: var(--danger); 
    font-size: 0.8rem; 
    margin-top: 0.25rem; 
    font-weight: 500;
}

/* ===== STATUS BADGES ===== */
.status-badges { 
    display: flex; 
    gap: 0.75rem; 
    flex-wrap: wrap; 
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.badge-success { 
    background: var(--success-soft); 
    color: #047857; 
    border-color: rgba(16, 185, 129, 0.25);
}
.badge-warning { 
    background: var(--warning-soft); 
    color: #b45309; 
    border-color: rgba(245, 158, 11, 0.25);
}
.badge-info { 
    background: var(--info-soft); 
    color: #1d4ed8; 
    border-color: rgba(59, 130, 246, 0.25);
}
.badge-danger { 
    background: var(--danger-soft); 
    color: #b91c1c; 
    border-color: rgba(239, 68, 68, 0.25);
}
.badge-secondary { 
    background: var(--bg-secondary); 
    color: var(--text-muted); 
    border-color: rgba(226, 232, 240, 0.8);
}

/* ===== TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.data-table th {
    text-align: left;
    padding: 0.875rem 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #e2e8f0;
    background: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
}

.data-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child { border-radius: 0 8px 0 0; }

.data-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.data-table tbody tr:hover td {
    color: var(--text-primary);
}

.agent-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    position: relative;
}

.agent-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: var(--transition);
}

.agent-link:hover {
    color: var(--green);
}

.agent-link:hover::after {
    width: 100%;
}

.score-bar {
    position: relative;
    height: 24px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    width: 120px;
    border: 1px solid #e2e8f0;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 12px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.score-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.score-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.5); }
}

.status-terminado { 
    background: var(--success); 
}
.status-terminado::after {
    border: 1px solid var(--success);
}
.status-pendiente { 
    background: var(--warning); 
}
.status-pendiente::after {
    border: 1px solid var(--warning);
}
.status-procesando { 
    background: var(--info); 
}
.status-procesando::after {
    border: 1px solid var(--info);
}
.status-error { 
    background: var(--danger); 
}
.status-error::after {
    border: 1px solid var(--danger);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-sm { 
    font-size: 0.85rem; 
    padding: 0.4rem 0.8rem; 
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: var(--text-white);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.btn-lg { 
    padding: 0.875rem 2rem; 
    font-size: 1rem; 
}

/* ===== UPLOAD PAGE ===== */
.upload-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-card { 
    text-align: center; 
}

.upload-card h1 { 
    margin-bottom: 1.5rem; 
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.format-info {
    background: var(--green-soft);
    border: 2px dashed rgba(0, 200, 83, 0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.format-info:hover {
    background: rgba(0, 200, 83, 0.12);
    border-color: var(--green);
}

.format-info code {
    background: var(--navy);
    color: var(--green-light);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--bg-secondary);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--green);
    background: var(--green-soft);
    box-shadow: 0 0 30px rgba(0, 200, 83, 0.08);
}

.drop-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.drop-zone:hover i {
    color: var(--green);
    transform: scale(1.1);
}

.drop-zone input { 
    display: none; 
}

.drop-zone .file-name {
    display: block;
    margin-top: 1rem;
    color: var(--green);
    font-weight: 700;
    font-size: 0.9rem;
}

.drop-zone.has-file {
    border-color: var(--green);
    background: var(--green-soft);
}

.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.agent-tag {
    background: var(--bg-secondary);
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    font-weight: 500;
}

.agent-tag:hover {
    background: var(--green-soft);
    color: var(--green);
    border-color: rgba(0, 200, 83, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.help-card { 
    text-align: left; 
}

.help-card ul { 
    list-style: none; 
    margin: 1rem 0; 
}

.help-card li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.help-card li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.help-card li i { 
    color: var(--green); 
    transition: var(--transition);
}

.help-card li:hover i {
    transform: scale(1.2);
}

.processing-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
    font-weight: 500;
}

.flow-step:hover {
    color: var(--text-primary);
    transform: translateY(-4px);
}

.flow-step i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(11, 31, 58, 0.2);
}

.flow-step:hover i {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    transform: scale(1.1);
}

.processing-flow > i.fas.fa-arrow-right {
    color: var(--text-muted);
    opacity: 0.5;
    animation: bounce-right 1.5s infinite;
}

@keyframes bounce-right {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
}

/* ===== PROGRESS ===== */
.upload-progress { 
    margin-top: 1.5rem; 
}

.progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    width: 0%;
    transition: width 0.3s;
    animation: progress 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1s infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.page-header h1 { 
    font-size: 1.75rem; 
    color: var(--text-primary);
    font-weight: 800;
}

.date-badge, .status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.date-badge {
    background: var(--info-soft);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.active { 
    background: var(--success-soft); 
    color: var(--success); 
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.status-badge.inactive { 
    background: var(--danger-soft); 
    color: var(--danger); 
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ===== CALL DETAIL ===== */
.call-detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
}

.score-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid #f1f5f9;
    transition: var(--transition-slow);
    position: relative;
    background: var(--bg-primary);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: var(--transition-slow);
}

.score-circle.excelente { 
    border-color: var(--success); 
    color: var(--success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}
.score-circle.excelente::before {
    border-color: rgba(16, 185, 129, 0.15);
    animation: rotate-slow 10s linear infinite;
}
.score-circle.regular { 
    border-color: var(--warning); 
    color: var(--warning);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}
.score-circle.regular::before {
    border-color: rgba(245, 158, 11, 0.15);
}
.score-circle.bajo { 
    border-color: var(--danger); 
    color: var(--danger);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}
.score-circle.bajo::before {
    border-color: rgba(239, 68, 68, 0.15);
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.score-number { 
    font-size: 3rem; 
    font-weight: 800; 
    line-height: 1; 
}
.score-label { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    font-weight: 500;
}

.criteria-list { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.criterion-bar {
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.criterion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.criterion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.analysis-content { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
}

.analysis-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
}

.analysis-section h4 i {
    color: var(--green);
}

.analysis-section ul { 
    list-style: none; 
}

.analysis-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.analysis-section li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.analysis-section li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: 1.2rem;
    font-weight: bold;
}

.analysis-section.resumen {
    background: var(--green-soft);
    padding: 1.25rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(0, 200, 83, 0.1);
}

.analysis-section.resumen p { 
    color: var(--text-primary); 
    line-height: 1.7; 
    font-weight: 500;
}

.transcription-text {
    max-height: 500px;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xs);
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    scrollbar-width: thin;
    scrollbar-color: var(--green) transparent;
    font-weight: 500;
}

.transcription-text::-webkit-scrollbar {
    width: 6px;
}

.transcription-text::-webkit-scrollbar-track {
    background: transparent;
}

.transcription-text::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 3px;
}

/* ===== WEEK SUMMARY ===== */
.week-summary {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xs);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.week-summary:hover {
    border-color: rgba(0, 200, 83, 0.2);
    transform: translateX(4px);
    background: var(--bg-primary);
    box-shadow: var(--shadow);
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.week-label { 
    font-weight: 700; 
    color: var(--text-primary); 
}

.week-score {
    font-weight: 800;
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.week-score.excelente { 
    color: var(--success); 
    background: var(--success-soft); 
    border-color: rgba(16, 185, 129, 0.25);
}
.week-score.regular { 
    color: var(--warning); 
    background: var(--warning-soft); 
    border-color: rgba(245, 158, 11, 0.25);
}
.week-score.bajo { 
    color: var(--danger); 
    background: var(--danger-soft); 
    border-color: rgba(239, 68, 68, 0.25);
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    padding: 0.35rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: var(--transition);
    border: 1px solid transparent;
    font-weight: 600;
}

.tag-success { 
    background: var(--success-soft); 
    color: #047857; 
    border-color: rgba(16, 185, 129, 0.2);
}
.tag-warning { 
    background: var(--warning-soft); 
    color: #b45309; 
    border-color: rgba(245, 158, 11, 0.2);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ===== CALLS LIST ===== */
.calls-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.call-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xs);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid transparent;
}

.call-item:hover {
    background: var(--green-soft);
    transform: translateX(6px);
    border-color: rgba(0, 200, 83, 0.15);
    box-shadow: var(--shadow-sm);
}

.call-info { 
    display: flex; 
    flex-direction: column; 
    gap: 0.25rem; 
}

.call-date { 
    font-weight: 700; 
    color: var(--text-primary); 
    font-size: 0.9rem; 
}

.call-resumen { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    font-weight: 500;
}

.call-score {
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.call-score.excelente { 
    color: var(--success); 
    background: var(--success-soft); 
    border-color: rgba(16, 185, 129, 0.25);
}
.call-score.regular { 
    color: var(--warning); 
    background: var(--warning-soft); 
    border-color: rgba(245, 158, 11, 0.25);
}
.call-score.bajo { 
    color: var(--danger); 
    background: var(--danger-soft); 
    border-color: rgba(239, 68, 68, 0.25);
}

/* ===== EMPTY STATE ===== */
.empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== ALERT MESSAGES ===== */
.alert {
    padding: 1rem;
    border-radius: var(--radius-xs);
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success { 
    background: var(--success-soft); 
    color: #047857; 
    border-color: rgba(16, 185, 129, 0.25);
}
.alert-error { 
    background: var(--danger-soft); 
    color: #b91c1c; 
    border-color: rgba(239, 68, 68, 0.25);
}

/* Success/Error boxes for upload */
.success-box {
    background: linear-gradient(135deg, var(--success-soft), rgba(16, 185, 129, 0.05));
    color: #047857;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.25);
    animation: slide-in 0.5s ease-out;
    font-weight: 600;
}

.error-box {
    background: linear-gradient(135deg, var(--danger-soft), rgba(239, 68, 68, 0.05));
    color: #b91c1c;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: slide-in 0.5s ease-out;
    font-weight: 600;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Debug panel */
.debug-panel {
    background: var(--navy);
    color: var(--text-muted);
    padding: 1rem;
    border-radius: var(--radius-xs);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-top: 1rem;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.1);
}

.debug-panel h4 { 
    color: var(--warning); 
    margin-bottom: 0.5rem; 
    font-family: inherit;
}

.debug-panel pre { 
    margin: 0; 
    white-space: pre-wrap; 
    color: #cbd5e1;
}

/* ===== ENTRADA ANIMATIONS ===== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fade-in-up 0.6s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .upload-container { 
        grid-template-columns: 1fr; 
    }
    .call-detail-grid { 
        grid-template-columns: 1fr; 
    }
    .dashboard-grid { 
        grid-template-columns: 1fr; 
    }
    .kpi-grid { 
        grid-template-columns: 1fr; 
    }
    .nav-links { 
        gap: 0.5rem; 
        font-size: 0.85rem;
    }
    .nav-links a {
        padding: 0.4rem 0.8rem;
    }
    .container { 
        padding: 1rem; 
    }
    .nav-brand img.logo {
        width: 150px;
    }
}

/* ===== TEXT UTILITIES ===== */
.text-muted { 
    color: var(--text-muted); 
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== LAYOUT IMAGE ===== */
.layout {
    width: 280px;
    opacity: 0.8;
    transition: var(--transition);
}

.drop-zone:hover .layout {
    opacity: 1;
    transform: scale(1.02);
}
/* ==================== DRIVER.JS THEME ==================== */

.driver-popover.call-evaluator-theme {
    background: #0B1F3A;
    color: #e2e8f0;
    border: 1px solid rgba(0, 200, 83, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(0, 200, 83, 0.1);
    padding: 20px;
    max-width: 400px;
}

.driver-popover.call-evaluator-theme .driver-popover-title {
    color: #00C853;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.driver-popover.call-evaluator-theme .driver-popover-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 500;
}

.driver-popover.call-evaluator-theme .driver-popover-progress-text {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.driver-popover.call-evaluator-theme .driver-popover-navigation-btns {
    gap: 8px;
}

.driver-popover.call-evaluator-theme button {
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.driver-popover.call-evaluator-theme .driver-popover-next-btn {
    background: linear-gradient(135deg, #00C853, #00b248);
    color: white;
    text-shadow: none;
}

.driver-popover.call-evaluator-theme .driver-popover-next-btn:hover {
    background: linear-gradient(135deg, #00b248, #009624);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

.driver-popover.call-evaluator-theme .driver-popover-prev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.driver-popover.call-evaluator-theme .driver-popover-prev-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.driver-popover.call-evaluator-theme .driver-popover-close-btn {
    color: #64748b;
    font-size: 1.2rem;
    top: 12px;
    right: 12px;
}

.driver-popover.call-evaluator-theme .driver-popover-close-btn:hover {
    color: #ef4444;
}

.driver-popover.call-evaluator-theme .driver-popover-arrow {
    border-color: #0B1F3A;
}

/* Overlay oscuro con tinte azul */
.driver-popover-overlay {
    background: rgba(11, 31, 58, 0.85) !important;
}

/* Elemento resaltado */
.driver-active-element {
    box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.3), 
                0 0 30px rgba(0, 200, 83, 0.2) !important;
    border-radius: 12px !important;
    z-index: 100000 !important;
}

/* Animación de entrada */
@keyframes driver-popover-slide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.driver-popover.call-evaluator-theme {
    animation: driver-popover-slide 0.3s ease-out;
}