/* Native Frappe login, rebuilt with the approved Zeno Shell visual system. */
@font-face { font-family: "Pacifico"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/zeno_auth/fonts/pacifico-400.woff2") format("woff2"); }
body.zeno-login-active {
  min-height: 100vh;
  overflow: hidden;
  background: #fbfbfd;
}

body.zeno-login-active .page-header-wrapper,
body.zeno-login-active .page-content-wrapper,
body.zeno-login-active footer,
body.zeno-login-active .navbar,
body.zeno-login-active .modal-backdrop {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   FOUC KILL for Frappe's native /login page — zero Frappe-login blink.
   zeno_login.css is a render-blocking <link> in <head>, so these rules apply
   on the FIRST paint, BEFORE zeno_login.js runs and adds .zeno-login-active.
   They hide Frappe's server-rendered login form + website chrome and paint the
   Zeno gradient immediately, so the Frappe login never flashes on load/refresh.
   Scoped with :has(#page-login) — that id exists ONLY on the login page, so no
   other website page is touched. The #zeno-login-root overlay mounts on top.
   --------------------------------------------------------------------------- */
body:has(#page-login) {
  overflow: hidden !important;
  background:
    linear-gradient(rgba(112, 96, 182, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 96, 182, .085) 1px, transparent 1px),
    radial-gradient(circle at 14% 18%, rgba(139, 92, 246, .16), transparent 28rem),
    radial-gradient(circle at 89% 82%, rgba(37, 99, 235, .11), transparent 30rem),
    #fbfbfd !important;
  background-size: 73px 73px, 73px 73px, auto, auto, auto !important;
}
body:has(#page-login) .page-header-wrapper,
body:has(#page-login) .page-content-wrapper,
body:has(#page-login) footer,
body:has(#page-login) .navbar,
body:has(#page-login) .navbar-fixed-top,
body:has(#page-login) .modal-backdrop,
#page-login,
.login-content {
  display: none !important;
}

#zeno-login-root,
#zeno-login-root * { box-sizing: border-box; }

#zeno-login-root {
  position: fixed;
  z-index: 10000;
  inset: 0;
  overflow: auto;
  color: #141414;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(139, 92, 246, .16), transparent 28rem),
    radial-gradient(circle at 89% 82%, rgba(37, 99, 235, .11), transparent 30rem),
    #fbfbfd;
}

#zeno-login-root::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 1;
  background-image: linear-gradient(rgba(112, 96, 182, .085) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 96, 182, .085) 1px, transparent 1px);
  background-size: 73px 73px;
  content: "";
}

.zlogin-intro {
  display: flex;
  width: 100%;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: inherit;
  background: transparent;
}

.zlogin-intro__lockup { display: grid; justify-items: center; gap: 18px; }
.zlogin-intro--leaving { pointer-events: none; }
.zlogin-intro--leaving .zlogin-intro__lockup { animation: zeno-intro-exit .45s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes zeno-intro-exit { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 65% { opacity: .5; } 100% { transform: translate(-26vw, 0) scale(.4); opacity: 0; } }
/* Two overlapping layers cross-fade (intro <-> sign-in). Both are always present
   during the transition, so nothing disappears/blanks, and the whole screen is
   never re-painted — only the card's inner content changes between steps. */
.zlogin-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 2.7s ease, transform 2.7s cubic-bezier(.22, 1, .36, 1); }
.zlogin-layer.is-on { opacity: 1; pointer-events: auto; transform: none; }
#zl-view:not(.is-on) { transform: translateY(16px); }
#zl-intro:not(.is-on) { transform: scale(.92); }
.zlogin-intro__lockup:hover { transform: scale(1.04); }
.zlogin-intro__prompt { color: rgba(20, 20, 20, .42); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.zlogin-shell {
  display: grid;
  min-height: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr);
}

.zlogin-brand {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.zlogin-brand__tagline { margin: 32px 0 0; color: rgba(20, 20, 20, .46); font-size: 15px; }
.zlogin-brand__motto { margin: 40px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -.025em; }
.zlogin-brand__motto i { margin: 0 10px; color: rgba(20, 20, 20, .2); font-style: normal; }
.zlogin-brand__motto .imagine { color: #8b5cf6; }
.zlogin-brand__motto .innovate { color: #2563eb; }
.zlogin-brand__motto .elevate { color: #059669; }

.zlogin-stage {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.zlogin-card {
  width: min(100%, 400px);
  padding: 28px;
  border: 1px solid rgba(20, 20, 20, .06);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 26px 58px rgba(20, 20, 20, .1);
}

.zlogin-card.zlogin-shake { animation: zeno-shake .4s ease; }
.zlogin-heading { display: grid; justify-items: center; gap: 8px; margin: 0 0 21px; text-align: center; }
.zlogin-heading h1 { margin: 0; color: #141414; font-size: 21px; font-weight: 750; letter-spacing: -.035em; }
.zlogin-heading p { max-width: 285px; margin: 0; color: rgba(20, 20, 20, .48); font-size: 13px; line-height: 1.45; }

.zlogin-stack { display: grid; gap: 14px; }
.zlogin-field {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid rgba(20, 20, 20, .1);
  border-radius: 16px;
  background: rgba(20, 20, 20, .025);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.zlogin-field:focus-within { border-color: rgba(139, 92, 246, .72); background: #fff; }
.zlogin-field svg { width: 18px; height: 18px; flex: 0 0 auto; color: rgba(20, 20, 20, .42); }
.zlogin-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: #141414; background: transparent; font: inherit; font-size: 15px; }
.zlogin-field input::placeholder { color: rgba(20, 20, 20, .39); }
.zlogin-icon-button { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; cursor: pointer; color: rgba(20, 20, 20, .68); background: transparent; }
.zlogin-icon-button:hover { color: #6d28a3; }
.zlogin-icon-button svg { margin: 0; color: currentColor; }
.zlogin-country { color: rgba(20, 20, 20, .65); font-size: 15px; font-weight: 600; }
.zlogin-row-end { display: flex; justify-content: flex-end; margin-top: -3px; }

.zlogin-primary,
.zlogin-secondary,
.zlogin-link { border: 0; cursor: pointer; font: inherit; }
.zlogin-primary { min-height: 51px; width: 100%; border-radius: 16px; color: #fff; background: #141414; box-shadow: 0 10px 22px rgba(20, 20, 20, .16); font-size: 14px; font-weight: 700; transition: background .18s, transform .18s, box-shadow .18s; }
.zlogin-primary:hover:not(:disabled) { background: #6d28a3; transform: translateY(-1px); box-shadow: 0 13px 26px rgba(109, 40, 163, .24); }
.zlogin-primary:active:not(:disabled) { transform: translateY(0) scale(.985); }
.zlogin-primary:disabled { cursor: not-allowed; color: rgba(255, 255, 255, .75); background: rgba(20, 20, 20, .22); box-shadow: none; }
.zlogin-secondary { display: flex; width: 100%; min-height: 51px; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(20, 20, 20, .1); border-radius: 16px; color: #141414; background: #fff; font-size: 14px; font-weight: 650; transition: border-color .18s, color .18s, background .18s; }
.zlogin-secondary:hover { border-color: rgba(139, 92, 246, .55); color: #6d28a3; background: #fcfbff; }
.zlogin-secondary svg { width: 20px; height: 20px; }
.zlogin-quick-biometric { min-height: 105px; flex-direction: column; gap: 8px; padding: 16px; }
.zlogin-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: rgba(20, 20, 20, .34); font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.zlogin-or::before, .zlogin-or::after { flex: 1; height: 1px; background: rgba(20, 20, 20, .1); content: ""; }
.zlogin-link { padding: 0; color: rgba(20, 20, 20, .5); background: transparent; font-size: 12px; font-weight: 550; }
.zlogin-link:hover { color: #6d28a3; }
.zlogin-link--center { display: block; margin: 2px auto 0; }
.zlogin-error { margin: 16px 0 -2px; color: #dc2626; font-size: 12px; font-weight: 650; text-align: center; }
.zlogin-note { margin: 0; color: rgba(20, 20, 20, .44); font-size: 12px; font-weight: 600; text-align: center; }

.zlogin-codes { display: flex; gap: 8px; }
.zlogin-code { width: 100%; height: 54px; min-width: 0; border: 1px solid rgba(20, 20, 20, .1); border-radius: 13px; outline: 0; color: #141414; background: rgba(20, 20, 20, .025); font-size: 20px; font-weight: 700; text-align: center; transition: border-color .18s, background .18s, box-shadow .18s; }
.zlogin-code:focus { border-color: rgba(139, 92, 246, .7); background: #fff; }
.zlogin-loader { display: grid; min-height: 330px; place-items: center; }
.zlogin-loader__mark { animation: zeno-pulse 1.25s ease-in-out infinite; }

.zlogin-mark { display: block; }
.zlogin-mark--intro { width: 190px; height: 190px; }
.zlogin-mark--heading { width: 46px; height: 46px; }
.zlogin-full-logo { display: inline-flex; align-items: center; justify-content: center; }
.zlogin-full-logo__word { color: #7c3aed; font-family: "Pacifico", cursive; font-size: 66px; font-weight: 400; letter-spacing: 0; line-height: 1.1; }

@keyframes zeno-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@keyframes zeno-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zeno-slide-left { from { transform: translateX(-38px); } to { transform: translateX(0); } }
@keyframes zeno-slide-right { from { transform: translateX(48px); } to { transform: translateX(0); } }
@keyframes zeno-pulse { 0%,100% { transform: scale(.92); opacity: .6; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes zeno-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
@keyframes zeno-pop { 0% { transform: translateY(12px) scale(.975); } 100% { transform: translateY(0) scale(1); } }

@media (max-width: 760px) {
  #zeno-login-root { background: radial-gradient(circle at 50% 18%, rgba(139, 92, 246, .14), transparent 23rem), #fbfbfd; }
  .zlogin-shell { display: block; }
  .zlogin-brand { display: none; }
  .zlogin-stage { min-height: 100vh; padding: 20px; }
  .zlogin-card { padding: 25px 21px; }
  .zlogin-code { height: 49px; border-radius: 11px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Zeno flapping loader (multi-colour) — works on ANY background (light + dark).
   The belly sits INSIDE each clipped dot (overflow:hidden) so it never depends
   on the page background colour. Shared with the desk shell. */
.zeno-bunny { display: flex; height: 50px; align-items: center; justify-content: center; gap: 15px; }
.zeno-bunny > div { position: relative; height: 30px; border-radius: 50%; animation: zeno-flap 1s infinite ease-in-out; }
.zeno-bunny .one, .zeno-bunny .three { width: 20px; overflow: hidden; }
.zeno-bunny .two { width: 30px; animation-delay: .1s; }
.zeno-bunny .one { background-color: #7c3aed; }
.zeno-bunny .two { background-color: #2563eb; }
.zeno-bunny .three { background-color: #10b981; }
.zeno-bunny .two::before, .zeno-bunny .two::after { content: ""; position: absolute; height: 20px; width: 10px; bottom: 20px; background-color: #2563eb; border-radius: 50% 50% 0 0; }
.zeno-bunny .two::before { left: 1px; transform: rotate(-20deg); }
.zeno-bunny .two::after { left: 19px; transform: rotate(20deg); }
.zeno-bunny .one::before, .zeno-bunny .three::before { content: ""; position: absolute; top: 13px; left: 0; height: 30px; width: 20px; background-color: rgba(255, 255, 255, .6); border-radius: 50% 50% 0 0; }
@keyframes zeno-flap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
/* Owner loader spec (2026-10-17): wings (side dots + the middle's wing shapes)
   stay FIXED BLACK; the MIDDLE body COLOUR-CYCLES; transparent bg; centred. */
.zeno-loading { background: transparent !important; }
.zeno-bunny { background: transparent !important; margin: 0 auto; }
.zeno-bunny .one, .zeno-bunny .three,
.zeno-bunny .two::before, .zeno-bunny .two::after { background-color: #000 !important; }
.zeno-bunny .one::before, .zeno-bunny .three::before { display: none !important; }
.zeno-bunny .two { background-color: #7c3aed !important; animation: zeno-flap 1s .1s infinite ease-in-out, zeno-bunny-cycle 2.1s infinite linear !important; }
@keyframes zeno-bunny-cycle { 0% { background-color: #7c3aed; } 33% { background-color: #2563eb; } 66% { background-color: #10b981; } 100% { background-color: #7c3aed; } }
@media (prefers-reduced-motion: reduce) { .zeno-bunny .two { animation: zeno-bunny-cycle 2.1s infinite linear !important; } }

/* Authenticator (TOTP) enrolment QR + manual key */
.zlogin-qr { display: block; width: 184px; height: 184px; margin: 2px auto 8px; border-radius: 14px; background: #eee; box-shadow: 0 8px 22px rgba(23, 31, 69, .12); }
.zlogin-qr--load { display: flex; align-items: center; justify-content: center; }
.zlogin-note code { padding: 2px 7px; background: rgba(124, 58, 237, .1); border-radius: 6px; color: #6d28a3; font-size: 12px; letter-spacing: .06em; word-break: break-all; }
