/* Fuente base para párrafos y texto general (Inter) */
body {
    font-family: 'Inter', sans-serif;
}

/* Clase de utilidad para títulos y secciones especiales (Cinzel) */
.font-cinzel {
    font-family: 'Cinzel', serif !important;
}

/* Clase de utilidad para Inter */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* --- Clases de utilidad --- */
/* CORRECCIÓN: !important para evitar conflictos de visualización */
.hidden {
    display: none !important;
}

.transition-all {
    transition: all 0.3s ease-in-out;
}

/* --- Estilos del Visor PDF --- */
#pdf-canvas-container {
    position: relative;
}

#pdf-viewer-modal {
    user-select: none;
}

/* ==========================================================================
   CORRECCIÓN FINAL DE INTERRUPTORES (SWITCHES)
   ========================================================================== */

/* 1. OCULTAR EL INPUT ORIGINAL (EL "VIEJO") */
.toggle-checkbox {
    appearance: none;
    opacity: 0 !important;   /* Desaparece visualmente */
    position: absolute;
    z-index: 10;             /* Queda encima para recibir el clic */
    width: 100% !important;  /* Cubre todo el área */
    height: 100% !important;
    cursor: pointer;
    margin: 0;
    left: 0;
    top: 0;
}

/* 2. DISEÑO DEL RIEL (TRACK) */
.toggle-label {
    width: 50px;
    height: 26px !important;    /* Forzamos altura correcta */
    display: flex !important;   /* Activamos Flexbox */
    align-items: center;        /* ESTO ES LA MAGIA: Centrado Vertical Automático */
    position: relative;
    background: #374151;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    border: none !important;    /* Quitamos el borde del HTML que restaba píxeles */
}

/* 3. DISEÑO DEL CÍRCULO (KNOB) */
.toggle-label:before {
    content: '';
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-left: 3px;           /* Margen izquierdo fijo */
    flex-shrink: 0;
}

/* 4. ESTADOS ACTIVOS (CHECKED) */
.toggle-checkbox:checked + .toggle-label {
    background-color: #06b6d4;
}

/* Animación simétrica */
.toggle-checkbox:checked + .toggle-label:before {
    transform: translateX(24px);
}

/* --- Estilos Video Library --- */
.video-card-overlay {
    background: linear-gradient(to top, rgba(13, 27, 42, 0.9) 0%, rgba(13, 27, 42, 0) 100%);
}

.play-icon-container {
    background: rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.group:hover .play-icon-container {
    background: rgba(6, 182, 212, 0.6);
    transform: scale(1.1);
}

/* --- Animación de actualización de precios (Flash) --- */
@keyframes flashEffect {
    0% {
        color: #22d3ee; /* Cyan brillante */
        text-shadow: 0 0 15px rgba(34, 211, 238, 0.8);
        transform: scale(1.1);
    }
    100% {
        color: inherit;
        text-shadow: none;
        transform: scale(1);
    }
}

.flash-update {
    animation: flashEffect 2s ease-out;
    display: inline-block; /* Necesario para que transform funcione */
}

/* --- Indicador de Estado API (Semáforo) --- */
.api-status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 12px;
    background-color: #f59e0b; /* Ámbar (Cargando/Neutro) */
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.6);
    transition: all 0.4s ease-in-out;
    vertical-align: middle;
}

.status-ok {
    background-color: #22c55e !important; /* Verde */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8) !important;
}

.status-error {
    background-color: #ef4444 !important; /* Rojo */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8) !important;
}

/* ==========================================================================
   ESTILOS: Capital Automatizado y Gestión de Permisos
   ========================================================================== */

/* ESTILO CAMUFLAJE / FANTASMA */
.input-readonly {
    background-color: transparent !important;
    border-color: transparent !important;
    border-width: 0 !important;
    color: white !important; /* Asegura que brille igual que el texto */
    cursor: default;
    box-shadow: none !important;
    outline: none !important;
}

/* Transición suave para el input de Monto Inicial */
#calc-auto-capital-input {
    transition: all 0.3s ease-in-out;
}

/* Acordeón de Permisos en Gestión de Usuarios */
.permissions-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

/* Estado abierto del acordeón */
.permissions-accordion.open {
    max-height: 200px; /* Altura suficiente para alojar los checkboxes */
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.5); /* Separador visual */
}

/* ==========================================================================
   ESTILOS: Sistema de Progresión y Bloqueo
   ========================================================================== */

/* Estado Bloqueado para Tarjetas del Dashboard */
.locked-feature {
    filter: grayscale(100%);
    opacity: 0.6;
    cursor: not-allowed !important;
    position: relative;
    transition: all 0.3s ease;
}

.locked-feature:hover {
    transform: none !important;
    border-color: transparent !important;
}

/* Superposición del Candado */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    background-color: rgba(13, 27, 42, 0.4);
    border-radius: 0.75rem; /* Coincide con rounded-xl */
}

/* Icono del candado */
.lock-icon {
    font-size: 3rem;
    color: #9ca3af; /* Gray-400 */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

/* Video Bloqueado en Librería */
.video-card-locked {
    pointer-events: none;
    filter: grayscale(100%) blur(2px);
    opacity: 0.4;
    user-select: none;
}

.video-card-locked .play-icon-container {
    display: none;
}

/* ==========================================================================
   NUEVO: ESTILOS PARA SELECTOR DE DIVISA
   ========================================================================== */
.currency-active {
    background-color: #22c55e !important; /* Verde éxito */
    color: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.currency-inactive {
    background-color: transparent !important;
    color: #9ca3af !important; /* Gray-400 */
}

.currency-inactive:hover {
    color: white !important;
}