/* Login assets live under public so deployment packagers preserve them. */
:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --surface: rgba(255, 255, 255, .9);
  --surface-strong: #fff;
  --ink: #454545;
  --ink-strong: #33363a;
  --muted: #727780;
  --line: rgba(47, 55, 72, .12);
  --line-strong: rgba(47, 55, 72, .2);
  --accent: #8b826e;
  --accent-strong: #756c5b;
  --slate: #4b5159;
  --danger: #a54138;
  --success: #47705a;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(139, 130, 110, .11), transparent 30rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, .9fr) minmax(520px, 1.1fr);
}

.login-presentation {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(32px, 4.5vw, 70px);
  display: flex;
  flex-direction: column;
  color: #f7f5ef;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .08), transparent 17rem),
    linear-gradient(150deg, #555b62 0%, #444a51 56%, #3b4046 100%);
}

.login-presentation::before,
.login-presentation::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.login-presentation::before {
  width: 36rem;
  height: 36rem;
  right: -24rem;
  top: -18rem;
}

.login-presentation::after {
  width: 28rem;
  height: 28rem;
  left: -20rem;
  bottom: -16rem;
}

.login-brand,
.mobile-brand {
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.06em;
}

.login-brand-number {
  color: #c5bcaa;
}

.presentation-copy {
  width: min(100%, 540px);
  margin: auto 0;
  padding: clamp(48px, 8vh, 90px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.login-presentation .eyebrow {
  color: #c5bcaa;
}

.presentation-copy h1 {
  max-width: 510px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.8rem, 5.4vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .94;
}

.presentation-copy > p:not(.eyebrow) {
  max-width: 480px;
  margin: 26px 0 0;
  color: rgba(247, 245, 239, .72);
  font-family: Lora, Georgia, serif;
  font-size: clamp(.98rem, 1.3vw, 1.12rem);
  line-height: 1.7;
}

.presentation-footnote {
  max-width: 450px;
  margin: 0;
  color: rgba(247, 245, 239, .48);
  font-size: .72rem;
  line-height: 1.6;
}

.document-preview {
  position: relative;
  width: 210px;
  height: 132px;
  margin: 42px 0 0 22px;
  opacity: .8;
}

.document-preview-sheet {
  position: absolute;
  inset: 0;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 20px 50px rgba(19, 22, 25, .18);
  transform: rotate(-2deg);
}

.document-preview-sheet-back {
  transform: translate(18px, -9px) rotate(4deg);
  background: rgba(255, 255, 255, .035);
}

.preview-kicker,
.preview-title,
.preview-line {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .38);
}

.preview-kicker {
  width: 30px;
  margin-bottom: 12px;
  background: #b9ae99;
}

.preview-title {
  width: 82px;
  height: 4px;
  margin-bottom: 18px;
}

.preview-line {
  width: 75%;
  margin-top: 9px;
  background: rgba(255, 255, 255, .2);
}

.preview-line-long {
  width: 100%;
}

.preview-line-short {
  width: 48%;
}

.preview-seal {
  position: absolute;
  right: 20px;
  bottom: 17px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(197, 188, 170, .55);
  border-radius: 50%;
}

.preview-seal svg {
  width: 14px;
  fill: none;
  stroke: #c5bcaa;
  stroke-width: 1.1;
}

.login-area {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-brand {
  display: none;
  margin-bottom: 34px;
  color: var(--ink-strong);
}

.login-card {
  width: min(100%, 470px);
  padding: clamp(30px, 4.2vw, 52px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow:
    0 24px 70px rgba(23, 27, 35, .08),
    0 4px 14px rgba(23, 27, 35, .03);
  backdrop-filter: blur(18px);
}

.login-card-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.access-icon {
  flex: 0 0 auto;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--slate);
  background: rgba(75, 81, 89, .045);
}

.access-icon svg,
.input-shell > svg,
.login-support > svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.access-icon svg {
  width: 22px;
}

.login-card-heading .eyebrow {
  margin-bottom: 6px;
}

h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
}

.login-intro {
  margin: 20px 0 30px;
  color: var(--muted);
  font-family: Lora, Georgia, serif;
  font-size: .92rem;
  line-height: 1.65;
}

form {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

label {
  color: var(--ink-strong);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .025em;
}

.input-shell {
  position: relative;
}

.input-shell > svg {
  position: absolute;
  z-index: 1;
  left: 16px;
  top: 50%;
  width: 18px;
  color: #8b9097;
  pointer-events: none;
  transform: translateY(-50%);
}

input {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px 12px 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, .82);
  color: var(--ink-strong);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

input::placeholder {
  color: #a3a6ab;
}

input:hover {
  border-color: rgba(47, 55, 72, .32);
}

input:focus {
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow: 0 0 0 4px rgba(139, 130, 110, .13);
}

input:disabled {
  opacity: .62;
}

.remember-session {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  margin-top: -2px;
  color: var(--ink-strong);
  cursor: pointer;
}

.remember-session input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--slate);
  cursor: pointer;
}

.remember-session span,
.remember-session strong,
.remember-session small {
  display: block;
}

.remember-session strong {
  font-size: .79rem;
  line-height: 1.35;
}

.remember-session small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.45;
}

#mfa-fields[hidden] {
  display: none;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.5;
}

button {
  min-height: 52px;
  margin-top: 2px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--slate);
  box-shadow: 0 9px 24px rgba(43, 48, 54, .16);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms var(--ease);
}

button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms var(--ease);
}

button:hover {
  background: #3f454c;
  box-shadow: 0 12px 28px rgba(43, 48, 54, .22);
  transform: translateY(-1px);
}

button:hover svg {
  transform: translateX(3px);
}

button:focus-visible {
  outline: 3px solid rgba(139, 130, 110, .35);
  outline-offset: 3px;
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: wait;
  opacity: .64;
  transform: none;
}

.login-status {
  min-height: 0;
  margin: -3px 0 -5px;
  color: var(--danger);
  font-size: .82rem;
  line-height: 1.5;
}

.login-status:empty {
  display: none;
}

.login-status.success {
  color: var(--success);
}

.login-support {
  margin-top: 28px;
  padding-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.login-support > svg {
  flex: 0 0 auto;
  width: 17px;
  margin-top: 2px;
}

.login-support p {
  margin: 0;
  font-size: .76rem;
  line-height: 1.55;
}

.login-legal {
  margin: 24px 0 0;
  color: #8a8e94;
  font-size: .68rem;
  letter-spacing: .035em;
  text-align: center;
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-presentation {
    display: none;
  }

  .login-area {
    padding: 34px 22px;
  }

  .mobile-brand {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  body {
    background: var(--bg);
  }

  .login-area {
    justify-content: flex-start;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .login-card-heading {
    align-items: flex-start;
  }
}

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