/* =========================================================
   auth.css
   Sign in / Sign up / Reset / Profile page.
   Light, professional. Two-column: brand panel + form card.
   ========================================================= */

.authPage {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(125, 79, 80, 0.10), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(176, 73, 32, 0.10), transparent 26%),
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(252, 228, 234, 0.58), transparent 55%),
    var(--bg-soft);
  position: relative;
  overflow-x: hidden;
}

.authPage::before,
.authPage::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

.authPage::before {
  inset: 0;
  background:
    url("../../images/hero-abstract-bg.svg") center/cover no-repeat,
    linear-gradient(255deg,
      rgba(255, 253, 250, 0) 28%,
      rgba(255, 249, 245, 0.86) 100%);
  transform: scaleX(-1);
  transform-origin: center;
}

.authPage::after {
  width: 320px;
  height: 320px;
  right: -120px;
  top: 120px;
  border-radius: 999px;
  filter: blur(4px);
  background: radial-gradient(closest-side, rgba(31, 90, 74, 0.10), transparent);
}

.nav--slim {
  box-shadow: 0 4px 20px rgba(90,55,56,0.25);
}

.auth {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 34px 0 66px;
}

.auth__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, .86fr);
  gap: 26px;
  align-items: stretch;
}

/* Gentle entrance on page load — panel leads, card follows just
   behind it, so the two halves feel like one composed moment
   instead of popping in flat. */
.auth__panel {
  animation: authPanelIn 0.62s var(--ease-out) both;
}

.auth__card {
  animation: authCardIn 0.62s 0.08s var(--ease-out) both;
}

@keyframes authPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .auth__panel,
  .auth__card {
    animation: none;
  }
}

/* ---- left panel (brand / glow) ----
   Lighter, burgundy-toned to match the site's accent palette
   (same colors as .btn--primary) instead of the old near-black. */
.auth__panel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 36%),
    radial-gradient(70% 90% at 0% 0%, rgba(255, 255, 255, 0.20), transparent 60%),
    radial-gradient(80% 80% at 95% 92%, rgba(15, 17, 21, 0.28), transparent 58%),
    linear-gradient(135deg, #7d4f50 0%, #971d31 45%, #4c0712 100%);
  padding: 54px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 580px;
  box-shadow:
    0 24px 56px rgba(125, 79, 80, 0.28),
    0 8px 22px rgba(125, 79, 80, 0.16);
  isolation: isolate;
}

.auth__panel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius-xl) - 10px);
  pointer-events: none;
}

.auth__panelGlow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

.auth__panelGlow--1 {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -100px;
  background: radial-gradient(closest-side, rgba(252, 228, 234, 0.45), transparent 70%);
  animation: floatSlow 14.64s ease-in-out infinite;
}

.auth__panelGlow--2 {
  width: 320px;
  height: 320px;
  bottom: -120px;
  left: -100px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.20), transparent 70%);
  animation: float 17.08s ease-in-out infinite;
}

.auth__panelInner {
  position: relative;
  z-index: 1;
}

.auth__panel .eyebrow {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 18px;
}

.auth__panel .eyebrow::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), transparent);
}

.auth__panelTitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: #fff;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.auth__limitsWord {
  color: var(--brand-burgundy, #7d4f50) !important;
  -webkit-text-fill-color: var(--brand-burgundy, #7d4f50) !important;
  display: inline !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  font-style: italic;
  line-height: inherit;
  transform: none;
  box-shadow: none;
  -webkit-text-stroke: 0;
  animation: none !important;
}

.auth__panelLead {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.04rem;
  max-width: 440px;
  margin: 0 0 28px;
}

.auth__trustBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  margin-bottom: 22px;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
}

.auth__trustBadge span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.auth__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 28px;
}

.auth__metrics span {
  min-height: 78px;
  padding: 13px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: .78rem;
  line-height: 1.25;
  backdrop-filter: blur(10px);
}

.auth__metrics strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 1rem;
}

.auth__panelList {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
}

.auth__panelList li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: .95rem;
}

.auth__panelList span {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}

.auth__panelFoot {
  color: rgba(255, 255, 255, 0.65);
  font-size: .9rem;
  margin: 0;
}

.auth__panelSwitch {
  color: #fff;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  transition: color var(--duration-hover-micro) var(--ease-hover);
}

.auth__panelSwitch:hover {
  color: var(--accent-100);
}

/* ---- right card ---- */
.auth__card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82)),
    linear-gradient(180deg, var(--bg-card) 55%, var(--bg-card-2) 100%);
  border: 1px solid rgba(125, 79, 80, 0.10);
  border-radius: var(--radius-xl);
  padding: 32px 42px 40px;
  box-shadow:
    0 26px 70px rgba(15, 17, 21, 0.12),
    0 10px 30px rgba(125, 79, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 580px;
  backdrop-filter: blur(18px);
}

.auth__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-500), #b04920, #1f5a4a);
}

.auth__cardTop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--text-mute);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth__cardLogo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(125, 79, 80, 0.12);
}

/* tabs */
.auth__tabs {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(248, 244, 240, 0.78);
  border: 1px solid rgba(22, 16, 24, 0.08);
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  align-self: center;
  width: min(288px, 100%);
  max-width: 288px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 28px rgba(15, 17, 21, 0.05);
}

.auth__demoNote {
  margin: 0 0 20px;
  padding: 10px 14px;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-mute);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: var(--radius-md);
}

.auth__demoNote strong {
  color: var(--accent-700);
  font-weight: 600;
}

.auth__demoNote code {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  border: 1px solid var(--line);
}

.auth__tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 10px 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-mute);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color var(--duration-hover) var(--ease-hover);
  background: transparent;
  border: 0;
}

.auth__tab:hover {
  color: var(--accent-600);
}

.auth__tab.is-active {
  color: #fff;
}

.auth__tabSlider {
  position: absolute;
  z-index: 0;
  top: 5px;
  height: calc(100% - 10px);
  background: var(--accent-500);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-hover-lift) var(--ease-hover), width var(--duration-hover-lift) var(--ease-hover);
  pointer-events: none;
}

/* views */
.auth__view {
  animation: fadeView 0.553s var(--ease-out);
}

.auth__view.is-hidden {
  display: none;
}

@keyframes fadeView {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth__h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.18rem);
  margin: 0 0 6px;
  text-align: center;
}

.auth__h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 12px;
  text-align: center;
}

.auth__sub {
  color: var(--text-mute);
  margin: 0 auto 24px;
  text-align: center;
  max-width: 340px;
}

/* form */
.auth__form {
  display: grid;
  gap: 15px;
  max-width: 410px;
  margin: 0 auto;
  width: 100%;
}

.auth__form--sep {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.auth__label {
  display: grid;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mute);
}

.auth__input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(15, 17, 21, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: .95rem;
  transition: border-color var(--duration-hover) var(--ease-hover), box-shadow var(--duration-hover-lift) var(--ease-hover);
}

.auth__input:focus {
  border-color: var(--accent-400);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-50), 0 12px 30px rgba(125, 79, 80, 0.08);
}

.auth__hint {
  min-height: 18px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mute);
}

.auth__hint.is-checking {
  color: var(--text-dim);
}

.auth__hint.is-ok {
  color: #1a5a37;
}

.auth__hint.is-error {
  color: var(--accent-700);
}

.auth__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 6px;
}

.auth__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-mute);
  cursor: pointer;
}

.auth__remember input {
  accent-color: var(--accent-500);
}

.auth__link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent-600);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--duration-hover-micro) var(--ease-hover);
}

.auth__link:hover {
  color: var(--accent-700);
  text-decoration: underline;
}

.auth__terms {
  font-size: .78rem;
  color: var(--text-dim);
  margin: -6px 0 0;
}

/* separator */
.auth__sep {
  text-align: center;
  margin: 26px auto;
  max-width: 410px;
  position: relative;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-dim);
}

.auth__sep::before,
.auth__sep::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
  background: var(--line);
}

.auth__sep::before {
  left: 0;
}

.auth__sep::after {
  right: 0;
}

/* social */
.auth__social {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 410px;
  margin: 0 auto;
}

.auth__socialBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid rgba(15, 17, 21, 0.10);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--duration-hover-lift) var(--ease-hover),
    border-color var(--duration-hover) var(--ease-hover),
    background var(--duration-hover) var(--ease-hover),
    color var(--duration-hover-micro) var(--ease-hover),
    box-shadow var(--duration-hover-lift) var(--ease-hover);
}

.auth__socialBtn:hover {
  border-color: rgba(125, 79, 80, 0.24);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 17, 21, 0.08);
  transform: translateY(-2px);
}

/* status / inline alert
   The status node sits below each form. When empty it collapses
   to zero height; once a message lands it slides in as a tinted
   alert box with an icon and a clear accent border, so error
   messages (invalid email, password mismatch, etc.) are
   unmistakable. */
.auth__status {
  margin: 16px 0 0;
  min-height: 0;
  max-height: 0;
  padding: 0 14px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(-4px);
  overflow: hidden;
  transition:
    max-height 0.32s var(--ease-out),
    padding 0.32s var(--ease-out),
    opacity 0.28s var(--ease-out),
    transform 0.32s var(--ease-out),
    background 0.28s var(--ease-out),
    border-color 0.28s var(--ease-out),
    color 0.28s var(--ease-out);
}

.auth__status::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* visible state — applied once the JS writes text into the node */
.auth__status.is-shown {
  max-height: 180px;
  padding: 12px 14px;
  opacity: 1;
  transform: translateY(0);
}

/* ---- error (the important one) ---- */
.auth__status.is-error {
  color: var(--accent-700);
  background: var(--accent-50);
  border-color: var(--accent-200);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 8px 22px rgba(125, 79, 80, 0.10);
}

.auth__status.is-error::before {
  /* circled "!" in burgundy */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b0d1e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='13'/><circle cx='12' cy='16.5' r='0.6' fill='%237b0d1e' stroke='none'/></svg>");
}

/* ---- success ---- */
.auth__status.is-ok {
  color: #1a5a37;
  background: #eaf7ef;
  border-color: rgba(31, 107, 67, 0.25);
}

.auth__status.is-ok::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a5a37' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='8 12.5 11 15.5 16.5 9.5'/></svg>");
}

/* legacy fallback — some inline calls may still pass plain
   .ok / .error class names; keep them styled the same way. */
.auth__status.ok {
  color: #1a5a37;
}

.auth__status.error {
  color: var(--accent-700);
}

/* profile */
.auth__profileCard {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
  display: grid;
  gap: 10px;
}

.auth__profileRow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: .92rem;
}

.auth__profileRow span {
  color: var(--text-mute);
}

.auth__profileRow strong {
  color: var(--text);
  font-weight: 600;
}

.auth__profileActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.auth__profileActions .auth__signout {
  margin-top: 0;
  align-self: auto;
}

/* ============================================================
   PASSWORD INPUT + SHOW/HIDE TOGGLE
   Each password field is wrapped in .auth__inputWrap so we can
   anchor an eye-toggle button on the right edge without
   destroying the focus ring on the input itself.
   ============================================================ */
.auth__inputWrap {
  position: relative;
  display: block;
}

.auth__inputWrap .auth__input {
  padding-right: 46px;
  /* room for the eye button */
}

.auth__pwToggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition:
    background var(--duration-hover) var(--ease-hover),
    color var(--duration-hover-micro) var(--ease-hover);
}

.auth__pwToggle:hover {
  background: rgba(125, 79, 80, 0.08);
  color: var(--accent-600);
}

.auth__pwToggle .auth__pwIconShow {
  display: inline;
}

.auth__pwToggle .auth__pwIconHide {
  display: none;
}

.auth__pwToggle.is-shown .auth__pwIconShow {
  display: none;
}

.auth__pwToggle.is-shown .auth__pwIconHide {
  display: inline;
  color: var(--accent-600);
}

.auth__input--error {
  border-color: var(--accent-600) !important;
  box-shadow: 0 0 0 4px var(--accent-50) !important;
  animation: authShake .35s var(--ease-out);
}

@keyframes authShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(2px);
  }
}

/* ============================================================
   PASSWORD STRENGTH METER (sign-up)
   ============================================================ */
.auth__pwStrength {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: -4px 2px 2px;
  font-size: .78rem;
  color: var(--text-dim);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition:
    opacity .25s var(--ease-out),
    max-height .25s var(--ease-out);
}

.auth__pwStrength--show {
  opacity: 1;
  max-height: 40px;
}

.auth__pwStrengthBars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.auth__pwStrengthBars span {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.08);
  transition: background var(--duration-hover) var(--ease-hover);
}

.auth__pwStrength[data-score="1"] .auth__pwStrengthBars span:nth-child(-n+1),
.auth__pwStrength[data-score="2"] .auth__pwStrengthBars span:nth-child(-n+2),
.auth__pwStrength[data-score="3"] .auth__pwStrengthBars span:nth-child(-n+3),
.auth__pwStrength[data-score="4"] .auth__pwStrengthBars span:nth-child(-n+4) {
  background: var(--accent-500);
}

.auth__pwStrength[data-score="1"] .auth__pwStrengthBars span:nth-child(-n+1) {
  background: #c75a3a;
}

.auth__pwStrength[data-score="2"] .auth__pwStrengthBars span:nth-child(-n+2) {
  background: #e3a23c;
}

.auth__pwStrength[data-score="3"] .auth__pwStrengthBars span:nth-child(-n+3) {
  background: #4a9a5a;
}

.auth__pwStrength[data-score="4"] .auth__pwStrengthBars span:nth-child(-n+4) {
  background: #1a7a3f;
}

.auth__pwStrengthLabel {
  font-weight: 600;
  color: var(--text-mute);
}

/* ============================================================
   TERMS-OF-SERVICE CHECKBOX
   ============================================================ */
.auth__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  color: var(--text-mute);
  cursor: pointer;
  font-size: .82rem;
}

.auth__check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-500);
  cursor: pointer;
}

.auth__termsLink {
  color: var(--accent-700);
  text-decoration: underline;
  font-weight: 600;
}

/* ============================================================
   OTP / 6-DIGIT CODE BOXES
   ============================================================ */
.auth__otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 4px 0 2px;
}

.auth__otp>span:first-child {
  text-align: left;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mute);
  margin-bottom: 4px;
}

.auth__otpBox {
  width: 100%;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  border: 1px solid var(--line-hard);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--duration-hover) var(--ease-hover),
    box-shadow var(--duration-hover-lift) var(--ease-hover),
    transform var(--duration-hover-lift) var(--ease-hover);
}

.auth__otpBox:focus {
  outline: none;
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px var(--accent-50);
  transform: translateY(-1px);
}

/* ============================================================
   RESEND-CODE ROW + BACK BUTTON
   ============================================================ */
.auth__resendRow {
  margin: 12px 0 0;
  font-size: .85rem;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.auth__resendRow .auth__link[disabled] {
  color: var(--text-dim);
  cursor: not-allowed;
  text-decoration: none;
}

.auth__back {
  background: none;
  border: 0;
  padding: 4px 0 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
  display: inline-block;
  transition: color var(--duration-hover-micro) var(--ease-hover);
}

.auth__back:hover {
  color: var(--accent-600);
}

/* ============================================================
   SUBMIT BUTTON LOADING STATE
   ============================================================ */
.auth__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth__submit .auth__submitSpin {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  opacity: 0;
  animation: authSpin 0.7s linear infinite;
  transition: opacity .15s var(--ease-out);
}

.auth__submit.is-loading .auth__submitText {
  opacity: 0;
}

.auth__submit.is-loading .auth__submitSpin {
  opacity: 1;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   SOCIAL LOGIN MODAL
   ============================================================ */
.authModal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease-out);
}

.authModal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.authModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.46);
  backdrop-filter: blur(6px);
}

.authModal__panel {
  position: relative;
  width: min(440px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(15, 17, 21, 0.18);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .25s var(--ease-out);
}

.authModal.is-open .authModal__panel {
  transform: translateY(0) scale(1);
}

.authModal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.authModal__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}

.authModal__brandIcon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-50);
  color: var(--accent-700);
  font-weight: 800;
  font-size: .9rem;
  border: 1px solid var(--accent-200);
}

.authModal__close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-hover) var(--ease-hover),
    color var(--duration-hover-micro) var(--ease-hover);
}

.authModal__close:hover {
  background: rgba(15, 17, 21, 0.06);
  color: var(--text);
}

.authModal__body {
  padding: 20px;
}

.authModal__step.is-hidden {
  display: none;
}

.authModal__copy {
  color: var(--text-mute);
  font-size: .9rem;
  margin: 0 0 14px;
}

.authModal__disclaimer {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 17, 21, 0.04);
  font-size: .78rem;
  color: var(--text-mute);
  line-height: 1.5;
}

.authModal__accountList {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.authModal__account {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition:
    border-color var(--duration-hover) var(--ease-hover),
    background var(--duration-hover) var(--ease-hover),
    transform var(--duration-hover-lift) var(--ease-hover);
}

.authModal__account:hover {
  border-color: var(--accent-300);
  background: var(--bg-soft);
  transform: translateY(-1px);
}

.authModal__accountAvatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-200), var(--accent-400));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.authModal__accountText {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.authModal__accountText strong {
  font-size: .92rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authModal__accountText span {
  font-size: .8rem;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authModal__accountChev {
  color: var(--text-dim);
  font-size: 1.4rem;
  font-weight: 600;
}

.authModal__manual {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.authModal__manual .btn {
  justify-self: end;
}

.authModal__spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--accent-100);
  border-top-color: var(--accent-500);
  animation: authSpin 0.8s linear infinite;
  margin: 8px auto 14px;
}

/* ============================================================
   PROFILE (legacy — page now redirects to account.html, but keep
   these in case a future page reuses these classes)
   ============================================================ */
.auth__profileCard {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 22px;
  display: grid;
  gap: 10px;
}

.auth__profileRow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: .92rem;
}

.auth__profileRow span {
  color: var(--text-mute);
}

.auth__profileRow strong {
  color: var(--text);
  font-weight: 600;
}

.auth__profileActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.auth__profileActions .auth__signout {
  margin-top: 0;
  align-self: auto;
}

@media (max-width: 980px) {
  .auth__grid {
    grid-template-columns: 1fr;
  }

  .auth__panel {
    min-height: 0;
    padding: 40px 32px;
  }

  .auth__card {
    padding: 32px 28px;
  }
}

@media (max-width: 520px) {
  .auth__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .auth__otp {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }

  .auth__otpBox {
    height: 48px;
    font-size: 1.15rem;
  }
}
