/* ── Reset y base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.se-checkout-body {
    background: #f5f7fb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ── Wrap ─────────────────────────────────────────────────────────────────── */
.se-checkout-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.se-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 32px;
}

.se-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007FFF;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.se-back-link {
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
}
.se-back-link:hover { color: #007FFF; }

/* ── Plan tabs ───────────────────────────────────────────────────────────── */
.se-plan-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.se-plan-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #d1d9e0;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color .15s, color .15s;
    cursor: pointer;
}
.se-plan-tab:hover { border-color: #007FFF; color: #007FFF; }
.se-plan-tab.active {
    border-color: #007FFF;
    color: #007FFF;
    background: #e8f2ff;
}
.se-plan-tab-price {
    font-size: 0.75rem;
    font-weight: 400;
    margin-top: 2px;
    color: #64748b;
}
.se-plan-tab.active .se-plan-tab-price { color: #007FFF; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.se-checkout-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 768px) {
    .se-checkout-grid { grid-template-columns: 1fr; }
}

/* ── Plan summary card ───────────────────────────────────────────────────── */
.se-plan-card {
    border: 1px solid #007FFF;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.se-plan-card-header {
    padding: 20px 24px;
    background: #007FFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.se-plan-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.se-plan-price {
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}
.se-plan-price small {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: .85;
}

.se-plan-features {
    list-style: none;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.se-plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #334155;
}

.se-plan-note {
    padding: 12px 24px 20px;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
}

/* ── Form section ────────────────────────────────────────────────────────── */
.se-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 36px 40px;
}

@media (max-width: 480px) {
    .se-form-section { padding: 24px 20px; }
}

.se-form-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.se-form-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* ── Field groups ────────────────────────────────────────────────────────── */
.se-field-group {
    margin-bottom: 18px;
}

.se-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

@media (max-width: 480px) {
    .se-field-row { grid-template-columns: 1fr; }
}

.se-field-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.se-field-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1a1a2e;
    outline: none;
    transition: border-color .15s;
    background: #fafafa;
}
.se-field-group input:focus {
    border-color: #007FFF;
    background: #fff;
}
.se-field-group input.se-invalid {
    border-color: #dc3545;
}

/* ── Pay button ──────────────────────────────────────────────────────────── */
.se-pay-btn {
    width: 100%;
    padding: 14px;
    background: #FF8732;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: background .15s;
}
.se-pay-btn:hover:not(:disabled) { background: #E06A1A; }
.se-pay-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.se-spinner {
    width: 20px;
    height: 20px;
    animation: se-spin .8s linear infinite;
}
@keyframes se-spin { to { transform: rotate(360deg); } }

/* ── Secure note ─────────────────────────────────────────────────────────── */
.se-secure-note {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 12px;
}

/* ── Error box ───────────────────────────────────────────────────────────── */
.se-error-box {
    background: #fff5f5;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 12px 16px;
    color: #dc3545;
    font-size: 0.875rem;
    margin-bottom: 20px;
}
.se-error-box a { color: #dc3545; }

/* ── Panel email ya registrado ───────────────────────────────────────────── */
.se-email-exists-box {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}
.se-eeb-icon { font-size: 2rem; margin-bottom: 10px; }
.se-email-exists-box h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.se-email-exists-box > p {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 20px;
}
.se-eeb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.se-eeb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}
.se-eeb-btn--primary  { background: #007FFF; color: #fff; }
.se-eeb-btn--primary:hover { background: #005FCC; color: #fff; }
.se-eeb-btn--outline  { background: #fff; color: #007FFF; border: 1px solid #007FFF; }
.se-eeb-btn--outline:hover { background: #E8F2FF; }
.se-eeb-btn--whatsapp { background: #25D366; color: #fff; }
.se-eeb-btn--whatsapp:hover { background: #1da851; color: #fff; }
.se-eeb-note {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
}
.se-eeb-note button {
    background: none;
    border: none;
    color: #007FFF;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

/* ── Overlay de procesamiento ────────────────────────────────────────────── */
#se-payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.se-overlay-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 48px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 24px 48px rgba(0,0,0,.15);
}

.se-overlay-spinner {
    width: 56px;
    height: 56px;
    animation: se-spin .9s linear infinite;
    margin-bottom: 20px;
}

.se-overlay-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.se-overlay-sub {
    font-size: 0.825rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ── Welcome page ────────────────────────────────────────────────────────── */
.se-welcome-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
}

.se-welcome-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.se-welcome-icon { margin-bottom: 20px; }

.se-welcome-card h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.se-welcome-sub {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 32px;
}

.se-welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 32px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.se-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #334155;
}

.se-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #007FFF;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.se-btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: #007FFF;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: background .15s;
}
.se-btn-primary:hover { background: #005FCC; }

.se-welcome-cta { margin-bottom: 16px; }

.se-welcome-ref {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 12px;
}

/* ── Modal aviso "primer mes gratis" ────────────────────────────────────── */
#se-free-trial-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
#se-free-trial-modal[style*="display:none"],
#se-free-trial-modal[style*="display: none"] { display: none !important; }

.se-free-trial-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}
.se-free-trial-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}
.se-free-trial-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}
.se-free-trial-card > p {
    color: #475569;
    line-height: 1.5;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.se-free-trial-info {
    background: #FFF1E6;
    border: 1px solid #FFD1A8;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}
.se-free-trial-info p {
    font-size: 0.85rem;
    color: #d05a00;
    line-height: 1.5;
    margin: 0;
}
.se-free-trial-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.se-free-trial-btn-outline,
.se-free-trial-btn-primary {
    flex: 1;
    padding: 13px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.92rem;
    transition: all 0.15s;
    border: none;
}
.se-free-trial-btn-outline {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.se-free-trial-btn-outline:hover {
    background: #f8fafc;
    color: #475569;
}
.se-free-trial-btn-primary {
    background: #FF8732;
    color: #ffffff;
}
.se-free-trial-btn-primary:hover {
    background: #E06A1A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 135, 50, 0.3);
}
.se-free-trial-note {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
    font-style: italic;
}

/* ── Toggle visibilidad de password ─────────────────────────────────────── */
.se-password-wrap {
    position: relative;
}
.se-password-wrap input[type="password"],
.se-password-wrap input[type="text"] {
    padding-right: 44px; /* deja espacio para el botón */
    width: 100%;
}
.se-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.se-password-toggle:hover {
    color: #007FFF;
    background: #f0f7ff;
}
.se-password-toggle .se-eye {
    width: 20px;
    height: 20px;
}

/* ── Cupón de descuento ──────────────────────────────────────────────────── */
.se-coupon-block {
    margin: 16px 0 20px;
    padding: 14px 16px;
    background: #fafbfd;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.se-coupon-toggle {
    background: none;
    border: none;
    color: #007FFF;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    text-align: left;
    width: 100%;
}
.se-coupon-toggle:hover { color: #005FCC; text-decoration: underline; }

.se-coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.se-coupon-row input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: #fff;
}
.se-coupon-row input[type="text"]:focus {
    outline: none;
    border-color: #007FFF;
    box-shadow: 0 0 0 3px rgba(0,127,255,0.12);
}

.se-coupon-apply {
    padding: 10px 18px;
    background: #007FFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.se-coupon-apply:hover:not(:disabled) { background: #005FCC; }
.se-coupon-apply:disabled { opacity: 0.6; cursor: wait; }

.se-coupon-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
}
.se-coupon-msg.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #dc2626;
}
.se-coupon-msg.is-success {
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}

/* Resumen del descuento aplicado */
.se-coupon-summary {
    margin-top: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #22c55e;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.se-coupon-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #475569;
}
.se-coupon-line strong { color: #15803d; font-weight: 700; }
.se-coupon-line--discount { color: #15803d; font-weight: 600; }
.se-coupon-line--total {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.se-coupon-note {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 4px;
    font-style: italic;
}
.se-coupon-remove {
    align-self: flex-start;
    background: none;
    border: none;
    color: #b91c1c;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 2px 0;
    margin-top: 2px;
}
.se-coupon-remove:hover { text-decoration: underline; }
