/* PaySu - Modern NOWPayments Style Authentication */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout principal - Split screen como NOWPayments */
.auth-layout {
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
}

/* Columna izquierda - Formulario */
.auth-left {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: white;
    position: relative;
}

/* Columna derecha - Branding */
.auth-right {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Efectos de fondo derecho */
.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

/* Contenido del lado derecho */
.auth-branding {
    text-align: center;
    color: white;
    z-index: 1;
    position: relative;
}

.auth-branding h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.auth-branding p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Efectos decorativos */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: floatShapes 15s infinite ease-in-out;
}

.shape-1 {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 30%;
    animation-delay: 5s;
}

.shape-3 {
    bottom: 20%;
    left: 20%;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20%;
    animation-delay: 10s;
}

@keyframes floatShapes {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(10deg); }
    66% { transform: translateY(10px) rotate(-5deg); }
}

/* Container del formulario */
.auth-form-container {
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

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

.auth-header .logo {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    text-decoration: none;
}

.auth-header .logo:hover {
    color: #4299e1;
}

.auth-subtitle {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Formulario */
.auth-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

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

.form-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background: #ffffff;
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Input groups con iconos */
.input-group {
    position: relative;
}

.input-group .form-input {
    padding-right: 48px;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.input-icon:hover {
    color: #4299e1;
}

/* Checkbox personalizado */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    appearance: none;
    transition: all 0.2s ease;
}

.form-checkbox input[type="checkbox"]:checked {
    background: #4299e1;
    border-color: #4299e1;
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-checkbox label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.4;
}

/* Botones principales */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    min-height: 52px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #4b5563;
    border: 1.5px solid #e5e7eb;
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #4299e1;
    color: #4299e1;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Enlaces */
.auth-links {
    text-align: center;
    margin: 24px 0;
}

.auth-link {
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.auth-link:hover {
    color: #3182ce;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4299e1;
    transition: width 0.2s ease;
}

.auth-link:hover::after {
    width: 100%;
}

/* Separador */
.auth-divider {
    margin: 32px 0;
    text-align: center;
    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 20px;
    color: #9ca3af;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
}

.auth-footer-text {
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 12px;
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.auth-footer-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: #4299e1;
}

/* Alertas */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #d97706;
}

/* Animaciones */
.auth-form-container {
    animation: slideInUp 0.6s ease-out;
}

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

/* Step indicator para registro */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    gap: 12px;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.step.active {
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.step.completed {
    background: #10b981;
    color: white;
}

.step.pending {
    background: #f3f4f6;
    color: #9ca3af;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.step-connector.completed {
    background: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-layout {
        flex-direction: column;
    }
    
    .auth-right {
        min-height: 200px;
        order: -1;
    }
    
    .auth-left {
        max-width: none;
        padding: 32px 20px;
    }
    
    .auth-branding h1 {
        font-size: 2.5rem;
    }
    
    .auth-form-container {
        max-width: none;
    }
    
    .form-input {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

@media (max-width: 480px) {
    .auth-left {
        padding: 24px 16px;
    }
    
    .auth-header {
        margin-bottom: 32px;
    }
    
    .auth-footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* Estados de validación */
.form-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input:valid:not(:placeholder-shown) {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Transiciones suaves entre steps */
.step-content {
    transition: all 0.3s ease;
}

.step-content.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.step-content.fade-in {
    opacity: 1;
    transform: translateX(0);
}

/* Mejoras adicionales */
.form-group.focused .form-label {
    color: #4299e1;
    font-weight: 600;
}

.btn-google {
    background: white;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Password requirements */
.password-requirements {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
}

.password-requirements li {
    padding: 2px 0;
    position: relative;
    padding-left: 20px;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: #d1d5db;
    font-weight: bold;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #10b981;
}

.password-requirements li.invalid::before {
    content: '✗';
    color: #ef4444;
}
