/* ===========================================================
   PakRobots · auth screens (sign up / sign in / verify / reset)
   Depends on base.css tokens only.
   =========================================================== */

.auth-body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- slim header ---------- */
.auth-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.auth-head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
}
.auth-brand img {
  width: auto;
  height: 30px;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: color .2s var(--ease), border-color .2s var(--ease), translate .2s var(--ease);
}
.auth-back:hover {
  color: var(--ink);
  border-color: var(--ink);
  translate: -2px 0;
}
.auth-back svg { width: 14px; height: 14px; }

/* ---------- layout ---------- */
.auth-body > main { flex: 1; }

.auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - 68px - 84px);
}

/* ---------- left brand panel ---------- */
.auth-panel {
  position: relative;
  min-width: 0;
  background: var(--y);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px clamp(32px, 6vw, 88px);
  isolation: isolate;
}
.auth-panel::after {
  content: "";
  position: absolute;
  inset: auto -120px -180px auto;
  width: 420px;
  height: 420px;
  border: 2px solid rgba(16, 16, 20, .12);
  border-radius: 50%;
  z-index: -1;
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: -140px auto auto -160px;
  width: 360px;
  height: 360px;
  border: 2px solid rgba(16, 16, 20, .1);
  border-radius: 50%;
  z-index: -1;
}
.auth-panel-in { max-width: 460px; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(16, 16, 20, .66);
  margin-bottom: 22px;
}
.auth-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--ink);
}
.auth-panel h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -.028em;
  margin-bottom: 18px;
}
.auth-panel h1 em {
  font-style: normal;
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--ink);
}
.auth-panel p {
  font-size: 14.5px;
  line-height: 1.62;
  color: rgba(16, 16, 20, .74);
  max-width: 38ch;
}
.auth-points {
  margin-top: 34px;
  display: grid;
  gap: 12px;
}
.auth-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(16, 16, 20, .86);
}
.auth-points svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
}
.auth-panel-foot {
  position: absolute;
  left: clamp(32px, 6vw, 88px);
  bottom: 28px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(16, 16, 20, .55);
}

/* ---------- right form area ---------- */
.auth-form-side {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px clamp(20px, 5vw, 72px);
}
.auth-card {
  width: 100%;
  max-width: min(430px, 100%);
  animation: authIn .55s var(--ease) both;
}
@keyframes authIn {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

.auth-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 10px;
}
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.auth-sub {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mut);
  margin-bottom: 26px;
}
.auth-sub strong { color: var(--ink); font-weight: 600; }

/* ---------- fields ---------- */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 7px;
  color: var(--ink);
}
.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field-wrap svg.f-ico {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--mut);
  pointer-events: none;
  transition: color .2s var(--ease);
}
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.field-wrap.has-ico input { padding-left: 44px; }
/* keep typed text clear of the show/hide eye */
.field-wrap:has(.field-eye) input { padding-right: 46px; }
.field-wrap input[type="password"] { padding-right: 46px; }
.field input::placeholder { color: #B3AC9C; }
.field input:hover { border-color: #D9CFB8; }
.field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, .45);
}

/* country / city selects share the input shell */
.field select {
  width: 100%;
  height: 48px;
  padding: 0 34px 0 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field-wrap.has-ico select { padding-left: 44px; }
.field select:hover { border-color: #D9CFB8; }
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, .45);
}
.field-wrap:focus-within svg.f-ico { color: var(--ink); }

.field-eye {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--mut);
}
.field-eye:hover { color: var(--ink); background: var(--paper-2); }
.field-eye svg { width: 17px; height: 17px; }

.field-err {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #B3261E;
}
.field.is-bad input { border-color: #D9534F; }
.field.is-bad .field-err { display: block; }

/* password strength */
.pw-meter {
  margin-top: 9px;
  display: none;
  gap: 8px;
  align-items: center;
}
.pw-meter.on { display: flex; }
.pw-bars { display: flex; gap: 4px; flex: 1; }
.pw-bars i {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--line);
  transition: background .25s var(--ease);
}
.pw-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mut);
  min-width: 54px;
  text-align: right;
}
.pw-meter[data-score="1"] .pw-bars i:nth-child(-n+1) { background: #D9534F; }
.pw-meter[data-score="2"] .pw-bars i:nth-child(-n+2) { background: #E39A1B; }
.pw-meter[data-score="3"] .pw-bars i:nth-child(-n+3) { background: #7BA23F; }
.pw-meter[data-score="4"] .pw-bars i { background: #2E7D32; }

/* ---------- rows ---------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
  font-size: 12.5px;
}
.auth-row a {
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.auth-row a:hover { border-bottom-color: var(--ink); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mut);
  font-size: 12.5px;
}
.check input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.check input:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.check input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border: 1.6px solid var(--y);
  border-top: 0;
  border-right: 0;
  rotate: -45deg;
  translate: 0 -1px;
}

/* ---------- buttons ---------- */
.btn-auth {
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-auth:hover:not(:disabled) {
  background: var(--y);
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 16, 20, .14);
}
.btn-auth:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-auth:disabled { opacity: .55; }
.btn-auth.is-busy { pointer-events: none; }
.btn-auth svg { width: 16px; height: 16px; }

.btn-spin {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-auth.is-busy .btn-spin { display: block; }
.btn-auth.is-busy .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }

.auth-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--mut);
}
.auth-alt a {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--y);
  transition: border-color .2s var(--ease);
}
.auth-alt a:hover { border-bottom-color: var(--ink); }

/* ---------- notices ---------- */
.note {
  display: none;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 12.8px;
  line-height: 1.55;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.note.on { display: flex; }
.note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.note--err { background: #FDF0EF; border-color: #F3C9C5; color: #8C1D18; }
.note--ok { background: #F1F7EC; border-color: #CDE0BE; color: #2B5E1E; }
.note--info { background: var(--paper-2); border-color: var(--line); color: #5C5647; }

/* ---------- OTP ---------- */
.otp-wrap {
  display: flex;
  gap: 9px;
  min-width: 0;
  margin: 4px 0 6px;
}
.otp-wrap input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 0;
  height: 58px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), scale .18s var(--ease);
}
.otp-wrap input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, .45);
  scale: 1.02;
}
.otp-wrap input.is-filled { background: var(--paper-2); border-color: #D9CFB8; }
.otp-wrap.is-bad input { border-color: #D9534F; animation: shake .32s ease; }
@keyframes shake {
  25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; }
}
.otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 22px;
  font-size: 12.5px;
  color: var(--mut);
}
.otp-meta button {
  border: 0;
  background: none;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink);
  padding: 0;
  border-bottom: 1.5px solid var(--y);
}
.otp-meta button:disabled {
  color: #B3AC9C;
  border-bottom-color: transparent;
}

/* ---------- success / states ---------- */
.state-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--y);
  margin-bottom: 20px;
  animation: popIn .45s var(--ease) both;
}
.state-ico svg { width: 26px; height: 26px; color: var(--ink); }
@keyframes popIn {
  from { scale: .7; opacity: 0; }
  to { scale: 1; opacity: 1; }
}

/* ---------- account page ---------- */
.acct-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 0 80px;
  width: calc(100% - 40px);
}
.acct-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.acct-ava {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--y);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  flex: 0 0 60px;
}
.acct-head h1 {
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.acct-head .mail {
  font-size: 13px;
  color: var(--mut);
  margin-top: 3px;
}
.acct-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.card .card-sub {
  font-size: 12.5px;
  color: var(--mut);
  margin-bottom: 20px;
  line-height: 1.55;
}
.kv {
  display: grid;
  gap: 0;
}
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--mut); }
.kv-row dd { font-weight: 600; margin: 0; text-align: right; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: #F1F7EC;
  color: #2B5E1E;
  border: 1px solid #CDE0BE;
}
.pill--warn { background: #FFF8E6; color: #8A6100; border-color: #F0DFAF; }

.acct-links { display: grid; gap: 10px; }
.acct-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .2s var(--ease), translate .2s var(--ease);
}
.acct-link:hover { border-color: var(--ink); translate: 2px 0; }
.acct-link svg { width: 15px; height: 15px; color: var(--mut); }
.acct-link--danger { color: #8C1D18; }
.acct-link--danger:hover { border-color: #8C1D18; }

@media (max-width: 900px) {
  .acct-grid { grid-template-columns: 1fr; }
}

/* ---------- footer strip ---------- */
.auth-foot {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--mut);
}
.auth-foot-links {
  display: flex;
  gap: 18px;
}
.auth-foot-links a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .auth-main { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-panel {
    padding: 40px 24px 44px;
    align-items: flex-start;
  }
  .auth-panel::before, .auth-panel::after { display: none; }
  .auth-panel h1 { font-size: clamp(27px, 7vw, 34px); max-width: 15ch; }
  .auth-panel p { font-size: 13.5px; max-width: 46ch; }
  .auth-points { margin-top: 22px; grid-template-columns: 1fr; gap: 9px; }
  .auth-panel-foot { display: none; }
  .auth-form-side { padding: 32px 20px 48px; }
  .auth-card { max-width: min(470px, 100%); }
}

@media (max-width: 430px) {
  .otp-wrap { gap: 6px; }
  .otp-wrap input { height: 50px; font-size: 19px; border-radius: 9px; }
}

@media (max-width: 560px) {
  .auth-head-in { height: 60px; }
  .auth-brand img { height: 25px; }
  .auth-back { font-size: 12px; padding: 7px 12px; }
  .auth-panel { padding: 30px 18px 34px; }
  .auth-eyebrow { margin-bottom: 14px; font-size: 10px; }
  .auth-panel h1 { font-size: 27px; }
  .auth-panel p { font-size: 13px; line-height: 1.55; }
  .auth-points { display: none; }
  .auth-form-side { padding: 26px 18px 40px; }
  .auth-card h2 { font-size: 23px; }
  .otp-wrap input { height: 52px; font-size: 20px; }
  .otp-wrap { gap: 7px; }
  .auth-foot { padding: 22px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
  .acct-wrap { padding-top: 30px; }
  .acct-ava { width: 48px; height: 48px; flex-basis: 48px; font-size: 18px; }
  .acct-head h1 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card, .state-ico { animation: none; }
  .pw-bars i, .otp-wrap input { transition: none; }
}
