:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #201b1a;
  background: #231716;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --red: #a7130a;
  --red-dark: #760b08;
  --yellow: #f3c321;
  --muted: #71635f;
  --line: #d7c6c0;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: clamp(18px, 5vw, 56px);
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgb(13 10 10 / 48%), rgb(24 9 8 / 18%)),
    url("/assets/images/starlight-banner.png") center / cover fixed,
    #231716;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100%, 470px);
}

.login-panel {
  padding: 32px clamp(23px, 7vw, 48px) 25px;
  text-align: center;
  background: rgb(255 249 244 / 91%);
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 25px;
  box-shadow: 0 25px 80px rgb(15 6 5 / 34%);
  backdrop-filter: blur(12px);
}

.brand-logo {
  width: 100px;
  height: 100px;
  display: block;
  margin: -76px auto 16px;
  object-fit: cover;
  background: #168b97;
  border: 5px solid #fff9f4;
  border-radius: 50%;
  box-shadow: 0 7px 25px rgb(28 17 14 / 28%);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.45rem);
  letter-spacing: -0.045em;
}

.intro {
  margin: 5px 0 24px;
  color: #382d2a;
  font-size: 1.06rem;
  font-weight: 550;
}

form {
  display: grid;
  gap: 9px;
  text-align: left;
}

label {
  margin-top: 3px;
  color: #403433;
  font-size: 0.84rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: #292120;
  background: rgb(255 255 255 / 92%);
  border: 1px solid #d5c2bc;
  border-radius: 15px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input::placeholder {
  color: #95827d;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(167 19 10 / 13%);
}

button {
  min-height: 55px;
  margin-top: 8px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  background: linear-gradient(180deg, #c0160c, #8e0e08);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  box-shadow: 0 7px 17px rgb(119 15 9 / 25%);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

button:hover {
  background: linear-gradient(180deg, #a7140b, #700b07);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red-dark);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: center;
}

.login-footer {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgb(106 76 69 / 22%);
  font-size: 0.84rem;
  font-weight: 700;
}

.footer-divider {
  width: 1px;
  height: 20px;
  background: #8d7770;
}

.setup-notice {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.back-to-menu {
  margin-top: 16px;
  display: inline-block;
  color: var(--red-dark);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.back-to-menu:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  body {
    min-height: 100svh;
    padding: 100px 16px 35px;
    background-attachment: scroll;
  }

  .login-panel {
    padding: 29px 22px 22px;
    border-radius: 22px;
  }

  .brand-logo {
    width: 88px;
    height: 88px;
    margin-top: -69px;
  }
}

@media (max-height: 650px) and (min-width: 561px) {
  body {
    padding-block: 84px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
