/* Auth enhancements: password toggle, strength, country phone picker, register polish */
.auth-page {
  --auth-navy: var(--site-navy, #16324f);
  --auth-teal: var(--site-primary, #006b70);
  --auth-ink: #1d2939;
  --auth-muted: #64748b;
  --auth-line: #dce6e7;
  --auth-soft: #f2f7f6;
  padding: 48px 20px 72px;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, color-mix(in srgb, var(--auth-teal) 12%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, color-mix(in srgb, var(--auth-navy) 10%, transparent), transparent 50%),
    var(--auth-soft);
  font-family: Manrope, Segoe UI, sans-serif;
  color: var(--auth-ink);
}

.auth-page .account-shell {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 460px);
  gap: 48px;
  align-items: start;
}

.auth-intro-panel {
  padding: 28px 8px 0;
}

.auth-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.auth-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--auth-line);
  font-size: 12px;
  font-weight: 700;
  color: var(--auth-muted);
}

.auth-step.is-active {
  color: var(--auth-teal);
  border-color: color-mix(in srgb, var(--auth-teal) 35%, #fff);
  background: color-mix(in srgb, var(--auth-teal) 8%, #fff);
}

.auth-step-num {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: color-mix(in srgb, var(--auth-teal) 14%, #fff);
  color: var(--auth-teal);
}

.auth-card {
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 18px 40px rgba(22, 50, 79, 0.08);
}

.auth-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--auth-navy);
  letter-spacing: -0.02em;
}

.auth-card-note {
  margin: 0 0 20px;
  color: #708190;
  font-size: 13px;
  line-height: 1.55;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field > label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #395268;
  margin-bottom: 6px;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="tel"],
.auth-field input[type="password"] {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid #ccd9df;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--auth-ink);
  font: 500 14px/1.4 Manrope, Segoe UI, sans-serif;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-teal) 18%, transparent);
}

.auth-pass-wrap {
  position: relative;
}

.auth-pass-wrap input {
  padding-right: 48px !important;
}

.auth-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.auth-pass-toggle:hover {
  background: #f1f5f5;
  color: var(--auth-navy);
}

.auth-pass-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.auth-pass-meter span {
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
}

.auth-pass-meter[data-score="1"] span:nth-child(-n+1) { background: #ef4444; }
.auth-pass-meter[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.auth-pass-meter[data-score="3"] span:nth-child(-n+3) { background: #3b82f6; }
.auth-pass-meter[data-score="4"] span:nth-child(-n+4) { background: #10b981; }

.auth-pass-hints {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.auth-pass-hints li {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-pass-hints li.is-ok {
  color: #059669;
}

.auth-pass-hints li::before {
  content: "○";
  font-size: 10px;
}

.auth-pass-hints li.is-ok::before {
  content: "●";
}

.auth-phone {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
}

.auth-cc {
  position: relative;
}

.auth-cc-btn {
  width: 100%;
  height: 48px;
  border: 1px solid #ccd9df;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
  font: 650 13px/1 Manrope, Segoe UI, sans-serif;
  color: var(--auth-ink);
}

.auth-cc-btn:hover,
.auth-cc.is-open .auth-cc-btn {
  border-color: var(--auth-teal);
}

.auth-cc-flag {
  font-size: 16px;
  line-height: 1;
}

.auth-cc-dial {
  flex: 1;
  text-align: left;
}

.auth-cc-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 6px);
  width: min(320px, 80vw);
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  display: none;
}

.auth-cc.is-open .auth-cc-panel {
  display: block;
}

.auth-cc-search {
  padding: 10px;
  border-bottom: 1px solid #eef2f4;
}

.auth-cc-search input {
  width: 100%;
  height: 40px;
  border: 1px solid #d0dbe3;
  border-radius: 10px;
  padding: 0 12px;
  font: 500 13px Manrope, Segoe UI, sans-serif;
}

.auth-cc-list {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
}

.auth-cc-list button {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: 500 13px Manrope, Segoe UI, sans-serif;
  color: var(--auth-ink);
}

.auth-cc-list button:hover,
.auth-cc-list button.is-active {
  background: #f1f5f5;
}

.auth-cc-list .cc-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-cc-list .cc-dial {
  color: var(--auth-muted);
  font-weight: 700;
}

.auth-cc-empty {
  padding: 16px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  padding: 12px 20px;
  background: var(--auth-teal);
  color: #fff !important;
  border: 0;
  border-radius: 12px;
  font: 750 14px/1.4 Manrope, Segoe UI, sans-serif;
  cursor: pointer;
  text-decoration: none !important;
}

.auth-submit:hover {
  filter: brightness(0.95);
}

.auth-otp-input {
  letter-spacing: 0.35em;
  font-size: 22px !important;
  font-weight: 750 !important;
  text-align: center;
}

.auth-resend {
  display: inline-flex;
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--auth-teal);
  font: 700 13px Manrope, Segoe UI, sans-serif;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-benefits {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.auth-benefit {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(220, 230, 231, 0.9);
}

.auth-benefit i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--auth-teal) 12%, #fff);
  color: var(--auth-teal);
  font-size: 18px;
}

.auth-benefit strong {
  display: block;
  font-size: 14px;
  color: var(--auth-navy);
  margin-bottom: 2px;
}

.auth-benefit span {
  font-size: 12.5px;
  color: var(--auth-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .auth-page .account-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-intro-panel {
    padding-top: 8px;
  }
}

@media (max-width: 520px) {
  .auth-phone {
    grid-template-columns: 1fr;
  }

  .auth-cc-panel {
    width: 100%;
  }
}

/* Reusable password toggle outside auth-page */
.spg-pass-wrap {
  position: relative;
}

.spg-pass-wrap > input {
  padding-right: 48px !important;
}

.spg-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.spg-pass-toggle:hover {
  background: #f1f5f5;
  color: #16324f;
}
