/* ── InterAtlas Estate — cinematic auth screens ─────────────────────────────────
   Self-contained, no build step. Split-screen: a slow Dubai-skyline slideshow
   on the left, a glassmorphic form panel on the right. */

:root {
  --a-gold-100: #f5e7c4;
  --a-gold-200: #e9d3a3;
  --a-gold-300: #dcb96f;
  --a-gold-400: #cfa24a;
  --a-gold-grad: linear-gradient(120deg, #f3e3bd 0%, #cfa24a 48%, #9a6a2c 100%);
  --a-ink: #0c0e13;
  --a-panel: #111319;
  --a-line: rgba(233, 211, 163, 0.16);
  --a-text: rgba(255, 255, 255, 0.92);
  --a-dim: rgba(255, 255, 255, 0.55);
  --a-faint: rgba(255, 255, 255, 0.38);
}

* { box-sizing: border-box; }

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--a-text);
  background: var(--a-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.auth-display { font-family: 'Playfair Display', Georgia, serif; }

/* ── Shell ── */
.auth-shell { display: flex; min-height: 100vh; }

/* ── Left cinematic visual ── */
.auth-visual {
  position: relative;
  flex: 1.2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px 54px;
  isolation: isolate;
}
.auth-slides { position: absolute; inset: 0; z-index: -3; }
.auth-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  animation: authSlides 27s infinite;
  will-change: opacity, transform;
}
.auth-slide:nth-child(1) { animation-delay: 0s; }
.auth-slide:nth-child(2) { animation-delay: 9s; }
.auth-slide:nth-child(3) { animation-delay: 18s; }
@keyframes authSlides {
  0%   { opacity: 0; transform: scale(1.12); }
  4%   { opacity: 1; }
  30%  { opacity: 1; transform: scale(1.0); }
  36%  { opacity: 0; }
  100% { opacity: 0; }
}
/* Brand-tinted legibility overlays */
.auth-visual::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(105deg, rgba(10, 11, 14, 0.88) 0%, rgba(10, 11, 14, 0.42) 46%, rgba(10, 11, 14, 0.72) 100%),
    linear-gradient(to top, rgba(8, 9, 12, 0.96) 2%, rgba(8, 9, 12, 0) 44%);
}
.auth-visual::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 420px at 12% 108%, rgba(207, 162, 74, 0.24), transparent 62%),
    radial-gradient(560px 360px at 92% -8%, rgba(207, 162, 74, 0.14), transparent 60%);
  mix-blend-mode: screen;
  animation: authGlow 12s ease-in-out infinite alternate;
}
@keyframes authGlow { from { opacity: 0.7; } to { opacity: 1; } }

/* floating gold motes */
.auth-particles { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-particles i {
  position: absolute; display: block; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 211, 163, 0.9), rgba(233, 211, 163, 0));
  animation: authFloat linear infinite;
}
.auth-particles i:nth-child(1) { width: 7px; height: 7px; left: 14%; bottom: -10px; animation-duration: 15s; }
.auth-particles i:nth-child(2) { width: 4px; height: 4px; left: 30%; bottom: -10px; animation-duration: 20s; animation-delay: 3s; }
.auth-particles i:nth-child(3) { width: 9px; height: 9px; left: 52%; bottom: -10px; animation-duration: 18s; animation-delay: 6s; }
.auth-particles i:nth-child(4) { width: 5px; height: 5px; left: 68%; bottom: -10px; animation-duration: 22s; animation-delay: 1s; }
.auth-particles i:nth-child(5) { width: 6px; height: 6px; left: 82%; bottom: -10px; animation-duration: 16s; animation-delay: 8s; }
.auth-particles i:nth-child(6) { width: 3px; height: 3px; left: 44%; bottom: -10px; animation-duration: 24s; animation-delay: 4s; }
@keyframes authFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-108vh) translateX(30px); opacity: 0; }
}

.auth-visual-top { display: flex; align-items: center; justify-content: space-between; animation: authRise 0.9s cubic-bezier(.2,.7,.2,1) both; }
.auth-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.auth-brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.auth-brand-txt { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 18px; color: #fff; line-height: 1.1; }
.auth-brand-txt small { display: block; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--a-gold-300); margin-top: 3px; }
.auth-back { color: var(--a-dim); font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.auth-back:hover { color: var(--a-gold-200); }

.auth-visual-mid { max-width: 460px; animation: authRise 1s cubic-bezier(.2,.7,.2,1) 0.1s both; }
.auth-eyebrow { display: inline-block; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--a-gold-300); margin-bottom: 18px; }
.auth-headline {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 600;
  font-size: clamp(30px, 3.4vw, 50px); line-height: 1.08; color: #fff; margin: 0;
}
.auth-headline .grad {
  background: var(--a-gold-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; background-size: 200% auto; animation: authShine 6s linear infinite;
}
@keyframes authShine { to { background-position: 200% center; } }
.auth-tagline { margin: 20px 0 0; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.65; max-width: 420px; }

.auth-features { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 13px; }
.auth-features li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: rgba(255,255,255,.8); animation: authRise .8s ease both; }
.auth-features li:nth-child(1) { animation-delay: .30s; }
.auth-features li:nth-child(2) { animation-delay: .42s; }
.auth-features li:nth-child(3) { animation-delay: .54s; }
.auth-feat-ic { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(207,162,74,.14); border: 1px solid rgba(207,162,74,.3); color: var(--a-gold-200); }
.auth-feat-ic svg { width: 15px; height: 15px; }

.auth-visual-foot { display: flex; gap: 34px; animation: authRise 1s ease .3s both; }
.auth-stat b { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; color: #fff; display: block; }
.auth-stat span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a-faint); }

/* ── Right form panel ── */
.auth-panel {
  position: relative;
  flex: 0 0 clamp(420px, 40%, 560px);
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 500px at 120% -10%, rgba(207, 162, 74, 0.10), transparent 58%),
    radial-gradient(760px 620px at -20% 120%, rgba(207, 162, 74, 0.06), transparent 55%),
    linear-gradient(160deg, #16181f 0%, #0e1015 100%);
  border-left: 1px solid var(--a-line);
  padding: 30px 30px 26px;
  overflow-y: auto;
}
.auth-panel-top { display: flex; align-items: center; justify-content: flex-end; }
.auth-langs { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.auth-langs a { color: var(--a-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; padding: 5px 9px; border-radius: 8px; transition: all .2s; }
.auth-langs a:hover, .auth-langs a.active { color: var(--a-gold-200); background: rgba(207, 162, 74, 0.12); }

.auth-panel-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 380px; margin: 0 auto; }

/* mobile-only brand mark */
.auth-mobile-brand { display: none; text-align: center; margin-bottom: 22px; }
.auth-mobile-brand img { width: 60px; height: 60px; object-fit: contain; }

.auth-head { margin-bottom: 26px; animation: authRise .7s ease .05s both; }
.auth-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 27px; color: #fff; margin: 0; }
.auth-sub { color: var(--a-dim); font-size: 14px; margin: 8px 0 0; line-height: 1.55; }

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-field { animation: authRise .6s ease both; }
.auth-form .auth-field:nth-child(1) { animation-delay: .12s; }
.auth-form .auth-field:nth-child(2) { animation-delay: .19s; }
.auth-form .auth-field:nth-child(3) { animation-delay: .26s; }
.auth-form .auth-field:nth-child(4) { animation-delay: .33s; }
.auth-form .auth-field:nth-child(5) { animation-delay: .40s; }
.auth-form .auth-field:nth-child(6) { animation-delay: .47s; }
.auth-form .auth-field:nth-child(7) { animation-delay: .54s; }
.auth-form .auth-field:nth-child(8) { animation-delay: .61s; }

.auth-label { display: block; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-dim); font-weight: 600; margin-bottom: 7px; }
.auth-inwrap { position: relative; display: flex; align-items: center; }
.auth-inwrap > svg.lead { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--a-faint); pointer-events: none; transition: color .2s; }
.auth-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px; color: #fff;
  padding: 13px 14px 13px 42px; font-size: 14.5px; font-family: inherit;
  outline: none; transition: border-color .22s, background .22s, box-shadow .22s;
}
.auth-input.no-icon { padding-left: 15px; }
.auth-input::placeholder { color: var(--a-faint); }
.auth-input:focus { border-color: rgba(207, 162, 74, 0.7); background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 0 4px rgba(207, 162, 74, 0.12); }
.auth-inwrap:focus-within > svg.lead { color: var(--a-gold-300); }
.auth-toggle { position: absolute; right: 8px; background: none; border: 0; color: var(--a-faint); cursor: pointer; padding: 8px; border-radius: 8px; display: grid; place-items: center; transition: color .2s; }
.auth-toggle:hover { color: var(--a-gold-200); }
.auth-toggle svg { width: 18px; height: 18px; }
.auth-hint { font-size: 11.5px; color: var(--a-faint); margin: 6px 0 0; }

.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 460px) { .auth-grid2 { grid-template-columns: 1fr; } }

.auth-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--a-dim); cursor: pointer; line-height: 1.45; }
.auth-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--a-gold-400); flex-shrink: 0; }
.auth-check a { color: var(--a-gold-300); }

.auth-btn {
  position: relative; overflow: hidden;
  width: 100%; border: 0; cursor: pointer; margin-top: 4px;
  border-radius: 13px; padding: 14px 20px;
  background: var(--a-gold-grad); background-size: 180% auto;
  color: #14100a; font-weight: 700; font-size: 14.5px; font-family: inherit; letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .18s, box-shadow .25s, background-position .5s;
  box-shadow: 0 10px 30px rgba(207, 162, 74, 0.28);
  animation: authRise .6s ease .5s both;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(207, 162, 74, 0.4); background-position: right center; }
.auth-btn:active { transform: translateY(0); }
.auth-btn::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg); animation: authSweep 4.5s ease-in-out infinite;
}
@keyframes authSweep { 0%, 55% { left: -60%; } 78%, 100% { left: 130%; } }

.auth-foot { text-align: center; font-size: 13px; color: var(--a-dim); margin: 22px 0 0; animation: authRise .6s ease .6s both; }
.auth-foot a { color: var(--a-gold-300); text-decoration: none; font-weight: 600; }
.auth-foot a:hover { color: var(--a-gold-200); }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--a-faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

.auth-alert { border-radius: 12px; padding: 12px 15px; font-size: 13px; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 10px; animation: authShake .4s ease; }
.auth-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-alert.error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.32); color: #fecaca; }
.auth-alert.info { background: rgba(125, 211, 252, 0.09); border: 1px solid rgba(125, 211, 252, 0.28); color: #bae6fd; }
@keyframes authShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(2px)} }

/* 6-digit code input */
.auth-code {
  text-align: center; letter-spacing: 12px; font-size: 26px; font-weight: 600;
  padding-left: 15px; font-variant-numeric: tabular-nums;
}
.auth-code::placeholder { letter-spacing: 12px; }

@keyframes authRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth-shell { flex-direction: column; }
  .auth-visual { flex: none; min-height: 300px; padding: 26px 24px; }
  .auth-visual-mid { max-width: 620px; }
  .auth-features, .auth-visual-foot { display: none; }
  .auth-panel { flex: 1; border-left: 0; border-top: 1px solid var(--a-line); }
  .auth-panel-mid { padding: 30px 0; }
}
@media (max-width: 560px) {
  .auth-visual { min-height: 210px; padding: 20px; }
  .auth-visual-mid { display: none; }
  .auth-mobile-brand { display: block; }
  .auth-panel { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-slide, .auth-visual::after, .auth-particles i, .auth-headline .grad,
  .auth-btn::after, .auth-visual-top, .auth-visual-mid, .auth-features li,
  .auth-visual-foot, .auth-head, .auth-field, .auth-btn, .auth-foot, .auth-alert {
    animation: none !important;
  }
  .auth-slide:first-child { opacity: 1; }
}
