/* static/css/auth.css - Estilos específicos para login y registro */

/* Variables CSS adicionales para autenticación */
:root {
    /* Colores principales consistentes con el home */
    --auth-primary-orange: #f97316;
    --auth-primary-red: #ef4444;
    --auth-blue: #3b82f6;
    --auth-emerald: #10b981;
    --auth-indigo: #6366f1;
    --auth-purple: #8b5cf6;
    
    /* Efectos y sombras */
    --auth-shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --auth-shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --auth-shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --auth-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transiciones */
    --auth-transition-fast: all 0.15s ease-in-out;
    --auth-transition-normal: all 0.2s ease-in-out;
    --auth-transition-slow: all 0.3s ease-in-out;
}

/* Contenedor principal de autenticación */
.auth-main-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #fff7ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

/* Card de autenticación */
.auth-card {
    width: 100%;
    max-width: 28rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--auth-shadow-xl);
    border: 1px solid rgba(251, 146, 60, 0.1);
    animation: slideUpFadeIn 0.5s ease-out;
}

/* Animación de entrada */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación suave de pulso */
@keyframes pulse-soft {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.98; 
        transform: scale(1.005);
    }
}

.animate-pulse-soft {
    animation: pulse-soft 4s ease-in-out infinite;
}

/* Header del formulario */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--auth-primary-orange), var(--auth-primary-red));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--auth-shadow-large);
    transition: var(--auth-transition-normal);
}

.auth-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: var(--auth-shadow-xl);
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Formularios */
.auth-form {
    space-y: 1.5rem;
}

.auth-field {
    margin-bottom: 1.5rem;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.auth-label i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Campos de entrada mejorados */
.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--auth-transition-normal);
    background-color: #f9fafb;
    color: #1f2937;
    box-shadow: var(--auth-shadow-soft);
}

.auth-input:hover {
    background-color: #ffffff;
    border-color: #d1d5db;
}

.auth-input:focus {
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Campos específicos por color */
.auth-input.focus-orange:focus {
    border-color: var(--auth-primary-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.auth-input.focus-blue:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-input.focus-emerald:focus {
    border-color: var(--auth-emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.auth-input.focus-indigo:focus {
    border-color: var(--auth-indigo);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-input.focus-purple:focus {
    border-color: var(--auth-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Contenedor de contraseña */
.auth-password-container {
    position: relative;
    display: block;
    width: 100%;
}

.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--auth-transition-fast);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.auth-password-toggle:hover {
    color: var(--auth-primary-orange);
    background-color: rgba(249, 115, 22, 0.1);
}

/* Botones principales */
.auth-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--auth-primary-orange), var(--auth-primary-red));
    color: white;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: var(--auth-transition-normal);
    box-shadow: var(--auth-shadow-large);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.auth-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--auth-primary-red), var(--auth-primary-orange));
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-xl);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Botones secundarios */
.auth-btn-secondary {
    width: 100%;
    background: transparent;
    color: #374151;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--auth-transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: var(--auth-primary-orange);
    color: var(--auth-primary-orange);
    transform: translateY(-1px);
}

/* Validación y errores */
.auth-error {
    margin-top: 0.5rem;
    color: #ef4444;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.auth-error i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.auth-success {
    margin-top: 0.5rem;
    color: #10b981;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.auth-success i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Indicador de fuerza de contraseña */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bars {
    display: flex;
    gap: 0.25rem;
    height: 0.25rem;
    margin-bottom: 0.25rem;
}

.password-strength-bar {
    flex: 1;
    background-color: #e5e7eb;
    border-radius: 0.125rem;
    transition: var(--auth-transition-fast);
}

.password-strength-bar.weak { background-color: #ef4444; }
.password-strength-bar.fair { background-color: #f97316; }
.password-strength-bar.good { background-color: #eab308; }
.password-strength-bar.strong { background-color: #22c55e; }

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Estados de campos */
.auth-input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.auth-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Checkbox personalizado */
.auth-checkbox {
    height: 1rem;
    width: 1rem;
    color: var(--auth-primary-orange);
    border-color: #d1d5db;
    border-radius: 0.25rem;
    transition: var(--auth-transition-fast);
}

.auth-checkbox:focus {
    ring-color: rgba(249, 115, 22, 0.5);
    ring-width: 4px;
}

/* Links */
.auth-link {
    color: var(--auth-primary-orange);
    font-weight: 600;
    text-decoration: underline;
    transition: var(--auth-transition-fast);
}

.auth-link:hover {
    color: var(--auth-primary-red);
}

/* Separador */
.auth-separator {
    position: relative;
    margin: 1.5rem 0;
}

.auth-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.auth-separator-text {
    position: relative;
    display: flex;
    justify-content: center;
    font-size: 0.875rem;
    color: #6b7280;
    background-color: white;
    padding: 0 0.5rem;
}

/* Footer de información */
.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-main-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-input {
        font-size: 1rem; /* Previene zoom en iOS */
    }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .auth-main-container {
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    }
    
    .auth-card {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .auth-title {
        color: #f9fafb;
    }
    
    .auth-subtitle {
        color: #d1d5db;
    }
    
    .auth-label {
        color: #e5e7eb;
    }
    
    .auth-input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .auth-input:hover {
        background-color: #4b5563;
    }
    
    .auth-separator-text {
        background-color: rgba(31, 41, 55, 0.95);
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-input,
    .auth-btn-primary,
    .auth-btn-secondary,
    .auth-logo {
        animation: none;
        transition: none;
    }
}

/* Print styles */
@media print {
    .auth-btn-primary,
    .auth-btn-secondary {
        display: none;
    }
}