/* public/css/auth.css */

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.auth-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--color-gray-50) 0%, white 100%);
}

.auth-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.logo-emoji {
    font-size: 64px;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--color-gray-600);
}

/* Formulario */
.auth-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--color-gray-400);
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 48px;
    font-size: 1rem;
    color: var(--color-gray-900);
    background: var(--color-gray-50);
    border: 2px solid var(--color-gray-200);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(163, 55, 55, 0.1);
}

.form-input::placeholder {
    color: var(--color-gray-400);
}

/* Input con botón de toggle */
.input-wrapper .form-input {
    padding-right: 48px;
}

.input-toggle {
    position: absolute;
    right: 12px;
    width: 24px;
    height: 24px;
    padding: 2px;
    color: var(--color-gray-400);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 1;
}

.input-toggle:hover {
    color: var(--color-gray-600);
}

.input-toggle svg {
    width: 100%;
    height: 100%;
}

/* Errores */
.form-error {
    display: block;
    font-size: 0.875rem;
    color: var(--color-error);
    margin-top: 0.25rem;
    min-height: 20px;
}

/* Checkbox y enlaces */
.form-group-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--color-gray-700);
    user-select: none;
}

.link-text {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.link-text:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Alertas */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 12px 16px;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.hidden {
    display: none !important;
}

/* Botones */
.btn-primary {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(163, 55, 55, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 55, 55, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.auth-footer {
    padding: 1.25rem 1.5rem;
    text-align: center;
    background: var(--color-gray-50);
    border-top: 1px solid var(--color-gray-200);
}

.auth-footer-text {
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.link-primary {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.link-primary:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    
    .auth-form {
        padding: 1.25rem;
    }
    
    .auth-logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-emoji {
        font-size: 52px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .link-text {
        font-size: 0.8125rem;
    }
}