:root {
  --ink: #071f35;
  --ink-soft: #173956;
  --muted: #607286;
  --line: #dcecf7;
  --blue: #119fe8;
  --blue-strong: #0079c8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(73, 166, 222, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 166, 222, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(17, 159, 232, 0.18), transparent 34%),
    #f5fbff;
  background-size: 72px 72px, 72px 72px, auto, auto;
  font-family:
    "Manrope",
    "SF Pro Text",
    "SF Pro Display",
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.auth-site-shell {
  min-height: 100svh;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 124px 28px 56px;
}

.auth-card {
  width: min(100%, 470px);
  padding: 30px;
  border: 1px solid rgba(185, 226, 250, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(12, 80, 130, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-icon {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow:
    0 14px 30px rgba(19, 156, 231, 0.25),
    0 0 0 1px rgba(166, 226, 255, 0.7);
}

.brand-logo-image {
  display: block;
  width: 142px;
  height: 46px;
  margin-left: -6px;
  object-fit: contain;
  object-position: left center;
}

.topbar .brand-logo-image {
  width: 154px;
  height: 46px;
  margin-left: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, #0b4f83 0%, #10a8ee 62%, #70d8ff 100%);
}

.auth-heading {
  margin-top: 34px;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-strong);
  background: #f3faff;
  font-size: 0.88rem;
  font-weight: 800;
}

h1 {
  margin: 16px 0 0;
  font-size: 2.3rem;
  line-height: 1.05;
}

p {
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  border: 1px solid #b8dff6;
  border-radius: 8px;
  color: var(--ink);
  background: #eef9ff;
}

.notice.is-error {
  border-color: #ffd2c4;
  background: #fff4ef;
}

.local-code-hint {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(17, 159, 232, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(231, 247, 255, 0.9)),
    linear-gradient(rgba(17, 159, 232, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 159, 232, 0.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  box-shadow: 0 18px 42px rgba(12, 80, 130, 0.1);
}

.local-code-hint span {
  color: var(--blue-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.local-code-hint strong {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.16em;
}

.local-code-hint p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 750;
}

label small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
}

.auth-consent {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  color: #4b6076;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.auth-consent input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.auth-consent a {
  color: var(--blue-strong);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #cfe7f5;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(17, 159, 232, 0.12);
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(180deg, #22b8f3 0%, #058bd3 100%);
  box-shadow: 0 14px 30px rgba(0, 132, 210, 0.26);
  font-weight: 850;
  cursor: pointer;
}

.code-input {
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
}

.resend-form {
  margin-top: 12px;
}

.resend-form button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-strong);
  background: #f3faff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.resend-form button:hover {
  background: #e8f6ff;
}

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
}

.auth-switch a {
  color: var(--blue-strong);
  font-weight: 850;
}

.admin-entry {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-strong);
  background: #f3faff;
  font-weight: 850;
}

.admin-entry:hover {
  background: #e8f6ff;
}

@media (max-width: 520px) {
  .auth-page {
    padding: 16px;
  }

  .auth-card {
    padding: 22px;
  }

  h1 {
    font-size: 2rem;
  }
}
