/* ==========================================================================
   Dollars Cafe — login.css
   Standalone auth page. Relies on global.css for tokens, reset, buttons,
   .glass and focus styles. Link order: global.css → login.css
   ========================================================================== */

.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns:0.95fr 1.55fr;
  background: var(--bg-dark);
}

/* ---------- Left brand panel ---------- */
.auth__brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 5vw, 64px);
  background:
    radial-gradient(800px 600px at 75% 20%, rgba(11,86,208,0.42), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(212,175,55,0.18), transparent 55%),
    linear-gradient(160deg, #06101f 0%, #0f1b2d 100%);
  border-right: 1px solid var(--line);
}
.auth__brand::before {
  /* orbital ring motif */
  content: "";
  position: absolute; z-index: 0;
  width: 64vmin; height: 64vmin; right: -16vmin; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.22);
  box-shadow: inset 0 0 90px rgba(11,86,208,0.3);
  -webkit-mask-image: radial-gradient(circle, transparent 57%, #000 58%);
  mask-image: radial-gradient(circle, transparent 57%, #000 58%);
  animation: auth-spin 60s linear infinite;
}
.auth__brand::after {
  /* faint grid */
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52'%3E%3Cpath d='M0 51.5H52M51.5 0V52' stroke='%23B8C2D1' stroke-opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}
@keyframes auth-spin { to { transform: translateY(-50%) rotate(360deg); } }

.auth__brand-top,
.auth__brand-body,
.auth__brand-foot { position: relative; z-index: 1; }

.auth__logo img { height: 54px; width: auto; }

.auth__brand-body { max-width: 30ch; }
.auth__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 18px 0 14px;
}
.auth__headline .text-gradient {
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth__sub { color: var(--gray-soft); font-size: 1.02rem; }

.auth__points { display: grid; gap: 12px; margin-top: 30px; }
.auth__points li { display: flex; align-items: center; gap: 12px; color: var(--gray-soft); font-size: 0.95rem; }
.auth__points svg { width: 20px; height: 20px; stroke: var(--gold-hi); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.auth__brand-foot { color: var(--gray-soft); font-size: 0.82rem; }

/* ---------- Right form panel ---------- */
.auth__main {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(600px 500px at 90% 0%, rgba(11,86,208,0.12), transparent 60%),
    var(--bg-dark);
}

.auth-card {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-md);
  animation: auth-rise 0.7s var(--ease) both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.auth-card__head { text-align: center; margin-bottom: 30px; }
.auth-card__head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.2rem);
  line-height: 1.1;
}
.auth-card__head p { color: var(--gray-soft); font-size: 0.92rem; margin-top: 8px; }

/* ---------- Fields ---------- */
.auth-field { margin-bottom: 18px; }
.auth-field__wrap { position: relative; }
.auth-field input {
  width: 100%;
  padding: 15px 48px 15px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.98rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.auth-field input::placeholder { color: rgba(184,194,209,0.6); }
.auth-field input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.12);
}
.auth-field input.is-invalid { border-color: #ff8a8a; }

.auth-field__icon {
  position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
  display: grid; place-items: center;
  color: var(--gray-soft); pointer-events: none;
}
.auth-field__icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Password show/hide toggle is clickable */
button.auth-field__icon { pointer-events: auto; background: none; border: none; cursor: pointer; transition: color 0.2s var(--ease); }
button.auth-field__icon:hover { color: var(--gold-hi); }

.auth-error { display: block; min-height: 1em; margin-top: 6px; font-size: 0.8rem; color: #ff8a8a; }

/* ---------- Options row ---------- */
.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 6px 0 24px;
}
.auth-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; color: var(--gray-soft); user-select: none; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check__box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  display: grid; place-items: center;
  transition: all 0.2s var(--ease);
}
.auth-check__box svg { width: 13px; height: 13px; stroke: #1c1402; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: all 0.2s var(--ease); }
.auth-check input:checked + .auth-check__box { background: var(--grad-gold); border-color: var(--gold); }
.auth-check input:checked + .auth-check__box svg { opacity: 1; transform: scale(1); }
.auth-check input:focus-visible + .auth-check__box { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.auth-forgot { font-size: 0.9rem; color: var(--gold); font-weight: 500; transition: color 0.2s var(--ease); }
.auth-forgot:hover { color: var(--gold-hi); text-decoration: underline; }

/* ---------- Submit + footer ---------- */
.auth-card .btn--login { width: 100%; --btn-py: 16px; font-size: 1.02rem; letter-spacing: 0.04em; }

.auth-msg { min-height: 1.1em; margin-top: 14px; text-align: center; font-size: 0.9rem; color: var(--gold-hi); }

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0; color: var(--gray-soft); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-register { text-align: center; font-size: 0.94rem; color: var(--gray-soft); }
.auth-register a { color: var(--gold); font-weight: 700; transition: color 0.2s var(--ease); }
.auth-register a:hover { color: var(--gold-hi); text-decoration: underline; }

.auth-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; color: var(--gray-soft); font-size: 0.86rem;
  transition: color 0.2s var(--ease);
}
.auth-back:hover { color: var(--gold-hi); }
.auth-back svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand {
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 28px clamp(24px, 6vw, 48px);
  }
  .auth__brand::before { width: 80vw; height: 80vw; right: -30vw; top: -10vw; transform: none; }
  .auth__brand-body { display: none; }       /* keep compact on tablet/mobile */
  .auth__brand-foot { display: none; }
  .auth__brand-top { display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 480px) {
  .auth__main { padding: 26px 18px 40px; }
  .auth-card { padding: 26px 20px; box-shadow: none; background: transparent; border: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .auth-options { flex-direction: row; flex-wrap: wrap; }
}

/* ==========================================================================
   AUTH — additional components (register, forgot, verify, success)
   ========================================================================== */

/* Country select (reuses input look) */
.auth-select select {
  width: 100%;
  padding: 15px 48px 15px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.98rem;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.auth-select select:focus {
  outline: none; border-color: var(--gold);
  background: rgba(255,255,255,0.06); box-shadow: 0 0 0 4px rgba(212,175,55,0.12);
}
.auth-select select option { background: var(--bg-secondary); color: var(--white); }

/* Phone group: dial code + number */
.auth-phone { display: flex; gap: 10px; }
.auth-dial {
  flex: none; min-width: 58px;
  display: grid; place-items: center;
  padding: 0 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--gold-hi); font-weight: 600; font-variant-numeric: tabular-nums;
}
.auth-phone .auth-field__wrap { flex: 1; min-width: 0; }

/* OTP / verification code */
.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 8px 0 6px;
}
.otp input {
  width: 100%; aspect-ratio: 1 / 1.1;
  text-align: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.otp input:focus {
  outline: none; border-color: var(--gold);
  background: rgba(255,255,255,0.06); box-shadow: 0 0 0 4px rgba(212,175,55,0.12);
}

.auth-resend { text-align: center; font-size: 0.88rem; color: var(--gray-soft); margin-top: 18px; }
.auth-resend a { color: var(--gold); font-weight: 600; }
.auth-resend a:hover { color: var(--gold-hi); }
.auth-resend a.is-disabled { color: var(--gray-soft); pointer-events: none; opacity: 0.7; }

.auth-note { text-align: center; color: var(--gray-soft); font-size: 0.86rem; margin-top: 8px; }
.auth-note strong { color: var(--white); font-weight: 600; }

/* ---------- Centered (solo) layout for verify / success ---------- */
.auth-solo {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(800px 600px at 75% 15%, rgba(11,86,208,0.34), transparent 60%),
    radial-gradient(700px 500px at 15% 90%, rgba(212,175,55,0.14), transparent 55%),
    linear-gradient(160deg, #06101f 0%, #0f1b2d 100%);
}
.auth-solo::before {
  content: ""; position: absolute; z-index: 0;
  width: 70vmin; height: 70vmin; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.18);
  box-shadow: inset 0 0 100px rgba(11,86,208,0.25);
  -webkit-mask-image: radial-gradient(circle, transparent 60%, #000 61%);
  mask-image: radial-gradient(circle, transparent 60%, #000 61%);
  animation: auth-spin 70s linear infinite;
}
.auth-solo__inner { position: relative; z-index: 1; width: 100%; max-width: 480px; }
.auth-solo__logo { text-align: center; margin-bottom: 26px; }
.auth-solo__logo img { height: 82px; width: auto; display: inline-block; }
.auth-solo .auth-card { max-width: 480px; text-align: center; }

/* ---------- Success checkmark ---------- */
.success-check {
  width: 96px; height: 96px; margin: 0 auto 24px;
}
.success-check svg { width: 100%; height: 100%; }
.success-check .sc-ring {
  fill: none; stroke: var(--gold); stroke-width: 3;
  stroke-dasharray: 295; stroke-dashoffset: 295;
  animation: sc-ring 0.7s var(--ease) forwards;
  filter: drop-shadow(0 0 14px rgba(212,175,55,0.5));
}
.success-check .sc-tick {
  fill: none; stroke: var(--gold-hi); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: sc-tick 0.5s var(--ease) 0.55s forwards;
}
@keyframes sc-ring { to { stroke-dashoffset: 0; } }
@keyframes sc-tick { to { stroke-dashoffset: 0; } }

.auth-card__head--big h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }

.auth-actions { display: grid; gap: 12px; margin-top: 28px; }
.auth-actions .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .success-check .sc-ring, .success-check .sc-tick { animation: none; stroke-dashoffset: 0; }
  .auth__brand::before, .auth-solo::before { animation: none; }
}

/* Icon badge (email verification, info states) */
.auth-badge {
  width: 92px; height: 92px; margin: 0 auto 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 0 30px rgba(212,175,55,0.2);
}
.auth-badge svg {
  width: 42px; height: 42px;
  stroke: var(--gold-hi); stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  animation: auth-float 4s ease-in-out infinite;
}
@keyframes auth-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.auth-sent { color: var(--white); font-weight: 600; word-break: break-word; }

@media (prefers-reduced-motion: reduce) {
  .auth-badge svg { animation: none; }
}
