/* Auth v5 — sign in, sign up and password pages, more finished. Loaded after
   auth-v3.css by auth/partials/base.html. */

/* Fields: calm wells, a gold ring when writing. */
.zi-auth .auth-field label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8a6f5c; }
.zi-auth .auth-field input,
.zi-auth .auth-field select {
  height: 56px; border-radius: 16px; border: 1px solid #e6d7c8; background: #fffdf9;
  padding-inline: 18px; font-size: 15.5px; color: #2b211d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 24px -22px rgba(64, 38, 22, .5);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.zi-auth .auth-field input:hover { border-color: #d8c3ae; }
.zi-auth .auth-field input:focus,
.zi-auth .auth-field select:focus {
  outline: none; border-color: #c79a62; background: #fff;
  box-shadow: 0 0 0 4px rgba(199, 154, 98, .18), 0 14px 28px -22px rgba(64, 38, 22, .55);
}
.zi-auth .auth-password-toggle { border-radius: 12px; }

/* The main action: an ink pill that lifts. */
.zi-auth .auth-submit {
  min-height: 58px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: .01em;
  background: linear-gradient(135deg, #3a2a22 0%, #2b211d 55%, #4a2f22 100%); color: #fffaf3;
  border: 1px solid rgba(199, 154, 98, .45); box-shadow: 0 18px 36px -20px rgba(43, 33, 29, .75);
  transition: transform .2s ease, box-shadow .2s ease;
}
.zi-auth .auth-submit:hover { transform: translateY(-1px); box-shadow: 0 22px 40px -20px rgba(43, 33, 29, .85); }
.zi-auth .auth-submit svg { transition: transform .2s ease; }
.zi-auth .auth-submit:hover svg { transform: translateX(3px); }

.zi-auth .auth-check input { accent-color: #8a533b; width: 18px; height: 18px; }
.zi-auth .auth-link, .zi-auth .auth-switch a { color: #8a533b; font-weight: 600; text-underline-offset: 3px; }
.zi-auth .auth-separator span { letter-spacing: .22em; font-size: 10.5px; color: #a28a77; }
.zi-auth .auth-switch { font-size: 14px; }

/* Brand marks never spill over the title. */
.zi-auth .auth-brand-logo img { width: auto !important; height: 42px; max-width: 160px; object-fit: contain; }

/* ───────── Phones and small tablets: the photo, then the form as a sheet ───────── */
@media (max-width: 820px) {
  .zi-auth .auth-visual { height: 32vh; min-height: 250px; }
  .zi-auth .auth-visual-overlay { background: linear-gradient(180deg, rgba(20, 12, 8, .38) 0%, rgba(20, 12, 8, .12) 40%, rgba(20, 12, 8, .72) 100%); }
  /* The light brand on the photo, the dark one leaves the form. */
  .zi-auth .auth-brand-light { display: flex !important; top: calc(env(safe-area-inset-top) + 20px); left: 22px; }
  .zi-auth .auth-brand-light img { height: 36px; }
  .zi-auth .auth-panel-topbar .auth-brand-dark { display: none !important; }
  .zi-auth .auth-visual-copy { left: 22px; right: 22px; bottom: 44px; }
  .zi-auth .auth-visual-copy h1 { font-size: clamp(30px, 8.4vw, 40px); line-height: 1.02; margin: 0; }
  /* The form rises over the photo like a sheet. */
  .zi-auth .auth-panel {
    position: relative; z-index: 2; margin-top: -26px; border-radius: 28px 28px 0 0;
    box-shadow: 0 -18px 40px -30px rgba(20, 12, 8, .6);
  }
  .zi-auth .auth-panel-topbar { height: 58px; padding: 14px 18px 0; justify-content: flex-end; }
  .zi-auth .auth-panel-topbar::before {
    content: ''; position: absolute; top: 10px; left: 50%; width: 42px; height: 4px; margin-left: -21px;
    border-radius: 4px; background: #e2d3c5;
  }
  .zi-auth .auth-panel-scroll { padding: 0 22px 40px; }
  .zi-auth .auth-card { width: 100%; }
  .zi-auth .auth-title { font-size: clamp(38px, 10.5vw, 46px); }
  .zi-auth .auth-lead { font-size: 15px; margin-bottom: 24px; }
  .zi-auth .auth-meta-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .zi-auth .auth-panel-footer { padding: 0 22px calc(20px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .zi-auth .auth-meta-row { flex-direction: column; align-items: flex-start; }
}

/* ───────── The composition that replaces the photo ───────── */
.zi-auth .auth-visual {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 60% at 16% 10%, #4b2d20 0%, rgba(75, 45, 32, 0) 62%),
    radial-gradient(60% 55% at 92% 90%, #5a392b 0%, rgba(90, 57, 43, 0) 60%),
    linear-gradient(158deg, #1d1410 0%, #2a1c16 46%, #120c0a 100%);
}
.zi-auth .auth-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.zi-auth .auth-visual > :not(.auth-art) { position: relative; z-index: 2; }
.zi-auth .auth-visual > .auth-brand-light, .zi-auth .auth-visual > .auth-visual-copy, .zi-auth .auth-visual > .auth-visual-foot { position: absolute; }
.auth-art-halo { position: absolute; aspect-ratio: 1; border-radius: 50%; filter: blur(72px); mix-blend-mode: screen; animation: auth-drift 18s ease-in-out infinite alternate; }
.auth-art-halo--gold { width: 48%; left: -10%; top: 6%; background: radial-gradient(circle, rgba(214, 166, 100, .7), rgba(214, 166, 100, 0) 70%); }
.auth-art-halo--rose { width: 40%; right: -8%; top: 36%; background: radial-gradient(circle, rgba(196, 124, 112, .5), rgba(196, 124, 112, 0) 70%); animation-duration: 23s; animation-delay: -7s; }
.auth-art-halo--champagne { width: 56%; left: 20%; bottom: -22%; background: radial-gradient(circle, rgba(242, 212, 164, .38), rgba(242, 212, 164, 0) 70%); animation-duration: 27s; animation-delay: -13s; }
@keyframes auth-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(7%, -5%) scale(1.08); } 100% { transform: translate(-5%, 6%) scale(.95); } }
.auth-art-rings { position: absolute; width: 120%; max-width: 980px; right: -40%; bottom: -40%; stroke: rgba(230, 196, 143, .16); stroke-width: 1; animation: auth-turn 140s linear infinite; }
.auth-art-rings circle:nth-child(2) { stroke-dasharray: 2 9; }
.auth-art-rings circle:nth-child(4) { stroke: rgba(230, 196, 143, .1); }
@keyframes auth-turn { to { transform: rotate(1turn); } }
.auth-art-monogram {
  position: absolute; right: 5%; top: 6%; font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(260px, 30vw, 470px); line-height: .8; color: transparent;
  -webkit-text-stroke: 1px rgba(230, 196, 143, .26); text-stroke: 1px rgba(230, 196, 143, .26);
}
.auth-art-grain {
  position: absolute; inset: 0; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Three floating cards: what waits in the space. */
.auth-art-cards { position: absolute; right: 9%; top: 11%; width: 270px; display: grid; gap: 14px; }
/* Never over the title: on short screens, two cards. */
@media (max-height: 820px) { .auth-art-cards .auth-art-card--note { display: none; } }
.auth-art-card {
  padding: 16px 18px; border-radius: 18px; color: #fbf3e9;
  background: rgba(255, 248, 240, .07); border: 1px solid rgba(255, 240, 225, .14);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .85); animation: auth-float 7s ease-in-out infinite alternate;
}
.auth-art-card--count { margin-left: -64px; animation-delay: -2.4s; }
.auth-art-card--note { margin-left: 34px; animation-delay: -4.6s; display: flex; align-items: center; gap: 12px; }
.auth-art-card small { display: block; font-size: 9.5px; letter-spacing: .3em; color: #e3bd84; }
.auth-art-card b { display: block; margin-top: 4px; font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 500; line-height: 1.05; }
.auth-art-card i { display: block; height: 4px; margin: 10px 0 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.auth-art-card i span { display: block; width: 72%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #c79a62, #f0cf98); animation: auth-bar 2.6s cubic-bezier(.2, .7, .2, 1) both; }
.auth-art-card em { font-style: normal; font-size: 12px; color: rgba(251, 243, 233, .72); }
.auth-art-card--note em { display: block; margin-top: 3px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; color: #fbf3e9; }
.auth-art-avatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 16px; background: linear-gradient(145deg, #c79a62, #8a533b); }
@keyframes auth-float { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes auth-bar { from { width: 0; } }
@media (max-width: 1180px) { .auth-art-cards { display: none; } }
@media (max-width: 820px) {
  .auth-art-monogram { font-size: 230px; right: -2%; top: -4%; }
  .auth-art-rings { width: 160%; right: -70%; bottom: -90%; }
  .auth-art-halo { filter: blur(54px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-art-halo, .auth-art-rings, .auth-art-card, .auth-art-card i span { animation: none !important; }
}
