/* ========================================
   ESTILOS ESPECÍFICOS DE BASE DE LA APP ACCOUNTS
   ======================================== */

/* Importar Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&display=swap');

/* Configuración de variables CSS personalizadas para compatibilidad */
:root {
    --principal: #5D768B;
    --secundario: #C8B39B;
    --fondo: #F8EFE5;
    --blanco: #FDFDFD;
    --gris-claro: #F8F9FA;
    --gris-medio: #6C757D;
    --gris-oscuro: #495057;
    --exito: #28A745;
    --error: #DC3545;
    --advertencia: #FFC107;
    --info: #17A2B8;
}

/* Iconos con pseudo-elementos que no se pueden hacer con Tailwind */
.icon-before-user::before { content: "👤"; margin-right: 0.5rem; }
.icon-before-lock::before { content: "🔒"; margin-right: 0.5rem; }
.icon-before-eye::before { content: "👁️"; }
.icon-before-eye-slash::before { content: "🙈"; }
.icon-before-warning::before { content: "⚠️"; margin-right: 0.25rem; }
.icon-before-check::before { content: "✓"; margin-right: 0.25rem; }
.icon-before-sparkles::before { content: "✨"; margin-right: 0.5rem; }
.icon-before-arrow::before { content: "→"; margin-left: 0.75rem; }
.icon-before-back::before { content: "🔙"; margin-right: 0.5rem; }
.icon-before-key::before { content: "🔑"; margin-right: 0.5rem; }

/* Efectos de brillo en hover que requieren pseudo-elementos */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Input focus line effect */
.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secundario), var(--principal));
    transition: width 0.4s ease;
    border-radius: 0 0 10px 10px;
}

.input-focus:focus + .input-focus-line {
    width: 100%;
}

/* Efectos de placeholder animado */
.animated-placeholder:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

/* Anillo pulsante para iconos */
.pulse-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--secundario), var(--principal));
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
    animation: pulse-ring 2s ease-in-out infinite;
}

/* Selectores personalizados */
.form-select-custom {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%235D768B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

/* Checkboxes personalizados */
.checkbox-custom {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--principal);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-custom:checked {
    background-color: var(--principal);
    border-color: var(--principal);
}

.checkbox-custom:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Efectos de gradiente de texto */
.gradient-text {
    background: linear-gradient(135deg, var(--principal), var(--secundario));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Media queries para responsive */
@media (max-width: 768px) {
    .auth-mobile-adjust {
        padding: 30px 15px;
    }
    
    .card-mobile-adjust {
        padding: 20px;
        border-radius: 15px;
    }
    
    .title-mobile-adjust {
        font-size: 2rem;
    }
    
    .btn-mobile-adjust {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .home-link-mobile {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .auth-mobile-small {
        padding: 20px 10px;
    }
    
    .card-mobile-small {
        padding: 20px;
        margin: 10px;
    }
    
    .title-mobile-small {
        font-size: 1.8rem;
    }
    
    .input-mobile-small {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .btn-mobile-small {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .home-link-mobile-small {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* Utilidades adicionales */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
}

/* Animaciones específicas que requieren keyframes complejos */
@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti-animation {
    animation: confettiFall 3s linear forwards;
}

/* Estados de carga */
.loading-state {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}