/**
 * Card-level auth components (tabs, digit boxes, picker, mobile sheet).
 * Page shell comes from auth-admin-login.css.
 */

.gp-al-card,
.gp-al-theme-portal .gp-al-card {
  box-shadow: none !important;
}

.gp-auth-fixed-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  line-height: 0;
}

.gp-auth-fixed-logo img {
  height: 42px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

.gp-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: #eef2ff;
  border-radius: 12px;
  margin: 14px 0 4px;
}

.gp-auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.gp-auth-tab.is-active {
  background: #fff;
  color: #1e4bff;
  box-shadow: 0 4px 12px rgba(30, 75, 255, 0.12);
}

.gp-auth-card-inner [data-auth-panel][hidden],
[data-auth-panel][hidden] {
  display: none !important;
}

.gp-auth-digits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.gp-auth-digit {
  width: 36px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gp-auth-digit:focus {
  background: #fff;
  border-color: #93b0ff;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.14);
}

.gp-auth-digits[data-count="10"] .gp-auth-digit {
  width: 30px;
  height: 40px;
  font-size: 16px;
}

.gp-auth-mobile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
  min-height: 52px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gp-auth-mobile-row:focus-within {
  border-color: #2f5bff;
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.14);
}

.gp-auth-mobile-cc {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
}

.gp-auth-mobile-row input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
  padding: 14px 0;
  min-width: 0;
}

.gp-auth-mobile-row input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0;
}

.gp-auth-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.gp-auth-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1e4bff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.gp-auth-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.gp-auth-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gp-auth-picker-item:hover {
  border-color: #93b0ff;
  background: #fff;
}

.gp-auth-picker-item strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.gp-auth-picker-item span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: capitalize;
}

.gp-al-submit.is-disabled,
.gp-al-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* Account type picker — desktop modal / mobile bottom sheet */
.gp-auth-sheet-root[hidden] { display: none !important; }

.gp-auth-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
}

.gp-auth-sheet {
  position: fixed;
  z-index: 81;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
}

.gp-auth-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.gp-auth-sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gp-auth-sheet-head p {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.gp-auth-sheet-close {
  appearance: none;
  border: 0;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.gp-auth-type-grid {
  display: grid;
  gap: 10px;
}

.gp-auth-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1.5px solid #e8edf3;
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.gp-auth-type-card:hover {
  border-color: #2f5bff;
  background: #eef2ff;
  transform: translateY(-1px);
}

.gp-auth-type-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1e4bff, #2f5bff);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

.gp-auth-type-card strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.gp-auth-type-card span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

@media (min-width: 1024px) {
  .gp-auth-sheet {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 40px));
    border-radius: 20px;
    padding: 22px 20px 20px;
    border: 1px solid #e8edf3;
  }
}

@media (max-width: 1023px) {
  .gp-auth-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
    animation: gp-auth-sheet-up 0.28s ease;
  }

  .gp-auth-sheet::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 0 auto 14px;
  }

  @keyframes gp-auth-sheet-up {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }

  .gp-auth-digits[data-count="10"] .gp-auth-digit {
    width: calc((100% - 54px) / 10);
    min-width: 24px;
    height: 38px;
    font-size: 14px;
  }
}

/* Mobile: card only on auth shells */
@media (max-width: 1023px) {
  body.gp-admin-login .gp-al-left,
  body.gp-admin-login .gp-al-footer,
  body.gp-admin-login .gp-al-dots,
  body.gp-admin-login .gp-al-dots-amber {
    display: none !important;
  }

  body.gp-admin-login .gp-al-main {
    flex-direction: column;
    padding-bottom: 24px;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
  }

  body.gp-admin-login .gp-al-right {
    width: 100%;
    padding: 20px 16px;
  }

  body.gp-admin-login .gp-al-card {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* ── Compact register wizard (login-card height) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gp-reg-card .gp-al-field { margin-top: 10px; }
.gp-reg-card .gp-al-field:first-of-type { margin-top: 0; }
.gp-reg-card .gp-al-label { margin-bottom: 5px; font-size: 11.5px; }
.gp-reg-card .gp-al-input { min-height: 42px; }
.gp-reg-card .gp-al-input input { font-size: 13.5px; }
.gp-reg-card .gp-auth-mobile-row { min-height: 42px; border-radius: 8px; }
.gp-reg-card .gp-al-submit { margin-top: 12px; min-height: 44px; font-size: 14px; }
.gp-reg-card .gp-al-reg { margin-top: 14px; font-size: 12.5px; }

.gp-reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 0 4px;
}

.gp-reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  color: #94a3b8;
}

.gp-reg-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #94a3b8;
  transition: .2s ease;
}

.gp-reg-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.gp-reg-step.is-active .gp-reg-step-dot {
  background: #1e4bff;
  border-color: #1e4bff;
  color: #fff;
}

.gp-reg-step.is-active .gp-reg-step-label { color: #1e4bff; }

.gp-reg-step-line {
  flex: 1;
  height: 2px;
  max-width: 48px;
  background: #e2e8f0;
  margin-bottom: 16px;
  border-radius: 2px;
}

.gp-reg-step-line.is-done { background: #1e4bff; }

.gp-reg-panel { margin-top: 2px; }

.gp-reg-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.gp-reg-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.gp-reg-plan:hover { border-color: #93b0ff; }

.gp-reg-plan.is-selected {
  border-color: #1e4bff;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(30, 75, 255, .12);
}

.gp-reg-plan-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.gp-reg-plan.is-selected .gp-reg-plan-ico {
  background: #1e4bff;
  color: #fff;
}

.gp-reg-plan-body { flex: 1; min-width: 0; }
.gp-reg-plan-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.gp-reg-plan-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.gp-reg-plan-price {
  text-align: right;
  flex-shrink: 0;
}
.gp-reg-plan-price strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}
.gp-reg-plan.is-selected .gp-reg-plan-price strong { color: #1e4bff; }
.gp-reg-plan-price span {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.gp-reg-hint {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

.gp-reg-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
}

.gp-reg-actions .gp-al-submit {
  flex: 1;
  margin-top: 0;
}

.gp-reg-back {
  width: 44px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.gp-reg-back:hover { background: #eef2ff; color: #1e4bff; }

.gp-reg-strength { margin-top: 6px; }
.gp-reg-strength-bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.gp-reg-strength-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .25s ease;
}
.gp-reg-strength-bar i.is-weak { background: #f87171; }
.gp-reg-strength-bar i.is-ok { background: #fbbf24; }
.gp-reg-strength-bar i.is-strong { background: #34d399; }
.gp-reg-strength span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}
.gp-reg-strength span.is-weak { color: #ef4444; }
.gp-reg-strength span.is-ok { color: #d97706; }
.gp-reg-strength span.is-strong { color: #059669; }

.gp-reg-captcha {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #dbe4ff;
}

.gp-reg-captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.gp-reg-captcha-q {
  flex: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #c7d7ff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #1e4bff;
}

.gp-reg-captcha-row > span {
  font-weight: 800;
  color: #94a3b8;
}

.gp-reg-captcha-a {
  width: 72px;
  min-height: 40px;
  border: 1px solid #c7d7ff;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #1e4bff;
  outline: none;
}

.gp-reg-captcha-a:focus {
  border-color: #1e4bff;
  box-shadow: 0 0 0 3px rgba(30, 75, 255, .15);
}

.gp-al-input.is-err,
.gp-auth-mobile-row.is-err {
  border-color: #fca5a5 !important;
  background: #fef2f2;
}

@media (max-width: 1023px) {
  .gp-reg-plans { max-height: 180px; }
  .gp-reg-step { min-width: 44px; }
  .gp-reg-step-line { max-width: 28px; }
}
