/* ═══════════════════════════════════════════════════════════════
   Sbalott — Página de Acceso (Login + Registro)  auth.css v3.0
   Diseño moderno, claro, internacional — Mobile-First
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --auth-primary:    #6366f1;
  --auth-primary-dk: #4f46e5;
  --auth-primary-lt: #eef2ff;
  --auth-accent:     #f97316;
  --auth-bg:         #f8fafc;
  --auth-surface:    #ffffff;
  --auth-border:     #e8edf5;
  --auth-border-2:   #d1d9e8;
  --auth-text:       #0f172a;
  --auth-text-2:     #334155;
  --auth-muted:      #64748b;
  --auth-light:      #94a3b8;
  --auth-green:      #10b981;
  --auth-red:        #ef4444;
  --auth-font:       'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
  --auth-radius:     12px;
  --auth-shadow:     0 4px 20px rgba(15,23,42,.08);
  --auth-shadow-lg:  0 20px 60px rgba(15,23,42,.14);
}

/* ── Body Background ─────────────────────────────────────────── */
body:has(.sbmp-auth-wrap) {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.sbmp-auth-wrap {
  max-width: 520px;
  margin: 36px auto 64px;
  padding: 0 16px;
  font-family: var(--auth-font);
  color: var(--auth-text);
  -webkit-font-smoothing: antialiased;
}
.sbmp-auth-wrap *, .sbmp-auth-wrap *::before, .sbmp-auth-wrap *::after { box-sizing: border-box; }

/* Brand */
.sbmp-auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.sbmp-auth-logo { height: 44px; width: auto; }
.sbmp-auth-logo-text { font-size: 34px; font-weight: 900; color: var(--auth-primary); letter-spacing: -1.5px; }
.sbmp-auth-tagline { font-size: 13px; color: var(--auth-muted); margin-top: 5px; }

/* Trust badges */
.sbmp-auth-trust {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 10px; flex-wrap: wrap;
}
.sbmp-auth-trust-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--auth-muted); font-weight: 500;
}

/* Tabs */
.sbmp-auth-tabs {
  display: flex;
  background: var(--auth-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}
.sbmp-auth-tab {
  flex: 1; text-align: center;
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--auth-muted);
  transition: all .18s ease;
}
.sbmp-auth-tab:hover { color: var(--auth-text); text-decoration: none; }
.sbmp-auth-tab.active {
  background: var(--auth-surface);
  color: var(--auth-primary);
  box-shadow: 0 2px 8px rgba(15,23,42,.1);
  font-weight: 700;
}

/* Mensaje de error/éxito */
.sbmp-auth-msg {
  padding: 14px 18px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 18px; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 9px;
}
.sbmp-auth-msg--error   { background: #fef2f2; color: var(--auth-red); border: 1.5px solid #fecaca; }
.sbmp-auth-msg--success { background: #ecfdf5; color: var(--auth-green); border: 1.5px solid #a7f3d0; }

/* Card */
.sbmp-auth-card {
  background: var(--auth-surface);
  border: 1.5px solid var(--auth-border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--auth-shadow-lg);
}
.sbmp-auth-title { font-size: 22px; font-weight: 800; margin: 0 0 5px; letter-spacing: -.3px; }
.sbmp-auth-sub   { font-size: 13.5px; color: var(--auth-muted); margin: 0 0 24px; }

/* Vendor hero */
.sbmp-auth-vendor-hero {
  text-align: center; margin-bottom: 22px;
  background: var(--auth-primary-lt); border-radius: 14px; padding: 20px;
}
.sbmp-auth-vendor-hero span { font-size: 44px; display: block; margin-bottom: 8px; }
.sbmp-auth-vendor-hero strong { font-size: 16px; color: var(--auth-primary); display: block; }
.sbmp-auth-vendor-hero p { font-size: 13px; color: var(--auth-muted); margin: 4px 0 0; }

/* Form */
.sbmp-auth-form { display: flex; flex-direction: column; gap: 18px; }

.sbmp-auth-field { display: flex; flex-direction: column; gap: 6px; }
.sbmp-auth-field label { font-size: 13px; font-weight: 600; color: var(--auth-text-2); }
.sbmp-auth-field input[type=text],
.sbmp-auth-field input[type=email],
.sbmp-auth-field input[type=password],
.sbmp-auth-field input[type=number],
.sbmp-auth-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius);
  font-size: 14px; font-family: var(--auth-font);
  color: var(--auth-text); background: var(--auth-surface);
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.sbmp-auth-field input:focus,
.sbmp-auth-field textarea:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}
.sbmp-auth-field input::placeholder { color: var(--auth-light); }
.sbmp-auth-field small { font-size: 12px; color: var(--auth-muted); }
.req { color: var(--auth-red); }

/* Field row 2 cols */
.sbmp-auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Password input with toggle */
.sbmp-auth-pw-wrap { position: relative; }
.sbmp-auth-pw-wrap input { padding-right: 44px; }
.sbmp-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 17px;
  color: var(--auth-muted); padding: 0; line-height: 1; transition: color .15s;
}
.sbmp-pw-toggle:hover { color: var(--auth-text); }

/* Strength bar */
.sbmp-strength-bar {
  height: 5px; border-radius: 3px; background: var(--auth-border);
  margin-top: 7px; overflow: hidden;
}
.sbmp-strength-fill {
  height: 100%; width: 0; border-radius: 3px;
  transition: width .3s ease, background .3s ease;
  background: var(--auth-red);
}
.sbmp-strength-req {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px;
}
.sbmp-strength-req span {
  font-size: 11.5px; color: var(--auth-muted); background: var(--auth-bg);
  padding: 3px 9px; border-radius: 20px; transition: all .2s; border: 1px solid var(--auth-border);
}
.sbmp-strength-req span.ok { background: #ecfdf5; color: var(--auth-green); border-color: #a7f3d0; }
.sbmp-match-tip { font-size: 12px; font-weight: 600; margin-top: 4px; }

/* Remember + forgot */
.sbmp-auth-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sbmp-auth-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; cursor: pointer;
}
.sbmp-auth-check input { accent-color: var(--auth-primary); width: 16px; height: 16px; }
.sbmp-auth-link { font-size: 13px; color: var(--auth-primary); text-decoration: none; font-weight: 600; }
.sbmp-auth-link:hover { text-decoration: underline; }

/* Vendor option */
.sbmp-auth-vendor-option {
  background: var(--auth-primary-lt); border: 1.5px solid #c7d2fe; border-radius: var(--auth-radius); padding: 14px;
}
.sbmp-vendor-label {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 13.5px;
}
.sbmp-vendor-label input { accent-color: var(--auth-primary); width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }

/* Vendor section dentro del form */
.sbmp-auth-vendor-section {
  background: var(--auth-bg); border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius); padding: 18px;
}
.sbmp-auth-vendor-section h4 {
  font-size: 13.5px; font-weight: 700; margin: 0 0 16px;
  color: var(--auth-text);
}

/* Captcha */
.sbmp-captcha-field {
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: var(--auth-radius); padding: 14px 16px;
}

/* Submit button */
.sbmp-auth-btn {
  width: 100%; padding: 13px 22px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dk));
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; font-family: var(--auth-font);
  cursor: pointer; transition: all .18s ease; margin-top: 4px;
  letter-spacing: .2px;
}
.sbmp-auth-btn:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.35); }
.sbmp-auth-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Divider social */
.sbmp-auth-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--auth-muted); margin: 4px 0;
}
.sbmp-auth-divider::before, .sbmp-auth-divider::after {
  content: ''; flex: 1; height: 1.5px; background: var(--auth-border);
}

/* Switch link */
.sbmp-auth-switch {
  text-align: center; font-size: 13.5px; color: var(--auth-muted);
  margin-top: 20px; margin-bottom: 0;
}
.sbmp-auth-switch a { color: var(--auth-primary); font-weight: 700; text-decoration: none; }
.sbmp-auth-switch a:hover { text-decoration: underline; }

/* Security note */
.sbmp-auth-security {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 18px; font-size: 12px; color: var(--auth-light);
}

/* Responsive */
@media (max-width: 540px) {
  .sbmp-auth-card { padding: 24px 18px; border-radius: 16px; }
  .sbmp-auth-field-row { grid-template-columns: 1fr; }
  .sbmp-auth-wrap { margin-top: 20px; }
}
