:root {
  --auth-orange: #ec5e1e;
  --auth-orange-dark: #d94e12;
  --auth-ink: #171717;
  --auth-muted: #706b63;
  --auth-line: #e2ddd4;
  --auth-warm: #f7f5ef;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  background: var(--auth-warm);
  color: var(--auth-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.auth-page {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: clamp(38px, 6vw, 82px) 24px;
  background:
    radial-gradient(circle at 5% 12%, rgba(236, 94, 30, .08), transparent 29%),
    radial-gradient(circle at 92% 85%, rgba(236, 94, 30, .06), transparent 25%),
    var(--auth-warm);
}

.auth-layout {
  width: min(1080px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(40, 31, 22, .11);
}

.auth-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(42px, 5vw, 70px);
  background: linear-gradient(145deg, #f06b2e 0%, var(--auth-orange) 55%, #ce4510 100%);
  color: #fff;
}

.auth-intro::before,
.auth-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 42% 58% 63% 37% / 43% 36% 64% 57%;
}
.auth-intro::before { top: -215px; right: -190px; transform: rotate(24deg); }
.auth-intro::after { right: -245px; bottom: -255px; transform: rotate(-15deg); }

.auth-intro__mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 46px;
  border-radius: 18px;
  background: #fff;
  color: var(--auth-orange);
  box-shadow: 0 13px 30px rgba(121, 39, 6, .2);
  font-size: 23px;
}

.auth-eyebrow,
.login-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-eyebrow { color: rgba(255, 255, 255, .8); }
.login-kicker { color: var(--auth-orange); }

.auth-intro h1 {
  max-width: 500px;
  margin: 0;
  font-size: clamp(42px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}
.auth-intro__copy {
  max-width: 480px;
  margin: 23px 0 36px;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
  line-height: 1.65;
}
.auth-benefits {
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-benefits li { display: flex; align-items: flex-start; gap: 13px; }
.auth-benefits li > i {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  font-size: 13px;
}
.auth-benefits span { color: rgba(255, 255, 255, .77); font-size: 13px; line-height: 1.45; }
.auth-benefits strong { display: block; margin-bottom: 2px; color: #fff; font-size: 14px; }

.login-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 5.3vw, 72px);
  background: #fff;
}

.title {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.045em;
}
.subtitle { margin: 12px 0 30px; color: var(--auth-muted); font-size: 15px; line-height: 1.55; }

.auth-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 11px 0 0;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.auth-btn:hover { transform: translateY(-1px); }
.auth-btn i { width: 20px; font-size: 21px; }
.auth-btn--apple { border: 1px solid #111; background: #111; color: #fff; }
.auth-btn--apple:hover { box-shadow: 0 8px 20px rgba(17, 17, 17, .16); }
.auth-btn--phone { border: 1px solid var(--auth-line); background: #fff; color: var(--auth-ink); }
.auth-btn--phone i { color: var(--auth-orange); font-size: 18px; }
.auth-btn--phone:hover { border-color: var(--auth-orange); }

.form { display: grid; gap: 11px; }
.label { margin-top: 2px; color: #39352f; font-size: 13px; font-weight: 700; }
.input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #d8d2c8;
  border-radius: 13px;
  padding: 13px 15px;
  background: #fff;
  color: var(--auth-ink);
  font-size: 16px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus { border-color: var(--auth-orange); box-shadow: 0 0 0 4px rgba(236, 94, 30, .12); }
.input--code { text-align: center; font-size: 24px; font-weight: 750; letter-spacing: .28em; }

.btn-primary {
  width: 100%;
  min-height: 54px;
  margin-top: 3px;
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  background: var(--auth-orange);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.btn-primary:hover { background: var(--auth-orange-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .65; cursor: wait; }

.panel-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.panel-back:hover { color: var(--auth-orange); }

.signup { margin: 25px 0 0; color: var(--auth-muted); text-align: center; font-size: 13px; }
.link { color: var(--auth-orange); font-weight: 750; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.status { min-height: 19px; margin: 12px 0 0; color: #21834b; font-size: 13px; line-height: 1.4; text-align: center; }
.status.error { color: #b42318; }
.terms { margin: 28px 0 0; color: #928b82; font-size: 10px; line-height: 1.55; text-align: center; }
.terms a { color: inherit; text-underline-offset: 2px; }
.hidden { display: none !important; }

/* Registration continues to use the same secure phone verification flow. */
.shell {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 60px 24px;
  background: var(--auth-warm);
}
.shell .card {
  width: min(520px, 100%);
  padding: 42px;
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(40, 31, 22, .1);
}
.back-link { display: inline-flex; margin-bottom: 25px; color: var(--auth-muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.logo-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.logo { height: 42px; object-fit: contain; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-row > div { display: grid; gap: 8px; }
.profile-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 7px 0 5px;
  padding: 14px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: #faf8f4;
}
.profile-upload__preview {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffe7db;
  color: var(--auth-orange);
  font-size: 23px;
}
.profile-upload__preview img { width: 100%!important; height: 100%!important; min-width: 100%; min-height: 100%; max-width: none!important; max-height: none!important; display: block; object-fit: cover!important; object-position: center center!important; }
.profile-upload__preview img.profile-image-tall { transform: scale(1.65); transform-origin: 50% 30%; }
.profile-upload__copy { display: grid; gap: 7px; }
.profile-upload__button {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.profile-upload__button:hover { color: var(--auth-orange); }
.profile-upload__button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: currentColor; }
.profile-upload__copy span { color: var(--auth-muted); font-size: 10px; line-height: 1.4; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 860px) {
  .auth-page { padding: 28px 18px 48px; }
  .auth-layout { min-height: 0; grid-template-columns: 1fr; border-radius: 25px; }
  .auth-intro { min-height: 310px; padding: 40px; }
  .auth-intro__mark { margin-bottom: 25px; }
  .auth-intro h1 { max-width: 620px; font-size: clamp(38px, 8vw, 54px); }
  .auth-intro__copy { margin-bottom: 0; }
  .auth-benefits { display: none; }
  .login-card { min-height: 480px; padding: 46px 40px; }
}

@media (max-width: 520px) {
  .auth-page { min-height: 0; padding: 14px 12px 34px; }
  .auth-layout { border-radius: 20px; }
  .auth-intro { min-height: 245px; padding: 30px 25px; }
  .auth-intro__mark { width: 48px; height: 48px; margin-bottom: 20px; border-radius: 15px; font-size: 19px; }
  .auth-intro h1 { font-size: 38px; }
  .auth-intro__copy { margin-top: 16px; font-size: 14px; line-height: 1.5; }
  .login-card { min-height: 455px; padding: 38px 24px; }
  .title { font-size: 35px; }
  .subtitle { margin-bottom: 25px; font-size: 14px; }
  .auth-btn { font-size: 14px; }
  .shell { padding: 30px 14px; }
  .shell .card { padding: 28px 22px; }
  .field-row { grid-template-columns: 1fr; }
}
