/* ============================================
   STYLEFLEXADS - AUTH PAGES STYLES
   ============================================ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #F97316 100%);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

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

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #1E40AF, #1e3a8a);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: white;
    border-radius: 50% 50% 0 0;
}

.auth-logo {
    max-width: 180px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 700;
}

.auth-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.auth-body-content {
    padding: 40px 30px 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.auth-form label .required {
    color: #dc2626;
}

.auth-form .input-wrapper {
    position: relative;
}

.auth-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.auth-form .form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: #f9fafb;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #1E40AF;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.auth-form .form-control.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.auth-form .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
}

.auth-form .password-toggle:hover {
    color: #1E40AF;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    display: block;
}

.form-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
}

/* Checkbox personalizado */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1E40AF;
}

.checkbox-wrapper label {
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.checkbox-wrapper label a {
    color: #1E40AF;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-wrapper label a:hover {
    text-decoration: underline;
}

/* Botón submit */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1E40AF, #3B82F6);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

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

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

.btn-auth .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-auth.loading .spinner {
    display: block;
}

.btn-auth.loading .btn-text {
    display: none;
}

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

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

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

.auth-divider span {
    background: white;
    padding: 0 15px;
    color: #6b7280;
    font-size: 13px;
    position: relative;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #1E40AF;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #F97316;
}

.auth-links p {
    color: #6b7280;
    font-size: 14px;
    margin: 10px 0;
}

/* Alertas */
.auth-alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.auth-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.auth-alert.info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.auth-alert.warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Lista de errores */
.error-list {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-list h4 {
    color: #991b1b;
    margin: 0 0 10px 0;
    font-size: 14px;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
    color: #991b1b;
    font-size: 13px;
}

.error-list li {
    margin-bottom: 5px;
}

/* Código de referido destacado */
.referido-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.referido-box i {
    font-size: 24px;
    color: #f59e0b;
    margin-bottom: 5px;
}

.referido-box p {
    margin: 5px 0;
    font-size: 13px;
    color: #92400e;
}

.referido-box .codigo {
    font-size: 18px;
    font-weight: 700;
    color: #1E40AF;
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 5px;
    letter-spacing: 2px;
}

/* Password strength meter */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.strength-fill.weak { width: 33%; background: #dc2626; }
.strength-fill.medium { width: 66%; background: #f59e0b; }
.strength-fill.strong { width: 100%; background: #10b981; }

.strength-text {
    font-size: 11px;
    color: #6b7280;
}

/* Footer auth */
.auth-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.auth-footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-body-content {
        padding: 30px 20px 20px;
    }
    
    .auth-header {
        padding: 25px 20px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
}

/* Animación de shake para errores */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.4s ease;
}