/*
⚠️ IMPORTANTE: Sigue las directrices del framework Vibe.
Ver: /.github/copilot-instructions.md

Auth Signup Styles - Estilos de registro
Vibe Framework Implementation
*/

/* ============================================
   Variables CSS
   ============================================ */
:root {
    /* Colores Base */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    
    /* Textos */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    
    /* Acentos */
    --color-primary: #3B82F6;
    --color-success: #10B981;
    --color-danger: #EF4444;
    --color-warning: #F59E0B;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ============================================
   Reset y Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* ============================================
   Container Principal
   ============================================ */
.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   Header con Logo
   ============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ============================================
   Card Principal
   ============================================ */
.auth-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ============================================
   Alertas y Mensajes
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: #FCA5A5;
}

.error-list {
    list-style: none;
    margin: 0;
}

.error-list li {
    padding: 0.25rem 0;
}

.error-list li:before {
    content: '⚠️ ';
    margin-right: 0.5rem;
}

/* ============================================
   Formulario
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
}

.form-input {
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--color-danger);
}

/* ============================================
   Password Input con Toggle
   ============================================ */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.eye-icon {
    font-size: 1.25rem;
    display: block;
}

/* ============================================
   Password Strength Indicator
   ============================================ */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--bg-tertiary);
    margin-top: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: var(--color-danger);
    width: 33%;
}

.password-strength.medium {
    background: var(--color-warning);
    width: 66%;
}

.password-strength.strong {
    background: var(--color-success);
    width: 100%;
}

.password-match {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.password-match.match {
    color: var(--color-success);
}

.password-match.no-match {
    color: var(--color-danger);
}

/* ============================================
   Botones
   ============================================ */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

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

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

.btn-block {
    width: 100%;
}

/* ============================================
   Separador
   ============================================ */
.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--bg-tertiary);
}

.auth-separator span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   Footer del Card
   ============================================ */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #60A5FA;
    text-decoration: underline;
}

/* ============================================
   Copyright
   ============================================ */
.auth-copyright {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Loading State
   ============================================ */
.loading .btn-primary {
    position: relative;
    color: transparent;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-logo h1 {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Animaciones de Entrada
   ============================================ */
.auth-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Focus Visible (Accesibilidad)
   ============================================ */
.form-input:focus-visible,
.btn:focus-visible,
.auth-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
