/**
 * PointSeller BI - Página de Registro
 * Diseño moderno alineado con PointSeller Expressive UI System
 */

/* ===== Reset + base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    color: #0A0F1F;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Layout principal ===== */
.register-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 420px 1fr;
}

/* ===== Panel izquierdo (hero) ===== */
.register-hero {
    background: linear-gradient(135deg, #005CFF 0%, #7A4DFF 50%, #00D4FF 100%);
    color: white;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.register-hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.register-hero::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(198,246,141,.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 800;
    font-size: 22px;
    z-index: 1;
}
.hero-logo-icon {
    width: 44px; height: 44px;
    background: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #005CFF;
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.hero-logo-text { letter-spacing: -0.5px; }
.hero-logo-text b { color: #C6F68D; }

.hero-content { z-index: 1; }
.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
.hero-content h1 span {
    background: linear-gradient(90deg, #C6F68D, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content p {
    font-size: .95rem;
    opacity: .9;
    margin-bottom: 28px;
}

.hero-features {
    display: flex; flex-direction: column; gap: 14px;
    margin-bottom: 28px;
}
.hero-feature {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: .85rem;
}
.hero-feature i {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.15);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #C6F68D;
    font-size: 14px;
    backdrop-filter: blur(8px);
}
.hero-feature strong { display: block; margin-bottom: 2px; }
.hero-feature small { opacity: .8; font-size: .75rem; }

.hero-footer { z-index: 1; font-size: .8rem; opacity: .8; }
.hero-footer a { color: #C6F68D; text-decoration: none; }

/* ===== Panel derecho (form) ===== */
.register-form-wrapper {
    padding: 40px 56px;
    overflow-y: auto;
    max-height: 100vh;
}
.register-form-inner { max-width: 720px; margin: 0 auto; }

.form-header { margin-bottom: 32px; }
.form-header .step-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eff6ff; color: #005CFF;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0A0F1F;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.form-header p { color: #6b7280; font-size: .9rem; }

/* ===== Selector de plan ===== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
}
.plan-card:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.plan-card.selected {
    border-color: #005CFF;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    box-shadow: 0 0 0 4px rgba(0,92,255,.1);
}
.plan-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px; right: 10px;
    width: 24px; height: 24px;
    background: #005CFF;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.plan-name { font-weight: 700; color: #0A0F1F; font-size: .95rem; margin-bottom: 4px; }
.plan-price { font-size: 1.5rem; font-weight: 800; color: #005CFF; }
.plan-price small { font-size: .75rem; color: #6b7280; font-weight: 500; }
.plan-card.selected .plan-price { color: #7A4DFF; }

/* ===== Inputs y formulario ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}
.form-group { position: relative; }
.form-group.full { grid-column: span 2; }

.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.form-label .required { color: #E53935; }

.form-input, .form-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: .95rem;
    color: #0A0F1F;
    background: white;
    transition: all .2s;
    font-family: inherit;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #005CFF;
    box-shadow: 0 0 0 4px rgba(0,92,255,.1);
}
.form-input.error, .form-select.error {
    border-color: #E53935;
    background: #fef2f2;
}
.form-error-msg {
    color: #E53935;
    font-size: .75rem;
    margin-top: 4px;
    display: none;
}
.form-input.error + .form-error-msg, .form-select.error + .form-error-msg { display: block; }

.form-input-with-icon { position: relative; }
.form-input-with-icon .icon {
    position: absolute;
    left: 14px; top: 50%; transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    font-size: 16px;
}
.form-input-with-icon .form-input { padding-left: 42px; }
.form-input-with-icon .toggle-pwd {
    position: absolute;
    right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}
.form-input-with-icon .toggle-pwd:hover { color: #005CFF; }

/* Password strength */
.pwd-strength {
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}
.pwd-strength-bar {
    height: 100%;
    width: 0%;
    transition: all .3s;
    border-radius: 2px;
}
.pwd-hint { font-size: .7rem; color: #6b7280; margin-top: 4px; }

/* ===== Términos ===== */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
    cursor: pointer;
}
.terms-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: #005CFF; cursor: pointer; flex-shrink: 0; }
.terms-row label { font-size: .85rem; color: #374151; cursor: pointer; line-height: 1.5; }
.terms-row a { color: #005CFF; text-decoration: none; font-weight: 600; }

/* ===== Botones ===== */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #005CFF 0%, #7A4DFF 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,92,255,.3);
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,92,255,.4);
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-submit .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}
.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: .9rem;
}
.form-footer a { color: #005CFF; font-weight: 600; text-decoration: none; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,.16);
    border-left: 4px solid #005CFF;
    display: flex; align-items: center; gap: 12px;
    font-size: .9rem;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform .3s ease;
    z-index: 9999;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: #4CAF50; }
.toast.error { border-left-color: #E53935; }
.toast.warning { border-left-color: #FFB300; }
.toast i { font-size: 20px; }
.toast.success i { color: #4CAF50; }
.toast.error i { color: #E53935; }
.toast.warning i { color: #FFB300; }
.toast.info i { color: #005CFF; }

/* ===== Success screen ===== */
.success-screen {
    text-align: center;
    padding: 40px 20px;
    display: none;
}
.success-screen.show { display: block; }
.success-icon {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, #4CAF50, #C6F68D);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 56px;
    margin: 0 auto 24px;
    box-shadow: 0 16px 48px rgba(76,175,80,.3);
    animation: pop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.1); } to { transform: scale(1); } }
.success-screen h2 { font-size: 2rem; margin-bottom: 12px; color: #0A0F1F; }
.success-screen p { color: #6b7280; margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .register-wrapper { grid-template-columns: 1fr; }
    .register-hero { padding: 32px 28px; min-height: auto; }
    .register-hero .hero-features { display: none; }
    .register-form-wrapper { padding: 32px 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: span 1; }
}
@media (max-width: 480px) {
    .register-form-wrapper { padding: 24px 16px; }
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
    .form-header h2 { font-size: 1.5rem; }
}
