/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor principal */
.login-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
}

/* Tarjeta de login */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Header del login */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 400;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Grupos de input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

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

/* Acciones del formulario */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Botones */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
}

/* Footer del formulario */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        border-radius: 16px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .input-field {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 25px 20px;
    }
    
    .logo {
        font-size: 2rem;
    }
}

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

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de hover mejorados */
.input-field:hover {
    border-color: #d1d5db;
}

/* Efectos de glassmorphism mejorados */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 20px;
    pointer-events: none;
}


/* ── Estilos añadidos para Registro y Recuperación ─────────────── */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-link-subtle {
    color: #6b7280;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
}

.auth-alert.show {
    display: flex;
}

.auth-alert--err {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.auth-alert--ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.auth-code-input {
    letter-spacing: 0.35em;
    font-size: 1.8rem !important;
    text-align: center;
    font-family: monospace;
    font-weight: 700;
}

.auth-hint {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
}

.btn-secondary-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}

.btn-secondary-link:hover {
    color: #764ba2;
}

.btn-secondary-link:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
}
