:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24262b;
  background: #dedede;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --brand-red: #df0d25;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: linear-gradient(#fff 0%, #f1f1f1 40%, #dedede 100%); }
button, input { font: inherit; }
.auth-page { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 18px 22px 56px; position: relative; }
.back-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 40px; color: #222; font-size: 38px; line-height: 1; text-decoration: none; }
.brand { display: flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; margin: 42px auto 52px; padding: 9px 10px; border-radius: 4px; color: #fff; background: #171717; text-decoration: none; box-shadow: 0 2px 4px #0002; }
.brand-mark { margin-right: 5px; font-size: 17px; color: #fff; }
.brand-name { font-size: clamp(20px, 5.2vw, 27px); font-weight: 600; letter-spacing: -.7px; white-space: nowrap; }
.brand-name span { color: var(--brand-red); }
.brand-divider { width: 1px; height: 29px; margin: 0 10px; background: #858585; }
.brand-swm { color: #e20c2b; font-size: 24px; font-weight: 800; font-style: italic; letter-spacing: -1px; line-height: .8; }
.brand-swm small { display: block; margin-top: 4px; color: #eee; font-size: 6px; font-style: normal; font-weight: 600; letter-spacing: 1.2px; text-align: center; }
.auth-card { width: 100%; }
.auth-card form { display: grid; gap: 20px; }
.field { display: flex; width: 100%; min-height: 52px; align-items: center; border: 1px solid #eee; border-radius: 5px; padding: 0 19px; background: #fff; color: #333; font-size: 15px; text-align: left; box-shadow: 0 1px 2px #00000008; }
.field::placeholder { color: #525761; opacity: 1; }
.country-trigger { justify-content: space-between; cursor: pointer; }
.chevron { color: #858585; font-size: 20px; }
.phone-field { display: flex; align-items: center; min-height: 52px; padding-left: 15px; border: 1px solid #eee; border-radius: 5px; background: #fff; }
.phone-prefix { flex: 0 0 auto; color: #353535; font-size: 14px; }
.phone-input { min-width: 0; border: 0; box-shadow: none; }
.phone-input:focus { outline: 0; }
.phone-field:focus-within { outline: 2px solid #df0d2540; }
.remember-row { display: flex; width: max-content; align-items: center; gap: 8px; margin: 8px 0 20px 5px; color: #333; font-size: 14px; }
.remember-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-red); }
.primary-button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 28px; background: var(--brand-red); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 5px 10px #0002; }
.primary-button:active { transform: translateY(1px); }
.switch-copy { margin: 16px 0 0; color: #333; text-align: center; font-size: 15px; }
.switch-copy a { margin-left: 5px; color: #171717; font-weight: 700; text-decoration: none; }
.switch-copy a:hover { text-decoration: underline; }
.demo-notice { margin: 36px 0 0; color: #666; font-size: 12px; line-height: 1.5; text-align: center; }
.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; }
.country-overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; background: rgba(43, 48, 61, .75); }
.country-overlay[hidden], .country-sheet [hidden] { display: none !important; }
.country-sheet { position: relative; display: flex; flex-direction: column; width: min(100%, 520px); height: 50vh; height: 50dvh; min-height: 0; max-height: none; margin: 0 auto; overflow: hidden; padding-bottom: max(0px, env(safe-area-inset-bottom)); border-radius: 3px 3px 0 0; background: #eee; box-shadow: 0 -8px 32px #16202d26; }
.country-overlay[data-stage="dots"] .country-sheet,
.country-overlay[data-stage="ready"] .country-sheet,
.country-overlay[data-stage="error"] .country-sheet { background: linear-gradient(180deg, #f4f4f4 0%, #dedede 100%); }
.sheet-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; flex: 0 0 54px; height: 54px; padding: 0 8px; background: #e5e5e5; }
.sheet-header h2 { margin: 0; font-family: Arial, sans-serif; font-size: 16px; font-weight: 700; text-align: center; }
.sheet-back { border: 0; padding: 4px 8px; background: transparent; color: #222; font-size: 30px; cursor: pointer; }
.country-loading { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 20px; pointer-events: none; }
.country-spinner { position: relative; display: block; flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 0; background: none; }
.country-spinner span { position: absolute; top: 50%; left: 50%; width: 5px; height: 12px; margin: -6px 0 0 -2.5px; border: 0; border-radius: 0; background: #183c63; transform: rotate(var(--ray-angle)) translateY(-13px); transform-origin: center; animation: country-spoke .8s linear infinite; }
.country-spinner span:nth-child(1) { --ray-angle: 0deg; animation-delay: -.8s; }
.country-spinner span:nth-child(2) { --ray-angle: 45deg; animation-delay: -.7s; }
.country-spinner span:nth-child(3) { --ray-angle: 90deg; animation-delay: -.6s; }
.country-spinner span:nth-child(4) { --ray-angle: 135deg; animation-delay: -.5s; }
.country-spinner span:nth-child(5) { --ray-angle: 180deg; animation-delay: -.4s; }
.country-spinner span:nth-child(6) { --ray-angle: 225deg; animation-delay: -.3s; }
.country-spinner span:nth-child(7) { --ray-angle: 270deg; animation-delay: -.2s; }
.country-spinner span:nth-child(8) { --ray-angle: 315deg; animation-delay: -.1s; }
.country-dots { display: flex; align-items: center; justify-content: center; gap: 7px; }
.country-dots span { width: 13px; height: 13px; border-radius: 50%; background: #ff9d00; animation: country-dot 1s ease-in-out infinite alternate; }
.country-dots span:nth-child(2) { width: 19px; height: 19px; background: #ff4e00; animation-delay: .16s; }
.country-dots span:nth-child(3) { background: #ff7916; animation-delay: .32s; }
.country-overlay:not([data-stage="spinner"]) .country-spinner,
.country-overlay:not([data-stage="dots"]) .country-dots { display: none; }
.country-overlay[data-stage="spinner"] .sheet-header,
.country-overlay[data-stage="spinner"] .country-options,
.country-overlay[data-stage="spinner"] .country-error { display: none; }
.country-overlay:not([data-stage="ready"]) .country-options { display: none; }
.country-overlay:not([data-stage="error"]) .country-error { display: none; }
.country-overlay[data-stage="ready"] .country-loading,
.country-overlay[data-stage="error"] .country-loading { display: none; }
.country-options { display: grid; gap: 11px; align-content: start; overflow-y: auto; padding: 34px 14px 18px; }
.country-option { display: flex; min-height: 50px; justify-content: space-between; align-items: center; border: 0; border-radius: 5px; padding: 0 18px; background: #fff; color: #282828; font-size: 15px; cursor: pointer; }
.country-option:hover, .country-option:focus-visible { outline: 2px solid #df0d2540; }
.country-error { position: absolute; inset: 54px 14px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.country-error p { margin: 0; color: #343b44; font-size: 14px; line-height: 1.45; }
.country-error button { min-height: 42px; border: 0; border-radius: 22px; padding: 0 22px; background: #183c63; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
@keyframes country-spoke { 0%, 100% { opacity: 1; } 75% { opacity: .4; } }
@keyframes country-dot { from { transform: translateY(0); opacity: .55; } to { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .country-spinner span, .country-dots span { animation: none; }
}
@media (max-width: 380px) { .auth-page { padding-right: 17px; padding-left: 17px; } .auth-card form { gap: 16px; } .brand { margin-top: 32px; margin-bottom: 40px; } }

/* Full-viewport auth request feedback; hidden stays hidden even against the flex layout. */
.auth-submit-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  pointer-events: auto;
}
.auth-submit-loading[hidden] {
  display: none !important;
}
.auth-submit-dots {
  display: flex;
  width: 54px;
  align-items: center;
  justify-content: space-between;
}
.auth-submit-dots i {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  background: #ff7916;
  animation: auth-submit-dot 850ms ease-in-out infinite alternate;
}
.auth-submit-dots i:nth-child(2) {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
  background: #ff4e00;
  animation-delay: 140ms;
}
.auth-submit-dots i:nth-child(3) {
  background: #ff9d00;
  animation-delay: 280ms;
}
.auth-loading-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes auth-submit-dot {
  from { transform: translateY(0); opacity: .62; }
  to { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-submit-dots i { animation: none; }
}
