/* Login page — split layout: photo hero (left) + form (right) */
:root {
  --a-bg: #fffaf5;
  --a-surface: #ffffff;
  --a-text: #1f1611;
  --a-muted: #7a6a5f;
  --a-border: #eadfd5;
  --a-accent: #e8590c;
  --a-accent-2: #f59f00;
  --a-accent-soft: #fff1e6;
  --a-ring: rgba(232, 89, 12, .18);
  --a-danger: #c92a2a;
  --a-danger-soft: #fff0f0;
  --a-success: #2b8a3e;
  --a-success-soft: #ebfbee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --a-bg: #17110d;
    --a-surface: #201812;
    --a-text: #f6ede6;
    --a-muted: #b3a296;
    --a-border: #3a2d24;
    --a-accent-soft: #3a2214;
    --a-ring: rgba(245, 159, 0, .25);
    --a-danger-soft: #3b1717;
    --a-success-soft: #13301b;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.page-auth {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--a-bg);
  color: var(--a-text);
  -webkit-font-smoothing: antialiased;
}

.auth-split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Hero (left) ---------- */
.auth-hero {
  position: relative;
  overflow: hidden;
  background: #1a0f0a;
  color: #fff;
}
.hero-slides, .hero-slide, .hero-shade { position: absolute; inset: 0; }
.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 18s infinite, heroZoom 18s infinite;
}
.hero-slide:nth-child(2) { animation-delay: 6s, 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s, 12s; }
@keyframes heroFade {
  0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes heroZoom {
  0% { transform: scale(1.12); } 40% { transform: scale(1); } 100% { transform: scale(1); }
}
.hero-shade {
  background:
    linear-gradient(180deg, rgba(20, 10, 5, .55) 0%, rgba(20, 10, 5, .1) 35%, rgba(20, 10, 5, .85) 100%),
    linear-gradient(90deg, rgba(20, 10, 5, .35), transparent 60%);
}
.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
}
.hero-brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 10px;
  animation: fadeDown .7s ease both;
}
.hero-brand i {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, var(--a-accent), var(--a-accent-2));
}
.hero-copy { max-width: 560px; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700;
  color: #ffd8a8; margin: 0 0 14px;
  animation: fadeUp .7s .1s ease both;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.12;
  margin: 0 0 26px;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
  animation: fadeUp .8s .2s ease both;
}
.hero-rotator { white-space: nowrap; }
.hero-typed {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(90deg, #ffc078, #ff8787);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-caret {
  display: inline-block; width: 3px; height: .9em; margin-left: 4px;
  background: #ffc078; vertical-align: -0.08em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hero-points li {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 500; color: #fff4ea;
  animation: fadeUp .7s ease both; animation-delay: calc(var(--d) + .4s);
}
.hero-points i {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
}

/* ---------- Panel (right) ---------- */
.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background:
    radial-gradient(600px 300px at 100% 0%, var(--a-accent-soft), transparent 70%),
    var(--a-bg);
}
.auth-box { width: 100%; max-width: 400px; animation: fadeUp .7s .15s ease both; }
.auth-brand-mobile { display: none; }
.auth-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s 1s ease-in-out 2; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.auth-sub { margin: 0 0 24px; color: var(--a-muted); font-size: 15px; }
.auth-flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 18px;
  font-size: 14px; font-weight: 500;
  animation: shake .4s ease;
}
.auth-flash.error { background: var(--a-danger-soft); color: var(--a-danger); border: 1px solid rgba(201, 42, 42, .2); }
.auth-flash.success { background: var(--a-success-soft); color: var(--a-success); border: 1px solid rgba(43, 138, 62, .2); animation: none; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); }
}

.auth-form { display: grid; gap: 18px; }
.auth-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.auth-input {
  position: relative;
  display: flex; align-items: center;
  background: var(--a-surface);
  border: 1.5px solid var(--a-border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus-within { border-color: var(--a-accent); box-shadow: 0 0 0 4px var(--a-ring); }
.auth-input > i { width: 44px; text-align: center; color: var(--a-muted); font-size: 15px; flex: none; }
.auth-input input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  padding: 14px 14px 14px 0;
  font: inherit; font-size: 15px; color: var(--a-text);
}
.auth-input input::placeholder { color: var(--a-muted); opacity: .7; }
.auth-eye {
  border: 0; background: transparent; color: var(--a-muted);
  width: 44px; height: 44px; cursor: pointer; font-size: 15px; flex: none;
  border-radius: 10px;
}
.auth-eye:hover { color: var(--a-text); }

.auth-submit {
  margin-top: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 18px;
  border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--a-accent), var(--a-accent-2));
  background-size: 160% 100%;
  box-shadow: 0 10px 24px -10px rgba(232, 89, 12, .7);
  transition: transform .15s, box-shadow .15s, background-position .4s;
}
.auth-submit:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(232, 89, 12, .8); }
.auth-submit:hover i.fa-arrow-right { transform: translateX(3px); }
.auth-submit i { transition: transform .15s; }
.auth-submit:disabled { opacity: .8; cursor: progress; transform: none; }

.auth-foot { margin: 32px 0 0; text-align: center; font-size: 12px; color: var(--a-muted); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .auth-split { grid-template-columns: 1fr 1fr; }
  .hero-content { padding: 32px; }
}
@media (max-width: 760px) {
  .auth-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-hero { min-height: 230px; }
  .hero-content { padding: 20px 16px; }
  .hero-points, .hero-kicker { display: none; }
  .hero-title { font-size: 26px; margin: 0; }
  .auth-panel { padding: 28px 16px 24px; place-items: start center; }
  .auth-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .hero-slide:first-child { opacity: 1; }
}

/* App login: on a phone the form is the first thing you see. */
.auth-remember { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; min-height: 44px; cursor: pointer; }
.auth-remember input { width: 20px; height: 20px; accent-color: #4f46e5; margin: 0; flex: none; }
.hero-brand img { border-radius: 9px; vertical-align: middle; margin-right: 8px; }
@media (max-width: 920px) {
  body.page-auth { background: #fff; }
  .auth-hero, .auth-shell > :first-child:not(.auth-card):not(.auth-panel) { display: none !important; }
  .auth-brand-mobile { display: flex !important; flex-direction: column; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: #1a1f3a; margin: 8px 0 18px; }
  .auth-brand-mobile img { border-radius: 14px; }
  .auth-field input { font-size: 16px; }
  .auth-submit { min-height: 52px; }
}

.auth-submit { background: linear-gradient(135deg, #6366f1, #4338ca) !important; box-shadow: 0 8px 20px rgba(67, 56, 202, .3) !important; }
.auth-field input:focus { border-color: #4f46e5; }
@media (max-width: 920px) {
  .auth-panel { background: #fff !important; min-height: 100vh; min-height: 100dvh; align-items: flex-start; padding-top: calc(env(safe-area-inset-top, 0px) + 24px); }
}

/* Install the app (login page) */
.auth-install { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px; border: 1px solid var(--a-border); border-radius: 14px; background: var(--a-surface); }
.auth-install[hidden] { display: none; }
.auth-install img { flex: none; border-radius: 11px; }
.auth-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auth-install-text strong { font-size: 14px; }
.auth-install-text span { font-size: 12.5px; line-height: 1.4; color: var(--a-muted); }
.auth-install-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1.5px solid #4f46e5; border-radius: 11px; background: transparent; color: #4f46e5; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-install-btn:hover { background: #4f46e5; color: #fff; }
@media (prefers-color-scheme: dark) { .auth-install-btn { border-color: #8b8cff; color: #b4b5ff; } .auth-install-btn:hover { background: #4f46e5; color: #fff; } }
@media (max-width: 920px) { .auth-install { background: #f6f7ff; border-color: #e3e5f7; } .auth-install-text strong { color: #1a1f3a; } }
@media (max-width: 380px) { .auth-install { flex-wrap: wrap; } .auth-install-btn { width: 100%; justify-content: center; } }
