:root {
    --bg-dark: #07090e;
    --bg-card: rgba(15, 23, 42, 0.55);
    --border-color: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(255, 255, 255, 0.28);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --purple-glow: rgba(139, 92, 246, 0.35);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --purple: #8b5cf6;
    --amber: #f59e0b;
    --cyan: #06b6d4;
    --indigo: #6366f1;
    --green: #22c55e;
    --danger: #ef4444;
    
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 26px;
    --radius-pill: 9999px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.55;
    position: relative;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Background Ambient Glows */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}
.bg-glow-1 {
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(0,0,0,0) 70%);
}
.bg-glow-2 {
    top: 300px;
    right: -150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(0,0,0,0) 70%);
}

/* VIDEO DE FONDO PERMANENTE EN TODA LA PLATAFORMA */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: #000;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: contrast(1.05) brightness(0.88);
}

.video-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(7, 9, 14, 0.35) 0%, rgba(7, 9, 14, 0.85) 100%);
    pointer-events: none;
}

/* PANTALLA DE BIENVENIDA (LANDING PRE-LOGIN) */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1200;
    padding: 60px 24px;
    overflow: hidden;
}

.welcome-content-minimal {
    max-width: 720px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    z-index: 10;
    margin-bottom: 20px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.welcome-badge-glass {
    padding: 6px 20px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.welcome-hero-title {
    font-family: var(--font-serif);
    font-size: 3.8rem;
    font-weight: 400;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.9);
}
.welcome-hero-title i {
    font-style: italic;
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-hero-subtitle {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 580px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

.welcome-actions { width: 100%; display: flex; justify-content: center; margin-top: 6px; }

.glass-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.glass-pill-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 50px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.pill-arrow { font-size: 1.2rem; transition: transform 0.25s ease; }
.glass-pill-btn:hover .pill-arrow { transform: translateX(6px); }

.welcome-footer-subtle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
}

/* PANTALLA DE LOGIN ULTRA-FUTURISTA CON CRISTALES */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    background: rgba(7, 9, 14, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.glass-panel-ultra {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-card-futuristic {
    width: 100%;
    max-width: 460px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-header { text-align: center; }
.brand-badge-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.serif-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.15;
    color: #fff;
}
.serif-title i {
    font-style: italic;
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-quick-selector { display: flex; flex-direction: column; gap: 8px; }
.selector-title { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.role-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-role-glass {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.btn-role-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}
.btn-role-glass.active {
    background: rgba(99, 102, 241, 0.22);
    border-color: #6366f1;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.role-icon { font-size: 1.2rem; }
.role-info strong { display: block; font-size: 0.85rem; }
.role-info small { font-size: 0.7rem; color: var(--text-muted); }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

.form-input-pill {
    width: 100%;
    padding: 14px 22px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}
.form-input-pill:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #8b5cf6;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}

.login-error { color: var(--danger); font-size: 0.82rem; text-align: center; }

.btn-pill-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 26px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
}
.btn-pill-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(139, 92, 246, 0.65);
}

/* BOTONES GLOBALES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.88rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    backdrop-filter: blur(16px);
}
.btn-primary { background: rgba(59, 130, 246, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-primary:hover { background: #3b82f6; transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); }
.btn-emerald { background: rgba(16, 185, 129, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-emerald:hover { background: #10b981; transform: translateY(-2px); box-shadow: 0 8px 24px var(--emerald-glow); }
.btn-indigo { background: rgba(99, 102, 241, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-indigo:hover { background: #6366f1; transform: translateY(-2px); }
.btn-green { background: rgba(34, 197, 94, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-green:hover { background: #22c55e; transform: translateY(-2px); }
.btn-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-icon { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius-pill); padding: 10px 14px; cursor: pointer; color: var(--text-main); }

/* DASHBOARD MAIN LAYOUT */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* HEADER INSTITUCIONAL */
.glass-header {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.brand h1 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.1;
    color: #ffffff;
}
.subtitle { font-size: 0.88rem; color: var(--text-muted); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
}
.user-avatar { font-size: 1.2rem; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 0.85rem; font-weight: 700; }
.user-role-label { font-size: 0.68rem; color: var(--text-muted); }

.academic-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.academic-item .label { color: var(--text-muted); margin-right: 4px; }
.divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.15); }

.status-banner {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(16px);
}
.status-info { background: rgba(59, 130, 246, 0.2); border: 1px solid var(--primary); color: #93c5fd; }
.status-success { background: rgba(16, 185, 129, 0.2); border: 1px solid var(--emerald); color: #6ee7b7; }
.status-error { background: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger); color: #fca5a5; }

/* SELECTOR DE MUNICIPIOS */
.controls-section { display: flex; flex-direction: column; gap: 14px; }
.section-title h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: #fff;
}
.section-title p { font-size: 0.85rem; color: var(--text-muted); }

.city-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 12px;
}
.city-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
}
.city-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.city-chip.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}
.city-flag { font-size: 1.2rem; }

/* KPIS DE CRISTAL */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}
.kpi-card {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: var(--transition);
}
.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 45px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}
.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.icon-blue { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.3); }
.icon-purple { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.3); }
.icon-emerald { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); }
.icon-amber { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(245, 158, 11, 0.3); }

.kpi-content { display: flex; flex-direction: column; }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1;
    margin: 4px 0 2px 0;
    color: #ffffff;
}
.kpi-sub { font-size: 0.75rem; color: var(--text-muted); }

/* SECCIÓN DE PREGUNTAS Y CONCLUSIONES CON FORMATO LIMPIO DE PUNTOS */
.analysis-section { display: flex; flex-direction: column; gap: 24px; }
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}
.question-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(16px);
}
.q-badge {
    align-self: flex-start;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    font-size: 0.72rem;
    font-weight: 700;
}
.question-card h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
}

/* LISTAS LIMPIAS EN PUNTOS PARA LECTURA RÁPIDA */
.clean-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.88rem;
    color: #cbd5e1;
}
.clean-bullet-list li {
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
}
.clean-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #a5b4fc;
    font-size: 1.1rem;
    top: -2px;
}
.clean-bullet-list li strong {
    color: #ffffff;
    font-weight: 700;
}
.bullet-highlight {
    background: rgba(99, 102, 241, 0.15);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border-left: 3px solid #8b5cf6;
    margin-top: 2px;
}

/* CONCLUSIONES ESTRUCTURADAS CON TÍTULO DE CABECERA Y PUNTOS */
.conclusions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.conclusions-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: #a5b4fc;
}
.conclusions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 18px;
}
.conclusion-card {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}
.conclusion-card:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
}
.c-header-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}
.c-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.c-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.2;
}

/* GRUPOS DE GRÁFICOS */
.charts-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.group-header h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: #fff;
}
.group-header p { font-size: 0.88rem; color: var(--text-muted); }

.complementary-group {
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.glass-panel {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.primary-chart {
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}
@media (max-width: 768px) {
    .charts-section { grid-template-columns: 1fr; }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.card-header h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: #fff;
}

.badge { padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.08); font-size: 0.75rem; color: var(--text-muted); }
.badge-primary { padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(59, 130, 246, 0.25); border: 1px solid rgba(59, 130, 246, 0.4); color: #60a5fa; font-size: 0.75rem; font-weight: 700; }
.badge-accent { padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(139, 92, 246, 0.25); border: 1px solid rgba(139, 92, 246, 0.4); color: #c084fc; font-size: 0.75rem; font-weight: 600; }
.badge-brand { padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(139, 92, 246, 0.2); color: #c084fc; font-size: 0.75rem; font-weight: 600; }
.badge-green { padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(16, 185, 129, 0.2); color: #34d399; font-size: 0.75rem; font-weight: 600; }
.badge-red { padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(239, 68, 68, 0.2); color: #fca5a5; font-size: 0.75rem; font-weight: 600; }

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* TABLAS CRISTALINAS */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}
.data-table th {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.filter-controls { display: flex; gap: 12px; flex-wrap: wrap; }

.search-input, .select-input {
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}
.search-input:focus, .select-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* MODAL DE CRISTAL GOOGLE SHEETS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: 20px;
    background: rgba(7, 9, 14, 0.7);
    backdrop-filter: blur(24px);
}
.modal-card {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
}
.modal-body { display: flex; flex-direction: column; gap: 16px; font-size: 0.88rem; }
.modal-options { display: flex; flex-direction: column; gap: 12px; }

.option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
}
.opt-icon { font-size: 1.6rem; }
.opt-text { display: flex; flex-direction: column; flex: 1; }
.opt-text strong { font-size: 0.9rem; }
.opt-text small { font-size: 0.78rem; color: var(--text-muted); }

.modal-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}
.modal-alert-success { background: rgba(16, 185, 129, 0.2); border: 1px solid var(--emerald); color: #6ee7b7; }
.modal-alert-error { background: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger); color: #fca5a5; }

.app-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
