/**
 * 🏰 FORTALEZA PRISMAS - SISTEMA DE DISEÑO MAESTRO V3.5
 * Autor: Edinson J. Hernández
 * 🛡️ PROTEGIDO: Registro DNDA - Ley 23 de 1982.
 * ESTADO: REPARADO - Legibilidad y Contraste Premium
 */

:root {
    --primary-color: #602897;
    --secondary-color: #ffa718;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-blur: blur(30px);
    --shadow-main: 0 40px 80px -15px rgba(0, 0, 0, 0.4);
    --font-main: 'Segoe UI', system-ui, sans-serif;
    --text-white: #ffffff;
    --text-dark: #1e1b4b;
}

/* --- ESTRUCTURA BASE --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, html {
    height: 100%; margin: 0; padding: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: var(--font-main);
    min-height: 100vh; overflow-x: hidden;
    background: transparent !important; 
}

/* 🌆 Fondo Original Cobertura Total */
.bg-prismas {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(96, 40, 151, 0.45), rgba(138, 3, 140, 0.45)), 
                url('https://prismascolombia.com/storage/img/fondo_prismas.png');
    background-size: cover; background-position: center;
    z-index: -1; filter: blur(5px); transform: scale(1.1);
}

/* --- TARJETA (Ancho Dinámico Solicitado) --- */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 40px; 
    padding: 3rem 2.5rem;
    width: 90%; 
    max-width: 440px; /* Base móvil */
    box-shadow: var(--shadow-main);
    text-align: center; z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 🖥️ Ajuste PC / TV (960px) */
@media (min-width: 1024px) {
    .login-card {
        max-width: 960px; /* Tu ancho solicitado */
        padding: 4rem 6rem;
    }
    .logo-main { width: 320px; }
    h1 { font-size: 2rem; }
}

/* --- COMPONENTES --- */
.logo-main {
    width: 240px; max-width: 80%;
    margin-top: -30px; margin-bottom: -10px;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
}

h1 {
    font-size: 1.4rem; color: var(--text-white); margin-bottom: 0.5rem;
    font-weight: 800; text-transform: uppercase;
    text-shadow: 0 3px 10px rgba(0,0,0,0.4); /* Sombra reforzada */
}

.form-group { margin-bottom: 1.5rem; text-align: left; }

/* 🛡️ BLINDAJE DE ETIQUETAS (Legibilidad Blanco Puro) */
label { 
    display: block; 
    margin-bottom: 8px; 
    color: #ffffff !important; /* Forzado a blanco puro */
    font-size: 0.9rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 🖋️ ENTRADAS DE DATOS MEJORADAS */
input {
    width: 100%; padding: 18px 22px; border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.98) !important; /* Blanco sólido para lectura perfecta */
    font-size: 17px; 
    color: var(--text-dark) !important;
    font-weight: 700;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 5px rgba(255, 167, 24, 0.3);
    background: #ffffff !important;
    transform: translateY(-2px);
}

input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.btn-login {
    width: 100%; padding: 18px; 
    background: linear-gradient(135deg, var(--primary-color) 0%, #4c1d95 100%) !important; 
    color: var(--text-white) !important; 
    border: none; border-radius: 18px;
    font-size: 1.1rem; font-weight: 900; cursor: pointer;
    transition: 0.3s; text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(96, 40, 151, 0.3);
}

.btn-login:hover { 
    background: var(--secondary-color) !important; 
    color: var(--text-dark) !important;
    transform: translateY(-3px); 
    box-shadow: 0 15px 30px rgba(255, 167, 24, 0.4);
}

/* --- SECCIÓN OPCIONES --- */
.access-options {
    margin-top: 25px; display: flex; justify-content: space-between;
    align-items: center; font-size: 0.85rem; color: #ffffff !important;
}

.remember-me { 
    display: flex; align-items: center; gap: 8px; cursor: pointer; 
    font-weight: 600; white-space: nowrap; color: #ffffff !important; 
}

/* Estilo para el checkbox */
.remember-me input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--secondary-color);
    cursor: pointer;
}

.forgot-pass { 
    color: #ffffff !important; text-decoration: none; 
    font-weight: 700; border-bottom: 2px solid rgba(255,255,255,0.3); 
    white-space: nowrap; 
    transition: all 0.3s ease;
}

.forgot-pass:hover { 
    color: var(--secondary-color) !important;
    border-bottom-color: var(--secondary-color); 
}

.footer-credits {
    margin-top: 15px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 12px;
}

.dev-link { color: var(--secondary-color); font-weight: 800; text-decoration: none; }

/* 📲 BANNERS PWA */
.app-banner {
    display: none; 
    position: fixed; bottom: 20px; width: 90%; max-width: 400px;
    background: rgba(255, 255, 255, 0.95); border-radius: 20px;
    padding: 15px; color: #333; text-align: center; z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.icon-footer { margin: 20px 0; width: 75px; height: auto; animation: floating 4s infinite ease-in-out; }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

@media (max-width: 480px) {
    .access-options { flex-direction: column; gap: 15px; }
    .login-card { padding: 2.5rem 1.5rem; }
}

/* ==========================================================================
   🏰 PARTE 1: ARQUITECTURA INTEGRADA - FORTALEZA PRISMAS V13.8
   ========================================================================== */
:root {
    --p-purple: #602897;
    --p-orange: #ffa718;
    --p-dark: #1e1b4b;
    --p-bg: #f4f7fe;
    --white: #ffffff;
    
    --primary-color: var(--p-purple);
    --secondary-color: var(--p-orange);
    --font-main: 'Segoe UI', system-ui, sans-serif;
}

/* 1. SCROLL UNIFICADO: Menú y Bloques suben juntos */
body.dashboard-body {
    margin: 0; 
    padding: 0; 
    background: var(--p-bg);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-y: auto; /* El scroll lo maneja el body para que todo suba junto */
    overflow-x: hidden;
}

.dashboard-wrapper {
    display: flex; 
    width: 100%;
    min-height: 100vh;
    align-items: stretch; /* Asegura que el sidebar crezca con el contenido */
}

/* 2. SIDEBAR PC: Ahora fluye con el scroll (position: relative) */
.sidebar-prismas {
    width: 280px; 
    min-width: 280px; 
    background: var(--p-dark);
    position: relative; /* CAMBIO CLAVE: No es fijo, sube con la página */
    display: flex; 
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0,0,0,0.1); 
    z-index: 1000;
}

/* 3. ÁREA DE CONTENIDO */
.main-content-area {
    flex: 1; 
    min-width: 0; 
    background: var(--p-bg);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 4. 📱 DIFERENCIACIÓN CORPORATIVA EN CELULARES */
@media (max-width: 1024px) {
    .dashboard-wrapper {
        flex-direction: column; /* Apilado para móvil */
    }

    .sidebar-prismas {
        width: 100%;
        min-width: 100%;
        height: auto;
        /* Graduación corporativa para diferenciar el menú del resto */
        background: linear-gradient(135deg, var(--p-dark) 0%, #2e2a6e 100%);
        border-bottom: 4px solid var(--p-orange); /* Acento visual Prismas */
    }

    /* Botón de Menú con el color Morado derivado */
    .mobile-toggle-btn {
        display: block !important;
        background: var(--p-purple) !important;
        color: var(--white) !important;
        padding: 18px;
        text-align: center;
        font-weight: 800;
        text-transform: uppercase;
        border: none;
        width: 100%;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

    /* En móvil el menú sí se queda arriba mientras bajas */
    .sidebar-prismas {
        position: sticky;
        top: 0;
        z-index: 2000;
    }
    
    /* El logo en móvil se ajusta para no ocupar tanto espacio vertical */
    .brand-logo {
        max-width: 320px !important;
        padding: 10px 0;
        margin-top: -35px;
        margin-bottom: -25px;
    }
}

/* Contenedor de Fluidez */
.container-fluid {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}



/* ==========================================================================
   🏰 PARTE 2: NAVEGACIÓN ELÁSTICA - FORTALEZA PRISMAS
   BLOQUEO: Sin botón en PC | Títulos Naranjas | Scroll Infinito
   ========================================================================== */

/* --- 1. SIDEBAR CORE (FLUJO TOTAL PC) --- */
.sidebar-prismas {
    width: 280px;
    min-width: 280px;
    background: var(--p-dark);
    display: flex;
    flex-direction: column;
    position: relative; 
    border-right: 1px solid rgba(255,255,255,0.05);
}

/* --- 2. HEADER CON SEPARADOR DEGRADADO --- */
.sidebar-brand { 
    padding: 30px 20px; 
    text-align: center; 
}

.brand-logo { 
    width: 100%; 
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4)); 
}

/* Línea divisoria elegante */
.sidebar-brand::after {
    content: "";
    display: block;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--p-orange), transparent);
    margin: 20px auto 0;
}

/* --- 3. 🚫 BLOQUEO DE BOTÓN "MENU" EN PC --- */
.mobile-toggle-btn {
    display: none !important; /* SE OCULTA EN PC */
}

/* --- 4. TÍTULOS Y ENLACES (ESTILO PREMIUM) --- */
.sidebar-nav-scroll { 
    flex: 1; 
    padding-bottom: 30px;
    overflow: visible; /* Todo el menú visible al bajar en PC */
}

.section-label { 
    display: block; 
    padding: 30px 25px 12px; 
    font-size: 0.75rem; 
    color: var(--p-orange) !important; /* Naranja destacado solicitado */
    font-weight: 900; 
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 32px;
    color: var(--white);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(96, 40, 151, 0.4) 0%, transparent 100%);
    color: var(--white);
    border-left: 5px solid var(--p-orange);
}

/* --- 📱 5. COMPORTAMIENTO PARA MÓVILES Y TABLETS --- */
@media (max-width: 1024px) {
    .sidebar-prismas {
        width: 100%;
        min-width: 100%;
        height: auto;
    }

    /* En móvil/tablet SÍ aparece el botón para ahorrar espacio */
    .mobile-toggle-btn {
        display: flex !important;
        background: var(--p-purple) !important;
        color: white;
        padding: 18px;
        justify-content: center;
        align-items: center;
        font-weight: 900;
        text-transform: uppercase;
        border: none;
        width: 100%;
        cursor: pointer;
    }

    .sidebar-nav-scroll {
        display: none; /* Se activa con .active mediante tu JS */
        width: 100%;
        height: auto; 
        background: rgba(0,0,0,0.2);
    }

    .sidebar-prismas.active .sidebar-nav-scroll {
        display: block !important;
        height: auto !important; 
    }
}

/* 6. PIE DE PÁGINA (LOGOUT) */
.sidebar-footer { 
    padding: 20px 0;
    margin-top: auto;
}

.logout { 
    color: #ff5c5c !important;
    font-weight: 800;
    border-top: 1px solid rgba(255,255,255,0.1);
}




/* ==========================================================================
   🏰 BLOQUE 3: DASHBOARD PRISMAS - VERSIÓN MAESTRA FINAL (CON LATIDO)
   ESTADO: Alineación Izquierda | Radar Infinito | 100% Fluido Móvil
   ========================================================================== */

:root {
    --p-purple: #602897;
    --p-orange: #ffa718;
    --p-dark: #1e1b4b;
    --p-silver: #94a3b8;
    --p-red: #ef4444;
    --p-online: #10b981;
}

/* 1. CABECERA (Consola + Online a la Izquierda | Año a la Derecha) */
.dashboard-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 15px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
}

/* Contenedor Título + Pill Online */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 950;
    color: var(--p-purple) !important;
    text-transform: uppercase;
    margin: 0;
}

/* BOTÓN ONLINE CON EFECTO DE LATIDO */
.status-pill {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre punto y texto */
    background: #f0fdf4;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid #dcfce7;
}

/* El punto verde con animación de latido */
.pulse-dot {
    width: 10px;
    height: 10px;
    min-width: 10px; /* Evita que se encoja */
    background: var(--p-online);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0; /* Asegura posición izquierda */
    animation: heartbeat 1.5s ease-in-out infinite;
    margin-bottom: -16px;
}

/* La onda expansiva (Radar) corregida */
.pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--p-online);
    border-radius: 50%;
    animation: radar_pulse 2s infinite ease-out;
}

@keyframes heartbeat {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.15); }
    100% { transform: scale(0.95); }
}

@keyframes radar_pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}

.status-txt {
    color: var(--p-online);
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    animation: glow_online 2s infinite alternate;
    margin-left: 20px;
}

@keyframes glow_online {
    from { opacity: 0.8; }
    to { opacity: 1; text-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
}

/* 2. BLOQUE PERIODO FISCAL (DISEÑO DERECHA) */
/* 📦 Contenedor (Tu estilo original de cápsula) */
.year-filter-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 5px 5px 5px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

/* 🛡️ Label Protegido (Aquí estaba el fallo, ahora es inmune) */
.year-filter-box .label-fiscal-prismas {
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    color: #602897 !important; /* Tu Púrpura Imperial */
    text-transform: uppercase !important;
    margin: 0 !important;
    white-space: nowrap; /* Evita que el texto se parta en dos líneas */
}

/* 🔘 Select (Tu estilo de botón púrpura) */
.custom-select {
    background: #602897 !important; /* Usando el color directo o var(--primary-color) */
    color: #fff !important;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* 3. MÉTRICAS (KPI GRID) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

.kpi-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 25px;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kpi-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(30, 27, 75, 0.1);
}

.kpi-info small {
    display: block;
    color: var(--p-silver) !important;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.kpi-card h2 {
    font-size: 2.5rem;
    font-weight: 950;
    margin: 10px 0;
    letter-spacing: -1.5px;
    transition: 0.4s;
}

.kpi-card:hover h2 { transform: scale(1.1); }

/* --- SINCRONIZACIÓN DE COLORES --- */
.purple-kpi h2 { color: var(--p-purple); }
.purple-kpi .kpi-status { background: #f3e8ff; color: var(--p-purple); }

.orange-kpi h2 { color: var(--p-orange); }
.orange-kpi .kpi-status { background: #fff7ed; color: var(--p-orange); }

.red-kpi h2 { color: var(--p-red); }
.red-kpi .kpi-status-danger, .red-kpi .kpi-status { background: #fef2f2; color: var(--p-red); }

.kpi-status, .kpi-status-danger {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

/* 4. OPTIMIZACIÓN MÓVIL (100% FLUIDO) */
@media (max-width: 768px) {
    .dashboard-header-modern {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-radius: 0;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .header-left { 
        width: 100%; 
        flex-direction: column;
        gap: 10px;
    }

    .header-right { width: 100%; }
    .year-filter-box { width: 100%; justify-content: space-between; }

    .kpi-grid { grid-template-columns: 1fr; gap: 15px; }
    .kpi-card { text-align: center; }
}






/* ==========================================================================
   📱 FIX CRÍTICO PARA CELULARES
   ========================================================================== */
@media (max-width: 1024px) {
    /* Cabecera: Apilado vertical para que no se encime */
    .dashboard-header-modern {
        flex-direction: column;
        padding: 25px;
        gap: 20px;
        text-align: center;
        border-radius: 0 0 24px 24px; /* Ajuste estético para móvil */
    }

    .header-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* El filtro de año ocupa todo el ancho para ser legible */
    .year-filter-box {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .custom-select {
        width: auto;
        min-width: 120px;
    }

    /* KPI Grid: Una sola columna para que el número 2.8rem quepa bien */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .kpi-card {
        padding: 25px;
    }

    .kpi-card .kpi-info h2 {
        font-size: 2.4rem; /* Reducción mínima para pantallas pequeñas */
    }
}









/* ==========================================================================
   🌌 BLOQUE 4: RENDIMIENTO COMERCIAL MAESTRO
   Características: Animación de Crecimiento, Vista Dual & Colores Corporativos
   ========================================================================== */

.chart-section {
    background: radial-gradient(circle at top, #2e1a47 0%, #1e1b4b 100%);
    padding: 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 167, 24, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Título Futurista con Glow Naranja */
.chart-section .card-header h3 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--p-orange);
    text-shadow: 0 0 15px rgba(255, 167, 24, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.chart-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 320px;
    padding: 20px 0;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Ocultar scrollbar para estética de consola */
.chart-wrapper::-webkit-scrollbar { display: none; }

.chart-item {
    flex: 1;
    min-width: 65px; /* Base para PC */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Valores (45M, etc) con micro-animación */
.bar-val {
    font-size: 0.75rem;
    font-weight: 900;
    color: #fff;
    background: rgba(96, 40, 151, 0.8);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 167, 24, 0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.bar-track {
    width: 40px;
    height: 230px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* --- 🔥 LÓGICA DE ANIMACIÓN DE CRECIMIENTO --- */
.bar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, var(--p-purple) 0%, var(--p-orange) 100%);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(96, 40, 151, 0.6);
    
    /* Punto de anclaje en la base para el crecimiento */
    transform-origin: bottom;
    /* Transición inicial de carga */
    transition: height 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animación al pasar el mouse: Crecimiento desde CERO */
.chart-item:hover .bar-fill {
    animation: cyberGrow 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: brightness(1.2);
    box-shadow: 0 0 30px rgba(255, 167, 24, 0.5);
}

.chart-item:hover .bar-val {
    background: var(--p-orange);
    color: var(--p-dark);
    transform: translateY(-5px) scale(1.1);
}

@keyframes cyberGrow {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

.bar-label {
    margin-top: 15px;
    font-weight: 800;
    font-size: 0.75rem;
    color: #fff;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 📱 AJUSTE QUIRÚRGICO MÓVIL (6 MESES VISIBLES) */
@media (max-width: 1024px) {
    .chart-item {
        min-width: calc(100% / 5.5); /* Fuerza el scroll lateral */
    }
    
    .chart-section {
        padding: 25px 15px;
        border-radius: 20px;
    }

    .chart-section .card-header h3 {
        font-size: 1.1rem;
    }
}






/* =============================================
   BLOQUE 5: PRISMAS DATA PRECISION (V4.2 - SUPREMO)
   EDICIÓN: Efectos Neón & Background Icons
   ESTADO: Reparado (Porcentajes a la derecha)
   ============================================= */

.intel-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.intel-card {
    background: rgba(15, 12, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

/* Efecto Emoji de Fondo con Transparencia - MANTENIDO */
.intel-card::after {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 5rem;
    opacity: 0.05;
    filter: grayscale(1);
    z-index: -1;
    transition: 0.4s;
}

.intel-card:nth-child(1)::after { content: '📅'; }
.intel-card:nth-child(2)::after { content: '💳'; }
.intel-card:nth-child(3)::after { content: '🏆'; opacity: 0.08; filter: none; }

.intel-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 157, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.intel-card:hover::after {
    transform: scale(1.2) rotate(-10deg);
    opacity: 0.15;
}

.intel-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.intel-title-sm {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intel-subtext {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.9rem;
    font-weight: 800;
    color: #00ff9d;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
    margin: 8px 0;
}

/* 📊 BARRAS NEÓN DINÁMICAS - REPARADO: POSICIÓN DE NÚMEROS */
.p-bar-container { margin-top: 15px; }

.p-item {
    display: flex; /* Cambiado a flex para control total del flujo horizontal */
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.p-name { color: #cbd5e1; font-size: 0.7rem; font-weight: 700; }

/* Forzamos que el porcentaje esté siempre en la última columna */
.p-perc { 
    color: #00ff9d; 
    font-size: 0.75rem; 
    font-weight: 800; 
    width: 45px; /* Ancho fijo para el número */
    text-align: right;
    flex-shrink: 0;
}

.p-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.03);
    flex-grow: 1; /* La barra toma todo el espacio central */
}

.p-bar-fill {
    height: 100%;
    width: 0%; 
    border-radius: 20px;
    background: linear-gradient(90deg, #00ff9d, #00b8ff);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.4);
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.intel-card:hover .p-bar-fill {
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.6);
}

/* 🏆 AGENTE ORO SUPREMO - MANTENIDO TU EFECTO ORIGINAL */
.agente-nombre {
    font-size: 1.8rem;
    font-weight: 950 !important; 
    background: linear-gradient(
        to right, 
        #bf953f 0%, 
        #fcf6ba 25%, 
        #b38728 50%, 
        #fcf6ba 75%, 
        #bf953f 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineGold 3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(184, 134, 11, 0.3));
    margin: 5px 0;
    display: block;
}

@keyframes shineGold {
    to { background-position: 200% center; }
}

.intel-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 255, 157, 0.03) 0%, transparent 70%);
    pointer-events: none;
}



/* ==========================================================================
    🛠️ PARTE 6: COMPONENTES DE ACCIÓN (BOTONES Y TABLAS)
    ESTADO: SUPREMO - Optimizado para Motor V36.5
   ========================================================================== */

/* Contenedor de botones en la celda */
.action-cell {
    width: 220px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* Botón Editar (Efecto Oro Prisma) */
.btn-edit {
    background: rgba(255, 167, 24, 0.08);
    color: #ffa718; 
    border: 1px solid rgba(255, 167, 24, 0.25);
    padding: 7px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.btn-edit:hover {
    background: #ffa718;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 167, 24, 0.35);
    border-color: #ffa718;
}

/* Botón Eliminar (Efecto Sangre) */
.btn-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444; 
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 7px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-delete:hover {
    background: #ef4444;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
}

/* --- TABLA MODERNA (EL ESQUELETO) --- */
.ui-modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px; 
    margin-top: -10px;
}

.ui-modern-table tbody tr {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.ui-modern-table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    z-index: 5;
    position: relative;
}

.ui-modern-table td {
    padding: 15px;
    border: none;
    font-size: 0.9rem;
    color: #475569;
}

.id-badge {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 8px;
    color: #1e293b;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

/* REPARACIÓN DE BÓVEDA: POSICIONAMIENTO DEL MODAL */
.modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75); /* Slate-900 con opacidad */
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999 !important;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 95%;
    max-width: 600px;
    max-height: 90vh; /* Seguridad para pantallas pequeñas */
    overflow-y: auto; /* Scroll interno si el form es largo */
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
    🏰 BLOQUE 7: MATRIZ DE GESTIÓN (EFECTO CYBER-DYNAMIC)
    Estado: OPTIMIZADO - Recto en reposo, Giro tecnológico en Hover
   ========================================================================== */

.management-matrix {
    margin-top: 25px;
    padding-bottom: 80px;
}

.matrix-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--p-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

/* Estilo Base del Tile */
.matrix-tile {
    background: #ffffff;
    padding: 40px 20px;
    border-radius: 32px;
    text-align: center;
    cursor: pointer;
    /* Transiciones específicas para suavidad total */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease,
                border-color 0.3s ease;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    /* Estabilización de hardware */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animación de Elevación del Tile */
.matrix-tile:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(96, 40, 151, 0.15);
}

/* Iconos/Emojis: Rectos por defecto */
.matrix-tile i {
    font-size: 3rem;
    display: block;
    font-style: normal;
    /* El truco está en una transición elástica para el giro */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05));
    transform: rotate(0deg) scale(1); /* Siempre recto al inicio */
}

/* EFECTO DINÁMICO: Giro y Escala al poner el mouse */
.matrix-tile:hover i {
    /* Giro tecnológico de 8 grados y aumento de tamaño */
    transform: scale(1.2) rotate(8deg); 
}

/* Texto del Módulo */
.matrix-tile span {
    font-weight: 850;
    font-size: 1rem;
    color: #1e293b;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

/* --- 🎨 CATEGORIZACIÓN CYBER-GLOW --- */

.acad-tile:hover { 
    border-color: var(--p-purple);
    border-bottom: 6px solid var(--p-purple); 
}
.acad-tile:hover i { filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.4)); }

.mkt-tile:hover { 
    border-color: var(--p-orange);
    border-bottom: 6px solid var(--p-orange);
}
.mkt-tile:hover i { filter: drop-shadow(0 0 15px rgba(255, 167, 24, 0.4)); }

.sys-tile:hover { 
    border-color: #1e1b4b;
    border-bottom: 6px solid #1e1b4b;
}

/* 📱 AJUSTES MÓVIL */
@media (max-width: 1024px) {
    .tiles-container {
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    .matrix-tile:hover i {
        transform: scale(1.15) rotate(5deg); /* Giro más leve en móvil */
    }
}



/* ==========================================================================
    🏰 BLOQUE 8: VIEWPORT DE DATOS (REFORZADO V19.0)
    Sincronizado con: fetch_table, save_data y motores dinámicos
    ESTADO: SUPREMO - Optimizado para Motor V36.5
   ========================================================================== */

.ajax-viewport { 
    animation: fadeInSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1); 
    width: 100%;
}

/* 1. CABECERA MAESTRA (BUSCADOR + ACCIONES) */
.table-ui-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 30px; 
    padding: 0 5px; 
    flex-wrap: wrap; 
    gap: 20px;
}

/* Contenedor del Buscador Pro */
.search-container-pro {
    position: relative;
    flex: 1;
    max-width: 450px;
}

/* Icono de lupa inyectado por CSS o FontAwesome */
.search-container-pro::before {
    content: '🔍';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    z-index: 10;
    opacity: 0.5;
}

#table-search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    background: #ffffff;
    border: 2px solid #f1f5f9 !important;
    border-radius: 20px;
    font-weight: 700;
    color: var(--p-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

#table-search-input:focus {
    border-color: var(--p-purple) !important;
    box-shadow: 0 12px 25px rgba(124, 58, 237, 0.12);
    outline: none;
    transform: translateY(-2px);
}

/* 2. ARQUITECTURA DE TABLA DINÁMICA (GLASS CONTAINER) */
.ui-scroll-container {
    width: 100%; 
    overflow-x: auto; 
    background: #ffffff; 
    border-radius: 35px;
    padding: 25px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.04); 
    border: 1px solid rgba(241, 245, 249, 0.8);
}

.ui-modern-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 10px; /* Filas separadas para efecto Card */
}

.ui-modern-table th { 
    padding: 15px 25px; 
    text-align: left; 
    font-size: 0.75rem; 
    color: #64748b; 
    text-transform: uppercase; 
    font-weight: 900; 
    letter-spacing: 1.5px;
}

.ui-modern-table td { 
    padding: 15px 25px; 
    background: #ffffff; 
    font-weight: 700; 
    color: var(--p-dark); 
    vertical-align: middle; 
    border-top: 1px solid #f8fafc;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

/* Efecto Premium en Filas */
.ui-modern-table tr:hover td {
    background: #fdfaff; /* Sutil toque púrpura */
    border-color: #e2e8f0;
}

/* Curvatura de las celdas laterales */
.ui-modern-table td:first-child { border-left: 1px solid #f8fafc; border-radius: 20px 0 0 20px; }
.ui-modern-table td:last-child { border-right: 1px solid #f8fafc; border-radius: 0 20px 20px 0; }

/* 3. SOPORTE MULTIMEDIA (Miniaturas de Usuario/Documentos) */
.img-table-thumb {
    width: 45px; 
    height: 45px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: zoom-in;
}

.img-table-thumb:hover { 
    transform: scale(2.8); 
    z-index: 50; 
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* 4. ESTADOS Y PILLS (Categorización rápida) */
.status-pill { 
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* 📱 5. BLINDAJE MÓVIL (VISTA DE CARTAS APP) */
@media (max-width: 1024px) {
    .ui-modern-table thead { display: none; } 
    
    .ui-modern-table tr { 
        display: block; 
        background: #fff; 
        margin-bottom: 20px; 
        border-radius: 25px; 
        border: 1px solid #f1f5f9;
        box-shadow: 0 8px 20px rgba(0,0,0,0.02);
        overflow: hidden;
    }

    .ui-modern-table td { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        padding: 14px 20px !important;
        border: none !important;
        font-size: 0.9rem;
    }

    .ui-modern-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .ui-modern-table td:first-child {
        background: #f8fafc;
        border-bottom: 1px solid #f1f5f9 !important;
        justify-content: center;
        font-size: 1rem;
        color: var(--p-purple);
    }
    
    .action-cell {
        width: 100% !important;
        justify-content: center !important;
        gap: 15px;
        background: #fdfaff;
    }
}

.ajax-viewport { 
    animation: fadeInSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1); 
    width: 100%;
}

.table-ui-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 30px; 
    flex-wrap: wrap; 
    gap: 20px;
}

/* 🚀 BOTÓN "+ NUEVO" (NARANJA SECUNDARIO - ACCIÓN POSITIVA) */
.btn-add-pro {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e68a00 100%);
    color: var(--text-dark) !important; /* Texto oscuro para contraste con naranja */
    border: none;
    padding: 12px 28px;
    border-radius: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 167, 24, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-add-pro:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 167, 24, 0.45);
    filter: brightness(1.1);
}

/* ⬅️ BOTÓN "VOLVER AL PANEL" (REFORZADO) */
.viewport-header .btn-back-master {
    background: var(--primary-color) !important;
    color: var(--text-white) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    padding: 12px 25px !important;
    border-radius: 18px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(96, 40, 151, 0.2) !important;
    outline: none !important;
}

.viewport-header .btn-back-master:hover {
    background: #4c1d95 !important; /* Púrpura más profundo */
    transform: translateX(-8px) !important; /* Efecto retroceso visual */
    box-shadow: 0 12px 25px rgba(96, 40, 151, 0.4) !important;
    color: #ffffff !important;
}

/* 2. ARQUITECTURA DE TABLA (GLASS CONTAINER) */
.ui-scroll-container {
    width: 100%; 
    overflow-x: auto; 
    background: #ffffff; 
    border-radius: 35px;
    padding: 25px; 
    box-shadow: var(--shadow-main); /* Usando tu variable de sombra */
    border: 1px solid #f1f5f9;
}

#table-search-input {
    padding: 14px 20px 14px 50px;
    border: 2px solid #f1f5f9;
    border-radius: 20px;
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--text-dark);
}

#table-search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 12px 25px rgba(96, 40, 151, 0.15);
    outline: none;
}

/* 📱 5. BLINDAJE MÓVIL */
@media (max-width: 1024px) {
    .table-ui-header {
        flex-direction: column;
        gap: 15px;
    }
    .btn-add-pro, .btn-back-master {
        width: 100%;
        justify-content: center;
    }
}





/* ==========================================================================
    🏰 BLOQUE 9: SISTEMA DE MODALES (GHOST-GLASS DESIGN V20.0)
    ESTADO: SUPREMO - Blindaje de botones y renderizado Pro
   ========================================================================== */

/* 1. Capa de Fondo (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 12, 41, 0.6); 
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Bajamos un punto para dar margen */
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
    /* REPARACIÓN MAESTRA: Evita que bloquee clics si no está activo */
    pointer-events: none; 
}

.modal-overlay.active { 
    display: flex; 
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Solo recibe clics cuando está activo */
}

/* 2. Contenedor (La Bóveda) */
.modal-content {
    background: #ffffff;
    width: 95%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 40px; 
    padding: 45px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.4);
    position: relative;
    transform: scale(0.85) translateY(40px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    scrollbar-width: thin; 
    scrollbar-color: var(--p-purple) #f1f5f9;
}

.modal-overlay.active .modal-content { 
    transform: scale(1) translateY(0); 
}

/* 3. Cabecera (Sticky Header) */
.modal-header {
    position: sticky;
    top: -45px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 101;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 10px 0 25px 0;
    border-bottom: 2px solid #f1f5f9;
}

/* 🛡️ REPARACIÓN: Botón Volver / Control Maestro */
.btn-control-panel, .btn-volver-maestro {
    position: relative;
    z-index: 102 !important; /* Siempre por encima de todo */
    cursor: pointer !important;
    pointer-events: auto !important;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, var(--p-dark), var(--p-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. Grid de Formulario */
.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

/* Sección de Credenciales */
.user-credentials-section {
    grid-column: 1 / -1;
    background: #f8fafc;
    padding: 25px;
    border-radius: 25px;
    border: 1px dashed #cbd5e1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    margin-left: 8px;
}

.input-prismas {
    width: 100%;
    padding: 15px 20px;
    border-radius: 18px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    font-weight: 700;
    transition: all 0.2s ease;
}

.input-prismas:focus {
    border-color: var(--p-purple);
    box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.15);
    outline: none;
}

/* 📂 5. CARGA DE ARCHIVOS */
.file-custom-label {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 35px;
    background: #fdfaff;
    border: 2px dashed #7c3aed;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 6. Footer Accionable */
.modal-footer {
    display: flex;
    gap: 15px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

.btn-save {
    flex: 2;
    background: linear-gradient(135deg, var(--p-purple) 0%, #4c1d95 100%);
    color: white;
    padding: 18px;
    border-radius: 20px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(96, 40, 151, 0.3);
    transition: all 0.3s ease;
}

/* 📱 7. RESPONSIVE QUIRÚRGICO */
@media (max-width: 768px) {
    .modal-content { padding: 30px 20px; border-radius: 30px; }
    .grid-form, .user-credentials-section { grid-template-columns: 1fr; }
    .modal-footer { flex-direction: column; }
    /* REPARACIÓN: Evitamos que el orden tape clics */
    .btn-save { order: 0; width: 100%; } 
    .modal-header { top: -30px; }
}




/* ==========================================================================
    🏰 BLOQUE 10: FOOTER CORPORATIVO (FULL WIDTH & CLEAN)
    Estado: Reparado - Sin conflictos con Tiles o Modales
   ========================================================================== */
.admin-footer {
    background: #ffffff;
    border-top: 2px solid #f1f5f9;
    padding: 20px 40px;
    margin-top: auto; /* Mantiene el footer al fondo si el contenido es poco */
    width: 100%;
    box-sizing: border-box; /* Crucial para evitar que el padding rompa el 100% */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--p-dark);
}

.platform-name {
    font-weight: 700;
}

.separator {
    color: #cbd5e1;
    font-weight: 300;
}

.author-link {
    text-decoration: none;
    transition: 0.3s ease;
}

.author-link:hover {
    filter: brightness(1.2);
    text-shadow: 0 0 10px rgba(255, 167, 24, 0.2);
}

.author-link strong {
    color: var(--p-orange);
    font-weight: 800;
}

.copyright-legal {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* 📱 AJUSTE PARA VISTA MÓVIL */
@media (max-width: 1024px) {
    .admin-footer {
        padding: 25px 20px;
        text-align: center;
    }

    .footer-container {
        flex-direction: column;
        gap: 12px;
    }

    .footer-left {
        flex-direction: column;
        gap: 5px;
    }

    .separator { display: none; }

    .copyright-legal {
        line-height: 1.4;
        max-width: 300px;
    }
}

/* ==========================================================================
   🏰 BLOQUE 11: BANNER PWA INTELIGENTE (VERSIÓN SUPREMA V1.1.0)
   Optimizado para: iPhone, Android, Windows y Mac
   ========================================================================== */

.pwa-banner-prismas {
    position: fixed;
    bottom: -180px; /* Oculto inicialmente bajo el margen */
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 40, 151, 0.25);
    border-radius: 30px;
    padding: 18px 22px;
    box-shadow: 0 25px 50px -12px rgba(30, 27, 75, 0.3);
    z-index: 999999;
    /* Animación de entrada con rebote elástico tipo iOS */
    transition: bottom 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: bottom;
}

/* Estado Activo: Se posiciona sobre el área de navegación */
.pwa-banner-prismas.active {
    bottom: 30px;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Icono de la App con efecto de elevación */
.pwa-icon-box {
    position: relative;
    flex-shrink: 0;
}

.pwa-icon-box img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(96, 40, 151, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Área de Texto y Mensajes Dinámicos */
.pwa-text-box {
    flex: 1;
}

.pwa-title {
    font-size: 1.05rem;
    font-weight: 850;
    color: var(--p-dark); /* Color oscuro profesional */
    margin: 0;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.pwa-desc {
    font-size: 0.82rem;
    color: #475569;
    margin: 5px 0 0 0;
    line-height: 1.4;
    font-weight: 600;
}

/* 🍎 FIX ESPECÍFICO: Icono de Compartir de Apple */
.pwa-desc img {
    width: 18px !important;
    height: auto !important;
    display: inline-block;
    vertical-align: middle;
    margin: 0 4px;
    filter: brightness(0.8) contrast(1.2);
    box-shadow: none !important;
}

/* Botones de Acción: Instalación y Cierre */
.pwa-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.pwa-btn-main {
    background: linear-gradient(135deg, var(--p-purple) 0%, #7c3aed 100%);
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(96, 40, 151, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-btn-main:hover {
    background: var(--p-orange);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 167, 24, 0.3);
}

.pwa-btn-close {
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.pwa-btn-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

/* 📱 RESPONSIVIDAD PARA DISPOSITIVOS PEQUEÑOS */
@media (max-width: 480px) {
    .pwa-banner-prismas {
        width: 94%;
        padding: 14px 18px;
        bottom: -200px;
    }

    .pwa-banner-prismas.active {
        bottom: 20px;
    }
    
    .pwa-icon-box img {
        width: 48px;
        height: 48px;
    }

    .pwa-title { font-size: 0.95rem; }
    .pwa-desc { font-size: 0.75rem; line-height: 1.3; }

    .pwa-btn-main {
        padding: 10px 16px;
        font-size: 0.7rem;
    }
}

/* 🌙 SOPORTE MODO OSCURO (Opcional si el sistema lo usa) */
@media (prefers-color-scheme: dark) {
    .pwa-banner-prismas {
        background: rgba(30, 27, 75, 0.85);
        border-color: rgba(255, 255, 255, 0.1);
    }
    .pwa-title { color: #ffffff; }
    .pwa-desc { color: #cbd5e1; }
    .pwa-btn-close { background: rgba(255, 255, 255, 0.1); color: #94a3b8; }
}

/* ==========================================================================
    💎 BLOQUE 12: Formulario de Editar Datos (Identidad Prismas)
    Refinado para Gestión de Archivos y Responsividad Pro (PC & Móvil)
   ========================================================================== */

/* 1. Visibilidad y Legibilidad de Etiquetas (Gris Plata Elegante) */
.grid-form .form-group label {
    display: block !important;
    color: #9b929a !important; 
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.8px !important;
}

/* 2. Botón de Cerrar Superior (X) - Estilo Rojo Prismas */
.btn-close-modal {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
    font-size: 1.1rem !important;
    width: 35px; 
    height: 35px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-close-modal:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: rotate(90deg);
}

/* 3. 🏷️ Títulos Dinámicos (Categorías Únicas) */
#modal-titulo {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px !important;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

/* 🟠 MODO: NUEVO REGISTRO (NARANJA) */
#modal-titulo.titulo-nuevo {
    color: #f97316 !important;
    background-color: #fff7ed !important;
    border-left: 5px solid #f97316 !important;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.1);
}

/* 🟣 MODO: EDICIÓN DE DATOS (MORADO) */
#modal-titulo.titulo-edicion {
    color: #602897 !important;
    background-color: #f5f3ff !important;
    border-left: 5px solid #602897 !important;
    box-shadow: inset 0 0 0 1px rgba(96, 40, 151, 0.1);
}

/* 4. 🔗 Gestión de Adjuntos Dinámica (Caja Estilo Cloud) */
.file-input-box {
    background: #f8fafc !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.file-input-box:hover {
    border-color: #602897 !important;
    background: #f1f5f9 !important;
}

.file-input-prismas {
    color: transparent !important;
    width: 100%;
    max-width: 250px;
    cursor: pointer;
    font-size: 0; 
}

.file-input-prismas::file-selector-button {
    background: #602897 !important;
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    box-shadow: 0 4px 6px -1px rgba(96, 40, 151, 0.3);
    display: block;
    margin: 0 auto;
}

.file-status-text {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: -19px;
    position: relative;
    z-index: 10;
}

.file-input-box.has-file {
    border-style: solid;
    border-color: #ffa718 !important; 
    background: #fffbeb !important;
}

.file-input-box.has-file .file-input-prismas::file-selector-button {
    background: #ffa718 !important;
    color: #1e1b4b !important;
}

.file-success {
    margin-top: 15px;
    color: #059669 !important;
    font-weight: 800 !important;
    font-size: 0.7rem;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #d1fae5;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.file-success small {
    display: block;
    color: #94a3b8 !important;
    font-weight: 400 !important;
    font-size: 0.72rem !important;
    margin-top: 4px;
    word-break: break-all;
    text-align: center;
}

/* 5. Inputs y Listas Desplegables Modernas */
.input-prismas {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
}

.input-prismas:focus {
    border-color: #602897 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(96, 40, 151, 0.1) !important;
}

select.input-prismas {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2003/svg' fill='none' viewBox='0 0 24 24' stroke='%23602897'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 18px !important;
    padding-right: 45px !important;
}

/* 6. 🔐 Alerta de Credenciales */
.user-section-alert {
    grid-column: span 2;
    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%) !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    font-weight: 800;
    font-size: 0.75rem;
    text-align: center;
    margin: 10px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 7. Footer y Botones de Acción */
.modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel {
    background: #ffffff !important;
    color: #ef4444 !important;
    border: 2px solid #ef4444 !important;
    padding: 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-cancel:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-save {
    background: #602897 !important;
    color: #ffffff !important;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    flex: 2;
    box-shadow: 0 4px 15px rgba(96, 40, 151, 0.3);
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #22c55e !important; 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

/* 📱 8. AJUSTES PARA MÓVIL */
@media (max-width: 768px) {
    .grid-form {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    .user-section-alert { grid-column: span 1 !important; }
    .modal-footer { flex-direction: column-reverse; padding: 20px; }
    .btn-save, .btn-cancel { width: 100%; max-width: 100% !important; padding: 15px !important; }


/* 🍯 ESTILOS PARA ALERTAS DE INTEGRIDAD - PRISMAS */

/* Contenedor Principal del Modal */
.swal2-popup {
    background: #1a1a1a !important; 
    color: #ffffff !important;
    border: 1px solid #333333 !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Títulos de la Alerta */
.swal2-title {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    margin-bottom: 10px !important;
}

/* Iconos (Advertencia y Éxito) */
.swal2-icon.swal2-warning {
    border-color: #f97316 !important;
    color: #f97316 !important;
}

.swal2-icon.swal2-success {
    border-color: #22c55e !important;
    color: #22c55e !important;
}

/* Bloque de Contenido (Lista de datos faltantes) */
.swal2-html-container {
    color: #cbd5e1 !important;
    text-align: left !important;
    background: rgba(249, 115, 22, 0.05) !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    margin: 20px 0 !important;
    line-height: 1.6 !important;
    border-left: 4px solid #f97316 !important;
    font-size: 0.9rem !important;
}

/* Botón de Confirmación */
.swal2-confirm {
    background-color: #602897 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px 35px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(96, 40, 151, 0.3) !important;
}

.swal2-confirm:hover {
    background-color: #4c1d95 !important;
    transform: translateY(-2px) !important;
}

/* Ajuste para el overlay (fondo oscuro externo) */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}
}



/* ================================================================
   🛰️ BLOQUE 13: UI SYSTEM - ESTILOS DINÁMICOS PARA LA TABLA ALUMNOS
   ================================================================ */

/* 1. ESTILO DE NOMBRES (Legibilidad Premium) */
.ui-modern-table td:nth-child(2) {
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

/* 2. DISEÑO DE STATUS PILLS (Base Común) */
.status-pill {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 3. COLORES PARA ESTADOS DE MATRÍCULA (Basado en tu lógica cat-) */
.cat-matriculado { 
    background: #dcfce7; color: #166534; 
    border-left: 4px solid #22c55e;
}
.cat-pre-inscrito { 
    background: #fef9c3; color: #854d0e; 
    border-left: 4px solid var(--secondary-color);
}
.cat-no-matriculado { 
    background: #fee2e2; color: #991b1b; 
    border-left: 4px solid #ef4444;
}
.cat-pendiente { 
    background: #e0e7ff; color: #3730a3; 
    border-left: 4px solid #6366f1;
}
.cat-graduado { 
    background: #f0fdfa; color: #134e4a; 
    border-left: 4px solid #14b8a6;
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.2);
}
.cat-retirado { 
    background: #f1f5f9; color: #475569; 
    border-left: 4px solid #94a3b8;
    opacity: 0.8;
}

/* 4. COLORES PARA CICLOS / CLEI (Derivados del Púrpura Sistema) */
.cat-ciclo-i, .cat-ciclo-1 { background: rgba(96, 40, 151, 0.1); color: var(--primary-color); }
.cat-ciclo-ii, .cat-ciclo-2 { background: rgba(96, 40, 151, 0.15); color: var(--primary-color); }
.cat-ciclo-iii, .cat-ciclo-3 { background: rgba(96, 40, 151, 0.2); color: var(--primary-color); }
.cat-ciclo-iv, .cat-ciclo-4 { background: rgba(96, 40, 151, 0.25); color: var(--primary-color); }
.cat-ciclo-v, .cat-ciclo-5 { background: rgba(96, 40, 151, 0.3); color: var(--primary-color); }
.cat-ciclo-vi, .cat-ciclo-6 { background: rgba(96, 40, 151, 0.35); color: var(--primary-color); }

/* 5. TIPOS DE DOCUMENTO (Estilo Minimalista) */
.cat-cedula-de-ciudadania, .cat-cc { 
    background: #f8fafc; color: #334155; border: 1px solid #e2e8f0; 
}
.cat-tarjeta-de-identidad, .cat-ti { 
    background: #fdf2f8; color: #9d174d; border: 1px solid #fbcfe8; 
}
.cat-registro-civil, .cat-rc { 
    background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; 
}

/* 6. EFECTO HOVER EN FILAS (Glassmorphism) */
.ui-modern-table tbody tr {
    transition: all 0.3s ease;
}

.ui-modern-table tbody tr:hover {
    background: rgba(96, 40, 151, 0.04) !important;
    transform: scale(1.002);
    box-shadow: inset 4px 0 0 var(--secondary-color);
}

/* 7. CONTENEDOR DE LA TABLA (Ajuste al Sistema) */
.ui-scroll-container {
    background: white;
    border-radius: 15px;
    padding: 10px;
    box-shadow: var(--shadow-main);
    border: 1px solid var(--glass-border);
}



/* ================================================================
   🛰️ BLOQUE 14: MOTOR PRISMAS: PAGINACIÓN CYBER-VIBE
   ================================================================ */

/* --- PAGINACIÓN MINIMALISTA PRISMAS --- */
.pagination-ui {
    padding: 20px;
    text-align: center;
}

/* Botón Anterior (Morado 1) */
.btn-pag:first-of-type {
    background-color: #662d91;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

/* Botón Siguiente (Morado 2) */
.btn-pag:last-of-type {
    background-color: #502967;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

/* Hover a Naranja Corporativo */
.btn-pag:hover {
    background-color: #ffa718 !important;
    color: #1e1b4b !important;
}

/* Texto de Página en Gris Plata */
.pagination-ui span {
    color: #c60f8c; /* Gris Plata */
    font-size: 0.9rem;
    margin: 0 15px;
    font-weight: 500;
}

/* Estado cuando no hay más páginas */
.btn-pag:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}



/* ==========================================================================
   💳 MOTOR DE PAGOS & CARRITO DE COMPRAS - EDICIÓN SUPREMA
   Optimizado para: ePayco, Wompi y PayU
   ========================================================================== */

/* 1. BOTÓN "COBRAR" (En la tabla de alumnos) */
.btn-prismas.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-prismas.success:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
    filter: brightness(1.1);
}

.btn-prismas.success i {
    font-size: 0.9rem;
}

/* 2. MODAL DEL CARRITO (The Checkout UI) */
#modal-cobro-prismas .modal-content {
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--p-purple);
    overflow: hidden;
}

.info-pago-box {
    border: 1px solid rgba(96, 40, 151, 0.1);
    background: rgba(96, 40, 151, 0.03);
}

/* 3. GRID DE PASARELAS (Botones de Pago) */
.pasarelas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.btn-pay {
    padding: 15px;
    border-radius: 16px;
    border: none;
    font-weight: 900;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
}

/* Colores de Marca Pasarelas */
.btn-pay.wompi { background: #3b82f6; box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3); }
.btn-pay.payu   { background: #a3e635; color: #1e1b4b; box-shadow: 0 6px 15px rgba(163, 230, 53, 0.3); }
.btn-pay.epayco { background: #ff5a00; box-shadow: 0 6px 15px rgba(255, 90, 0, 0.3); }

.btn-pay:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

/* 4. INPUTS DE MONTO (Estilo Financiero) */
#cart-monto {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem !important;
    color: var(--p-purple) !important;
    text-align: center;
    border: 2px solid #e2e8f0;
    background: #f1f5f9 !important;
}

/* 5. 📱 ADAPTACIÓN TOTAL MÓVIL (PWA READY) */
@media (max-width: 768px) {
    .pasarelas-grid {
        grid-template-columns: 1fr; /* Una sola columna para que el dedo toque fácil */
        gap: 10px;
    }

    .btn-pay {
        padding: 18px;
        font-size: 0.9rem;
    }

    /* El botón "Cobrar" en móvil se vuelve un icono flotante o expandido */
    .btn-prismas.success {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* Modal ajustado a la pantalla del celular */
    #modal-cobro-prismas .modal-content {
        padding: 20px;
        width: 95%;
        border-radius: 25px;
    }
}

/* 6. INDICADOR DE ESTADO DE PAGO EN TABLAS */
.cat-aprobado { background: #dcfce7 !important; color: #166534 !important; border-left: 4px solid #22c55e !important; }
.cat-rechazado { background: #fee2e2 !important; color: #991b1b !important; border-left: 4px solid #ef4444 !important; }
.cat-pendiente { background: #fef9c3 !important; color: #854d0e !important; border-left: 4px solid #ffa718 !important; }