/* ===== Auth screen (login / register) — matches the public_website marketing site:
   warm clay/gold gradients, Space Grotesk headings, soft cream form surface. ===== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  background: var(--bg);
}

/* ---- Brand / marketing panel ---- */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: 44px 52px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, #33200f 0%, #5a3420 55%, #7c4726 100%);
  color: #FBF3E4;
}

.auth-brand-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -5; }
.auth-brand-scrim {
  position: absolute; inset: 0; z-index: -4;
  background: linear-gradient(155deg, rgba(51, 32, 15, .82) 0%, rgba(90, 52, 32, .74) 55%, rgba(124, 71, 38, .66) 100%);
}

.auth-blob { position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; opacity: .55; }
.auth-blob-1 { width: 420px; height: 420px; background: #C1652F; top: -140px; left: -110px; animation: authFloat 13s ease-in-out infinite; }
.auth-blob-2 { width: 380px; height: 380px; background: #D9A441; bottom: -170px; right: -110px; animation: authFloat 15s ease-in-out infinite reverse; }
.auth-blob-3 { width: 280px; height: 280px; background: #8A9A6B; top: 36%; left: 54%; opacity: .25; animation: authFloat 17s ease-in-out infinite; }
@keyframes authFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22px, -18px) scale(1.05); }
}

.auth-noise {
  position: absolute; inset: 0; z-index: -1; opacity: .045; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.auth-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.auth-brand-top .mark {
  width: auto; height: 34px; aspect-ratio: 266 / 380; flex: none; border-radius: 0;
  background-color: transparent;
  background-image: url("/assets/brand/enthree-mark.png");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  box-shadow: none;
  /* Source icon is dark line-art; invert it to read on the dark auth backdrop. */
  filter: brightness(0) invert(1);
}

.auth-brand-mid { position: relative; z-index: 1; max-width: 480px; margin: auto 0; width: 100%; }
.auth-brand-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: rgba(251, 243, 228, .72);
}
.auth-brand-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #D9A441, #C1652F); box-shadow: 0 0 12px #D9A441;
  animation: authDot 2.4s ease-in-out infinite;
}
@keyframes authDot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

.auth-brand-title { font-family: var(--font-display); font-size: clamp(26px, 2.3vw, 34px); font-weight: 700; letter-spacing: -.01em; line-height: 1.18; margin-bottom: 14px; }
.auth-brand-title .grad { background: linear-gradient(135deg, #F3CC85, #DD8A4F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand-sub { font-size: 15px; line-height: 1.6; color: rgba(251, 243, 228, .78); max-width: 400px; margin-bottom: 26px; }

.auth-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 28px; }
.auth-stat { display: flex; flex-direction: column; gap: 3px; }
.auth-stat strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.auth-stat span { font-size: 11px; color: rgba(251, 243, 228, .58); }

/* Featured-show credit, shown when a login background photo is set. */
.auth-brand-featured {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; padding: 7px 14px 7px 11px;
  border-radius: 999px; background: rgba(251, 243, 228, .12); border: 1px solid rgba(251, 243, 228, .2);
  font-size: 12.5px; font-weight: 600; color: rgba(251, 243, 228, .92); backdrop-filter: blur(6px);
}
.auth-brand-featured ion-icon { font-size: 14px; color: #F3CC85; flex: none; }

.auth-brand-foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(251, 243, 228, .5); }

/* ---- Form panel ---- */
.auth-form-panel { display: flex; flex-direction: column; padding: 40px 56px; min-height: 100vh; }
.auth-form-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.auth-form-mobile-brand { display: none; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--label); }
.auth-form-mobile-brand .mark {
  width: auto; height: 30px; aspect-ratio: 266 / 380; border-radius: 0; background: transparent;
  background-image: url("/assets/brand/enthree-mark.png"); background-size: contain; background-repeat: no-repeat; background-position: center;
  box-shadow: none;
}

.auth-form-body { width: 100%; max-width: 420px; margin: auto; padding: 40px 0; }

.auth-tabs { width: 100%; margin-bottom: 28px; }

.auth-input-wrap { position: relative; }
.auth-input-wrap > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--label-3); font-size: 17px; pointer-events: none; }
.auth-input-wrap .input { padding-left: 42px; }
.auth-input-wrap.has-toggle .input { padding-right: 42px; }
.auth-input-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--label-3); transition: background var(--dur-fast), color var(--dur-fast);
}
.auth-input-toggle:hover { background: var(--fill); color: var(--label); }

.auth-otp-panel { padding: var(--sp-4); border-radius: var(--r-lg); background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin-bottom: var(--sp-4); }
.auth-otp-panel .field { margin-bottom: 0; }
.auth-otp-panel .field > label { color: var(--accent-3); }

.auth-submit { width: 100%; margin-top: 6px; }

.auth-form-foot { margin-top: 24px; text-align: center; font-size: 13.5px; color: var(--label-2); }
.auth-form-foot a { color: var(--accent); font-weight: 650; }
.auth-form-foot a:hover { text-decoration: underline; }

.auth-demo-chip {
  margin-top: 22px; display: flex; align-items: center; gap: 9px; padding: 10px 13px;
  border-radius: var(--r-md); background: color-mix(in srgb, var(--green) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--hairline)); font-size: 12.5px; color: var(--label-2);
}
.auth-demo-chip ion-icon { color: var(--green); font-size: 16px; flex: none; }
.auth-demo-chip code { font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); overflow-wrap: anywhere; }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(0, .85fr) minmax(0, 480px); }
  .auth-brand { padding: 40px 40px; }
  .auth-form-panel { padding: 36px 40px; }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 24px 22px; }
  .auth-form-mobile-brand { display: flex; }
  .auth-form-body { max-width: 440px; }
}

@media (max-width: 420px) {
  .auth-form-body { padding: 28px 0; }
}
