:root {
  color-scheme: light;
  --ink: #161615;
  --muted: #6f7073;
  --gold: #b38b24;
  --gold-light: #d6aa36;
  --gold-deep: #866318;
  --field: #f3f4f7;
  --line: #d7d9df;
  --font: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); font-size: 14px; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid #c69c36; outline-offset: 3px; }

.auth-page { min-height: 100dvh; background: #0d0d0c; }
.auth-scene {
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 42px 20px 28px;
  background:
    radial-gradient(ellipse at -2% -8%, #edcc6e 0, #a5812e 7%, transparent 29%),
    radial-gradient(ellipse at 102% 106%, #ecc75a 0, #91702a 8%, transparent 28%),
    radial-gradient(ellipse at 99% 8%, #5c461e 0, transparent 24%),
    radial-gradient(ellipse at 2% 98%, #5d481e 0, transparent 26%),
    linear-gradient(116deg, #11110f 0%, #090909 49%, #11100d 100%);
}
.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .27;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -230px;
  right: -300px;
  width: 490px;
  height: 490px;
  border: 1px solid #a17b2c;
  border-radius: 50%;
  pointer-events: none;
}
.ornament { position: absolute; z-index: -1; pointer-events: none; }
.ornament-left {
  top: 8.3%; left: -2.8%;
  width: 26%; height: 37%;
  border: 1px solid #9c792b;
  border-radius: 10px;
  transform: skewX(-31deg);
  background: linear-gradient(130deg, #5c471e66, #14120d20 70%);
  box-shadow: inset 0 1px 18px #d5a63218, 0 0 20px #c4962a0b;
}
.ornament-left::before {
  content: ""; position: absolute; top: calc(100% + 12px); left: 41%;
  width: 65%; height: 31%; border: 1px solid #98742a; border-radius: 8px;
  transform: skewX(24deg); background: linear-gradient(115deg,#201b10,#090908);
}
.ornament-left::after {
  content: ""; position: absolute; top: 46%; left: 67%;
  width: 52%; height: 23%; border: 1px solid #87651f; border-radius: 7px;
  transform: skewX(30deg); background: #17140d;
}
.ornament-right {
  right: -9%; bottom: -6%; width: 28%; height: 42%;
  border: 1px solid #a17b2c; border-radius: 8px;
  transform: skewX(-34deg) rotate(-4deg);
  background: linear-gradient(140deg, #18150f, #312613 65%, #0d0c0a);
  box-shadow: 0 0 30px #d5a63312;
}
.ornament-right::after {
  content: ""; position: absolute; top: 24%; left: -15%;
  width: 150%; height: 140%; border: 1px solid #8d6d29; border-radius: 9px;
  transform: rotate(12deg); opacity: .56;
}
.auth-content { width: min(362px, 100%); position: relative; z-index: 1; transform: translateY(-24px); }
.brand-lockup { text-align: center; margin: 0 0 5px; color: #d1d0cc; }
.brand-logo { width: min(322px, 100%); height: auto; display: block; margin: 0 auto; }
.brand-lockup p { margin: 0; font-size: 12px; letter-spacing: .08px; color: #d0cfcc; }
.auth-card {
  padding: 26px 26px 19px;
  border-radius: 13px;
  background: #fbfbfb;
  box-shadow: 0 14px 42px #0008, 0 0 34px #c5983020;
}
.auth-card h1 { margin: 0; text-align: center; font-size: 21px; line-height: 1.25; font-weight: 750; letter-spacing: -.45px; }
.auth-intro { margin: 7px 0 20px; color: #707176; text-align: center; font-size: 12px; }
.field { margin-top: 15px; }
.field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: #252529; }
.input-shell { height: 39px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); padding: 0 11px; transition: border-color .16s ease, box-shadow .16s ease; }
.input-shell:focus-within { border-color: #b28a29; box-shadow: 0 0 0 2px #b38b2420; }
.input-shell input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0; color: #232328; background: transparent; font-size: 13px; }
.input-shell input::placeholder { color: #85868d; opacity: 1; }
.field-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #747984; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lock-icon { width: 17px; height: 17px; }
.visibility-toggle { border: 0; padding: 3px; flex: 0 0 auto; display: grid; place-items: center; color: #757983; background: transparent; cursor: pointer; border-radius: 4px; }
.visibility-toggle:hover { color: #2f3034; }
.visibility-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye-closed { display: none; }
.visibility-toggle[aria-pressed="true"] .eye-open { display: none; }
.visibility-toggle[aria-pressed="true"] .eye-closed { display: block; }
.submit-button {
  width: 100%; min-height: 40px; margin-top: 21px; border: 0; border-radius: 8px;
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  background: linear-gradient(105deg, #c49a2b 0%, #a67c1c 56%, #8e6818 100%);
  box-shadow: 0 3px 7px #8f681b42, inset 0 1px #f2d17466;
  transition: filter .15s ease, transform .15s ease, opacity .15s ease;
}
.submit-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.submit-button:active:not(:disabled) { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: .78; }
.button-loading { display: none; align-items: center; justify-content: center; gap: 9px; }
.submit-button.is-loading .button-label { display: none; }
.submit-button.is-loading .button-loading { display: flex; }
.loading-dots { width: 13px; height: 13px; border: 2px solid #ffffff70; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-message { color: #9c3328; background: #fff0ed; border: 1px solid #f0c6bf; border-radius: 7px; padding: 9px 10px; margin: 15px 0 -6px; font-size: 12px; line-height: 1.45; }
.form-message[hidden] { display: none; }
.card-foot { display: flex; align-items: center; gap: 12px; margin-top: 19px; color: #74747a; }
.card-foot span { height: 1px; background: #dedee1; flex: 1; }
.card-foot p { margin: 0; font-size: 11px; white-space: nowrap; }
.auth-card.is-loading { opacity: .94; }
.session-state { color: #72737a; font-size: 13px; text-align: center; padding: 24px 0; }

@media (max-width: 600px) {
  .auth-scene { padding: 30px 18px 24px; }
  .ornament-left { width: 43%; height: 24%; top: 2%; left: -17%; }
  .ornament-right { width: 43%; height: 27%; right: -25%; bottom: -3%; }
  .auth-content { transform: none; }
  .brand-lockup { margin-bottom: 10px; }
  .brand-logo { width: min(290px, 100%); height: auto; }
  .auth-card { padding: 25px 22px 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
