/* ==========================================================================
   Vae Victis - sign in / create account.
   Palette lifted from the crest: bronze column, olive laurel, cream ground.
   ========================================================================== */
:root {
  --ink: #16170F;
  --ink-2: #2B2A22;
  --muted: #6E6A5E;
  --muted-2: #9A9585;
  --cream: #F7F4EE;
  --paper: #FFFDF8;
  --line: rgba(22, 23, 15, .12);
  --line-2: rgba(22, 23, 15, .07);

  --bronze: #8B7452;
  --bronze-lt: #C2A677;
  --bronze-dk: #6B5637;
  --olive: #4A5238;
  --laurel: #6E7B4C;
  --olive-900: #1A1D14;
  --olive-800: #232719;
  --olive-700: #2E3423;

  --danger: #A63D2F;
  --ok: #5B6B3A;

  --sans: 'Inter Tight', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--sans); color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
svg { width: 1em; height: 1em; }
button { font: inherit; }
a, button, label { -webkit-tap-highlight-color: transparent; }

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ------------------------------------------------------------ brand stage */
.stage {
  position: relative; overflow: hidden; isolation: isolate; color: #EFE8DA;
  background:
    radial-gradient(120% 80% at 20% 0%, #3A4129 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #3B3222 0%, transparent 60%),
    linear-gradient(160deg, var(--olive-800), var(--olive-900) 70%);
}
.stage__aurora i {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: -1;
  animation: au-drift 18s ease-in-out infinite alternate;
}
.stage__aurora i:nth-child(1) { width: 46vmax; height: 46vmax; left: -14vmax; top: -12vmax; background: radial-gradient(closest-side, rgba(139,116,82,.55), transparent); }
.stage__aurora i:nth-child(2) { width: 38vmax; height: 38vmax; right: -12vmax; bottom: -10vmax; background: radial-gradient(closest-side, rgba(110,123,76,.5), transparent); animation-duration: 22s; animation-delay: -6s; }
.stage__aurora i:nth-child(3) { width: 24vmax; height: 24vmax; left: 30%; top: 40%; background: radial-gradient(closest-side, rgba(194,166,119,.28), transparent); animation-duration: 26s; animation-delay: -12s; }
@keyframes au-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vmax, 3vmax) scale(1.12); }
  100% { transform: translate(-3vmax, 5vmax) scale(.95); }
}
.stage__grain {
  position: absolute; inset: 0; z-index: -1; opacity: .09; mix-blend-mode: overlay; pointer-events: none;
  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");
}
.stage__dust { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stage__dust span {
  position: absolute; bottom: -10px; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: radial-gradient(circle, #F2DDAF 0%, rgba(194,166,119,.9) 40%, transparent 70%);
  box-shadow: 0 0 8px rgba(242,221,175,.55);
  animation: au-rise var(--d, 14s) linear var(--delay, 0s) infinite;
  opacity: 0;
}
@keyframes au-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: var(--o, .8); }
  85% { opacity: var(--o, .8); }
  100% { transform: translate(var(--x, 20px), -110vh); opacity: 0; }
}

.stage__inner {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.4rem, 3.5vh, 2.6rem); padding: clamp(2rem, 5vh, 3.5rem) clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
}
.stage__word {
  position: absolute; top: clamp(1.4rem, 4vh, 2.4rem); left: 50%; transform: translateX(-50%);
  font-size: .72rem; font-weight: 700; letter-spacing: .5em; text-decoration: none; color: var(--bronze-lt);
  animation: au-fade .9s var(--ease) .2s both;
}

/* crest: ring text + drawn laurel + rising medallion */
.crest { position: relative; width: clamp(220px, 30vw, 330px); aspect-ratio: 1; }
.crest svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crest__ring { animation: au-spin 40s linear infinite, au-fade 1.2s var(--ease) .3s both; }
.crest__ring text { fill: var(--bronze-lt); font: 700 11.5px/1 var(--sans); letter-spacing: 5.6px; }
.crest__track {
  fill: none; stroke: rgba(194,166,119,.35); stroke-width: 1; stroke-dasharray: 704; stroke-dashoffset: 704;
  animation: au-draw 2.2s var(--ease) .4s forwards;
}
@keyframes au-spin { to { transform: rotate(360deg); } }
@keyframes au-draw { to { stroke-dashoffset: 0; } }

.crest__laurel .stem { fill: none; stroke: #8E9C62; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: au-draw 1.6s var(--ease) .7s forwards; }
.crest__laurel .leaf {
  fill: #9DAB6C; transform-box: fill-box; transform-origin: 50% 100%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
  opacity: 0; transform: scale(0) rotate(var(--r, 0deg));
  animation: au-leaf .7s var(--spring) var(--delay, 1s) forwards;
}
.crest__laurel g:nth-of-type(even) .leaf { fill: #B9C48C; }
@keyframes au-leaf { to { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); } }

.crest__medal {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFFDF8, #EDE5D5 70%);
  box-shadow: 0 0 0 2px rgba(194,166,119,.8), 0 0 0 9px rgba(194,166,119,.12), 0 24px 60px -18px rgba(0,0,0,.7);
  animation: au-medal 1.3s var(--spring) .5s both, au-breathe 6s ease-in-out 2s infinite;
}
.crest__medal img { width: 74%; height: auto; }
.crest__sheen {
  position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%);
  transform: translateX(-120%); animation: au-sheen 5.5s var(--ease) 2.2s infinite;
}
@keyframes au-medal { from { opacity: 0; transform: translate(-50%, -30%) scale(.6); filter: blur(8px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } }
@keyframes au-breathe { 0%, 100% { box-shadow: 0 0 0 2px rgba(194,166,119,.8), 0 0 0 9px rgba(194,166,119,.12), 0 24px 60px -18px rgba(0,0,0,.7); } 50% { box-shadow: 0 0 0 2px rgba(194,166,119,.95), 0 0 0 16px rgba(194,166,119,.06), 0 24px 60px -18px rgba(0,0,0,.7); } }
@keyframes au-sheen { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(120%); } }

.stage__copy { max-width: 420px; }
.stage__kicker { margin: 0; font-size: .66rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--bronze-lt); animation: au-up .8s var(--ease) 1.1s both; }
.stage__title {
  margin: .8rem 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.1vw, 2.8rem); line-height: 1.05; letter-spacing: -.01em; color: #F4EEE2;
  animation: au-up .9s var(--ease) 1.2s both;
}
.stage__title em { color: var(--bronze-lt); }
.stage__perks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; justify-items: center; }
.stage__perks li { display: inline-flex; align-items: center; gap: .6rem; font-size: .88rem; color: rgba(239,232,218,.78); animation: au-up .7s var(--ease) both; }
.stage__perks li:nth-child(1) { animation-delay: 1.4s; }
.stage__perks li:nth-child(2) { animation-delay: 1.52s; }
.stage__perks li:nth-child(3) { animation-delay: 1.64s; }
.stage__perks svg { width: 17px; height: 17px; color: var(--bronze-lt); flex: none; }
.stage__foot { position: absolute; bottom: clamp(1.2rem, 3vh, 2rem); left: 0; right: 0; margin: 0; font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(239,232,218,.4); }

@keyframes au-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes au-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ form panel */
.panel {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  overflow-x: hidden; overflow-x: clip; /* the off-stage form waits 28px to the side */
  padding: clamp(1.2rem, 3vh, 2rem) clamp(1.25rem, 5vw, 4rem) clamp(1.5rem, 4vh, 2.5rem);
  padding-left: max(clamp(1.25rem, 5vw, 4rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 5vw, 4rem), env(safe-area-inset-right));
  padding-bottom: max(clamp(1.5rem, 4vh, 2.5rem), env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(194,166,119,.14), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(110,123,76,.08), transparent 60%),
    var(--cream);
}
.panel__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; animation: au-fade .6s var(--ease) both; }
.back {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem .55rem .7rem; margin-left: -.7rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s, background .2s;
}
.back svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.back:hover { color: var(--ink); background: rgba(22,23,15,.05); }
.back:hover svg { transform: translateX(-3px); }
.panel__brand { display: none; align-items: center; gap: .55rem; text-decoration: none; font-size: .78rem; font-weight: 800; letter-spacing: .3em; color: var(--bronze-dk); }

.card {
  width: 100%; max-width: 440px; margin: auto; padding: clamp(1.5rem, 4vh, 2.5rem) 0;
  animation: au-card .9s var(--ease) .15s both;
}
@keyframes au-card { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* segmented tabs with a sliding bronze pill */
.tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: rgba(22,23,15,.06); box-shadow: inset 0 0 0 1px var(--line-2);
}
.tabs__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: linear-gradient(135deg, var(--bronze), var(--bronze-dk));
  box-shadow: 0 8px 20px -8px rgba(107,86,55,.7), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .55s var(--spring);
}
.auth[data-mode="signup"] .tabs__pill { transform: translateX(100%); }
.auth[data-mode="me"] .tabs { display: none; }
.tabs__tab {
  position: relative; z-index: 1; padding: .78rem .5rem; text-align: center; border-radius: 999px;
  font-size: .82rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--muted); transition: color .35s;
}
.auth[data-mode="login"] #tabLogin, .auth[data-mode="signup"] #tabSignup { color: #FFF8EA; }

/* headings cross-fade in place */
.heads { display: grid; margin-top: 1.9rem; }
.head { grid-area: 1 / 1; transition: opacity .45s var(--ease), transform .55s var(--ease); }
.head h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.2vw, 2.9rem); line-height: 1; letter-spacing: -.02em; }
.head h1 em { color: var(--bronze); }
.head p { margin: .7rem 0 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.head--signup, .auth[data-mode="signup"] .head--login { opacity: 0; transform: translateY(10px); pointer-events: none; }
.auth[data-mode="signup"] .head--signup { opacity: 1; transform: none; pointer-events: auto; }
.auth[data-mode="me"] .head { opacity: 0; }

/* forms slide between each other; JS animates the container height */
.forms { position: relative; margin-top: 1.8rem; transition: height .5s var(--ease); }
.form {
  position: absolute; top: 0; left: 0; right: 0; display: grid; gap: 1rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(28px); transition: opacity .4s var(--ease), transform .55s var(--ease), visibility 0s .55s;
}
.auth[data-mode="signup"] .form--login { transform: translateX(-28px); }
.auth[data-mode="login"] .form--login, .auth[data-mode="signup"] .form--signup, .auth[data-mode="me"] .form--me {
  position: relative; opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity .5s var(--ease) .08s, transform .6s var(--ease) .08s, visibility 0s;
}

/* floating-label fields */
.field { position: relative; }
.field input {
  width: 100%; height: 58px; padding: 1.3rem 3rem .45rem 2.9rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper); color: var(--ink); font: 500 16px/1 var(--sans); outline: none; appearance: none;
  box-shadow: 0 1px 0 rgba(22,23,15,.03);
  transition: border-color .25s, box-shadow .3s, background .25s;
}
.field input:hover { border-color: rgba(22,23,15,.22); }
.field input:focus { border-color: var(--bronze); box-shadow: 0 0 0 4px rgba(139,116,82,.14); background: #fff; }
.field label {
  position: absolute; left: 2.9rem; top: 50%; transform: translateY(-50%); transform-origin: left center;
  font-size: .95rem; color: var(--muted-2); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 6rem);
  transition: transform .3s var(--ease), color .25s, top .3s var(--ease);
}
.field label span { font-size: .85em; opacity: .8; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 16px; transform: translateY(-50%) scale(.74); color: var(--bronze-dk); font-weight: 600; }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: var(--ink); }
.field input:-webkit-autofill + label { top: 16px; transform: translateY(-50%) scale(.74); }
.field__icon { position: absolute; left: 1rem; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); color: var(--muted-2); transition: color .25s, transform .3s var(--spring); pointer-events: none; }
.field input:focus ~ .field__icon, .field:focus-within .field__icon { color: var(--bronze); transform: translateY(-50%) scale(1.1); }
.field__line {
  position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--bronze), var(--laurel)); transform: scaleX(0); transition: transform .45s var(--ease); pointer-events: none;
}
.field input:focus ~ .field__line { transform: scaleX(1); }
.field__eye {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 10px;
  display: grid; place-items: center; background: none; color: var(--muted-2); cursor: pointer; transition: color .2s, background .2s;
}
.field__eye:hover { color: var(--ink); background: rgba(22,23,15,.05); }
.field__eye svg { width: 20px; height: 20px; }

.field.is-bad input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(166,61,47,.1); }
.field.is-bad label, .field.is-bad .field__icon { color: var(--danger); }
.field.is-ok .field__icon { color: var(--ok); }
.shake { animation: au-shake .45s var(--ease); }
@keyframes au-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

.caps { margin: -.4rem 0 0 .2rem; font-size: .76rem; font-weight: 600; color: var(--bronze-dk); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.link { border: 0; background: none; padding: .4rem 0; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--bronze-dk); text-decoration: underline; text-decoration-color: rgba(107,86,55,.35); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }

.check { position: relative; display: inline-flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--ink-2); cursor: pointer; user-select: none; line-height: 1.4; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none; width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid rgba(22,23,15,.28); background: var(--paper);
  display: grid; place-items: center; transition: background .25s, border-color .25s, transform .3s var(--spring);
}
.check__box svg { width: 13px; height: 13px; color: #fff; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--ease) .05s; }
.check input:checked + .check__box { background: var(--bronze); border-color: var(--bronze); transform: scale(1.06); }
.check input:checked + .check__box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px rgba(139,116,82,.2); }
.check a { color: var(--bronze-dk); font-weight: 600; }
.check.is-bad .check__box { border-color: var(--danger); }

.forgot {
  padding: 1rem 1.1rem; border-radius: 14px; background: rgba(139,116,82,.08); border: 1px solid rgba(139,116,82,.2);
  animation: au-up .45s var(--ease) both;
}
.forgot p { margin: 0 0 .8rem; font-size: .86rem; line-height: 1.55; color: var(--ink-2); }

/* password strength */
.meter { display: flex; align-items: center; gap: .8rem; margin-top: -.3rem; }
.meter__bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.meter__bars i { height: 5px; border-radius: 3px; background: rgba(22,23,15,.08); overflow: hidden; position: relative; }
.meter__bars i::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: var(--c, var(--bronze)); transition: transform .45s var(--ease), background .3s; }
.meter[data-score="1"] { --c: #B4583F; }
.meter[data-score="2"] { --c: #C2A677; }
.meter[data-score="3"] { --c: #8B9A5E; }
.meter[data-score="4"] { --c: #5B6B3A; }
.meter[data-score="1"] i:nth-child(-n+1)::after,
.meter[data-score="2"] i:nth-child(-n+2)::after,
.meter[data-score="3"] i:nth-child(-n+3)::after,
.meter[data-score="4"] i::after { transform: scaleX(1); }
.meter__label { min-width: 7.5rem; text-align: right; font-size: .74rem; font-weight: 600; color: var(--muted); }
.rules { list-style: none; margin: -.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.rules li { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--muted-2); transition: color .3s; }
.rules svg { width: 13px; height: 13px; padding: 2px; border-radius: 50%; background: rgba(22,23,15,.07); color: transparent; transition: background .3s, color .3s, transform .35s var(--spring); }
.rules li.is-ok { color: var(--ok); }
.rules li.is-ok svg { background: var(--ok); color: #fff; transform: scale(1.15); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__error { margin: 0; min-height: 0; font-size: .85rem; font-weight: 600; color: var(--danger); }
.form__error:empty { display: none; }
.form__error:not(:empty) { padding: .7rem .9rem; border-radius: 12px; background: rgba(166,61,47,.07); border: 1px solid rgba(166,61,47,.18); animation: au-up .35s var(--ease) both; }

/* buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: 56px; padding: 0 1.4rem; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; text-decoration: none;
  font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s, width .45s var(--ease), border-radius .45s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  width: 100%; color: #FFF8EA;
  background: linear-gradient(135deg, var(--bronze) 0%, var(--bronze-dk) 55%, var(--olive) 130%);
  background-size: 180% 100%; background-position: 0 0;
  box-shadow: 0 14px 30px -14px rgba(107,86,55,.9), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%);
  transition: transform .8s var(--ease);
}
.btn--primary:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 20px 36px -16px rgba(107,86,55,.95), inset 0 1px 0 rgba(255,255,255,.2); }
.btn--primary:hover::before { transform: translateX(110%); }
.btn--primary:active { transform: translateY(0) scale(.99); }
.btn--primary:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(139,116,82,.3); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn__spin, .btn__done { position: absolute; left: 50%; top: 50%; opacity: 0; pointer-events: none; }
.btn__spin { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2.5px solid rgba(255,248,234,.3); border-top-color: #FFF8EA; }
.btn__done { width: 24px !important; height: 24px !important; margin: -12px 0 0 -12px; stroke-dasharray: 24; stroke-dashoffset: 24; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label, .btn.is-loading .btn__arrow { opacity: 0; }
.btn.is-loading .btn__spin { opacity: 1; animation: au-spin .7s linear infinite; }
.btn.is-done { width: 56px; margin-inline: auto; border-radius: 50%; padding: 0; background: var(--ok); pointer-events: none; }
.btn.is-done .btn__label, .btn.is-done .btn__arrow, .btn.is-done .btn__spin { opacity: 0; animation: none; }
.btn.is-done .btn__done { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--ease) .3s, opacity .2s .25s; }

.btn--ghost { width: 100%; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--wa { height: 46px; padding: 0 1.1rem; border-radius: 12px; background: #1F8F4E; color: #fff; font-size: .74rem; }
.btn--wa:hover { background: #197A42; }

.swap { margin: .2rem 0 0; text-align: center; font-size: .88rem; color: var(--muted); }
.swap a { color: var(--bronze-dk); font-weight: 700; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); padding-bottom: 1px; }
.swap a:hover { background-size: 100% 1.5px; }

.me { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.me__avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--bronze), var(--olive)); color: #FFF8EA; font-weight: 800; font-size: 1.1rem; letter-spacing: .04em; }
.me b { display: block; font-size: 1.02rem; }
.me span { display: block; font-size: .86rem; color: var(--muted); word-break: break-all; }

.secure { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: 1.8rem 0 0; font-size: .74rem; color: var(--muted-2); }
.secure svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ staff (admin) sign-in */
.staff-badge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  background: rgba(22,23,15,.9); color: #EFE3C8; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 8px 20px -12px rgba(0,0,0,.5);
}
.staff-badge svg { width: 14px; height: 14px; color: var(--bronze-lt); }
.head__eyebrow { margin: 0 0 .9rem !important; font-size: .68rem !important; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--bronze) !important; }
.auth--staff .heads { margin-top: 0; }
.auth--staff .stage {
  background:
    radial-gradient(120% 80% at 80% 0%, #3B3222 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, #2F3623 0%, transparent 60%),
    linear-gradient(200deg, var(--olive-800), #121410 75%);
}

/* ------------------------------------------------------------ success curtain */
.welcome {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  color: #F4EEE2; text-align: center; padding: 2rem;
  background: radial-gradient(80% 60% at 50% 40%, var(--olive-700), var(--olive-900));
  clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path .9s cubic-bezier(.7, 0, .2, 1);
}
.welcome.is-on { clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); }
.welcome__medal {
  width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFFDF8, #EDE5D5 70%);
  box-shadow: 0 0 0 2px var(--bronze-lt), 0 0 0 14px rgba(194,166,119,.12), 0 30px 70px -20px rgba(0,0,0,.8);
  opacity: 0; transform: scale(.5);
}
.welcome__medal img { width: 76%; height: auto; }
.welcome.is-on .welcome__medal { animation: au-pop .8s var(--spring) .45s forwards; }
.welcome__kicker { margin: .6rem 0 0; font-size: .7rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--bronze-lt); opacity: 0; }
.welcome__name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; opacity: 0; }
.welcome.is-on .welcome__kicker { animation: au-up .6s var(--ease) .75s forwards; }
.welcome.is-on .welcome__name { animation: au-up .7s var(--ease) .85s forwards; }
@keyframes au-pop { to { opacity: 1; transform: scale(1); } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .auth { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
}

/* tablets + phones: crest becomes a compact banner above the card */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .stage { min-height: 0; }
  .stage__inner { flex-direction: row; justify-content: flex-start; gap: 1.2rem; text-align: left; padding: calc(1.2rem + env(safe-area-inset-top)) 1.5rem 3.2rem; }
  .stage__word, .stage__perks, .stage__foot { display: none; }
  .crest { width: 118px; flex: none; }
  .crest__ring text { font-size: 17px; letter-spacing: 7px; }
  .stage__title { font-size: clamp(1.5rem, 5vw, 2rem); margin-top: .4rem; }
  .panel {
    margin-top: -1.6rem; border-radius: 26px 26px 0 0; z-index: 1;
    box-shadow: 0 -20px 40px -24px rgba(0,0,0,.45);
    animation: au-sheet .8s var(--ease) .1s both;
  }
  .panel__top { justify-content: space-between; }
  .card { margin: 0 auto; padding-top: 1.4rem; }
  @keyframes au-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 480px) {
  .stage__inner { padding: calc(1rem + env(safe-area-inset-top)) 1.1rem 2.8rem; gap: .9rem; }
  .crest { width: 92px; }
  .crest__laurel { display: none; }
  .stage__kicker { font-size: .58rem; letter-spacing: .26em; }
  .stage__title { font-size: 1.4rem; }
  .panel__brand span { display: none; }
  .head h1 { font-size: 2.1rem; }
  .field input { height: 56px; }
  .tabs__tab { font-size: .78rem; }
}
@media (max-width: 860px) and (orientation: landscape) and (max-height: 500px) {
  .stage { display: none; }
  .panel { margin-top: 0; border-radius: 0; }
  .panel__brand { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .stage__dust { display: none; }
}
