:root {
  color-scheme: dark;
  --night: #101920;
  --night-2: #172630;
  --paper: #f7f3eb;
  --ink: #15232c;
  --muted: #6f7a82;
  --gold: #d7b274;
  --gold-deep: #aa7f3e;
  --error: #a63139;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); }
body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at 88% 3%, rgba(215,178,116,.16), transparent 31%),
    radial-gradient(circle at 7% 92%, rgba(72,124,139,.16), transparent 34%),
    linear-gradient(155deg, #0c141a, var(--night-2));
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.login-shell {
  width: min(100%, 500px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
}

.brand {
  justify-self: start;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #d8e0e4;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #1b252c;
  background: linear-gradient(145deg, #ead096, var(--gold));
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
}

.login-card {
  align-self: center;
  margin-bottom: 54px;
  padding: 30px 26px 25px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(0,0,0,.38), inset 0 1px 0 #fff;
}

.lock-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #6f5127;
  background: #eee0c3;
}
.lock-mark svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.eyebrow { color: var(--gold-deep); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
h1 { margin: 7px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 10vw, 45px); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; }
.intro { margin: 12px 0 25px; color: var(--muted); font-size: 15px; line-height: 1.45; }

.login-error {
  margin: -7px 0 18px;
  border: 1px solid rgba(166,49,57,.22);
  border-radius: 12px;
  padding: 11px 12px;
  color: #7f2027;
  background: #f4dfe0;
  font-size: 13px;
  font-weight: 700;
}

form { display: grid; gap: 8px; }
label { margin-top: 7px; color: #44535c; font-size: 12px; font-weight: 750; }
input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #c9c5bc;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 16px;
  outline: none;
  appearance: none;
}
input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(170,127,62,.13); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 72px; }
.show-password {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 62px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: #6f5127;
  background: #eee5d3;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.submit-button {
  min-height: 56px;
  margin-top: 13px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #172832, #263d49);
  box-shadow: 0 12px 24px rgba(17,31,39,.22);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease;
}
.submit-button:active { transform: scale(.98); filter: brightness(1.12); }
.submit-button:disabled { opacity: .7; cursor: wait; }
.security-note { margin: 19px 0 0; color: #7b858b; font-size: 11px; text-align: center; }

@media (max-height: 680px) {
  .login-shell { padding-top: calc(12px + env(safe-area-inset-top)); gap: 8px; }
  .brand { min-height: 40px; }
  .login-card { align-self: start; margin-bottom: 0; padding-top: 22px; }
  .lock-mark { width: 45px; height: 45px; margin-bottom: 14px; }
  .intro { margin-bottom: 16px; }
  input { min-height: 50px; }
  .submit-button { min-height: 51px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
