:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090f18;
  color: #e8f0f6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --muted: #a9c0cf;
  --mint: #97dfd0;
  --rule: #2b414f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse at 50% 40%, #152939 0%, #090f18 66%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--mint); }

.page-width {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.brand-bar {
  background: #0c1824;
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  min-height: clamp(64px, 5.5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-bar a.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 1.68rem;
  font-weight: 680;
  letter-spacing: -.065em;
}

.header-link, .footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #c1d4df;
  font-size: .9rem;
}

.sign-in-main {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(34px, 6vh, 68px) 24px;
}

.auth-shell { width: min(100%, 460px); }

.card {
  padding: clamp(23px, 4vw, 35px);
  min-width: 0;
  border: 1px solid #3b5465;
  border-radius: 18px;
  background: #132232;
  box-shadow: 0 20px 60px #0005, inset 0 1px #b9efdf0c;
}

h1 {
  margin: 0;
  color: #f0f6fa;
  font-size: clamp(1.85rem, 3.8vw, 2.18rem);
  font-weight: 670;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.intro {
  margin: 8px 0 25px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
}

.field + .field { margin-top: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: #dce9f1;
  font-size: .875rem;
  line-height: 1.35;
  font-weight: 600;
}

.field label span {
  margin-left: 3px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 450;
}

.field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 10px 13px;
  border: 1px solid #405a6e;
  border-radius: 8px;
  background: #0c1824;
  color: #eef6fc;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.field input::placeholder { color: #91a9b9; opacity: 1; }
.field input:hover { border-color: #6a8b9c; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.remember { margin: 16px 0 18px; }

.remember label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  color: #dce9f1;
  font-size: .875rem;
  cursor: pointer;
}

.remember input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #8cd7c9;
}

.remember p {
  margin: 1px 0 0 26px;
  color: var(--muted);
  font-size: .79rem;
}

button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 47px;
  padding: 10px 16px;
  border: 1px solid #afe8db;
  border-radius: 8px;
  background: #9adfd2;
  color: #142e34;
  font: inherit;
  font-size: .95rem;
  font-weight: 730;
  cursor: pointer;
}

button[type="submit"]:hover { background: #b4ebe0; }
button[type="submit"]:disabled { cursor: wait; opacity: .75; }

#message {
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid #86585c;
  border-radius: 7px;
  background: #392732;
  color: #ffd5ce;
  font-size: .85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#message:empty { margin: 0; padding: 0; border: 0; }

.account-help, .script-hint {
  margin: 17px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.55;
}

.site-footer { border-top: 1px solid var(--rule); }
.footer-links { display: flex; justify-content: center; gap: 22px; padding-block: 7px; }
.footer-links a { font-size: .82rem; }

@media (max-width: 560px) {
  .page-width { width: calc(100% - 40px); }
  .sign-in-main { place-items: start center; padding: 27px 20px 34px; }
  .card { border-radius: 14px; }
  .intro { margin-bottom: 20px; }
}

@media (max-width: 360px) {
  .page-width { width: calc(100% - 32px); }
  .sign-in-main { padding-inline: 16px; }
  .card { padding-inline: 19px; }
}
