@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #F8F9FC;
  --card: #FFFFFF;
  --ink: #1C2A38;
  --secondary: #354553;
  --muted: #586875;
  --line: #E1E6EB;
  --line-strong: #BBC5CC;
  --accent: #243D53;
  --mist: #EAF0F4;
  --red: #A44943;
  --shadow: 0 2px 10px rgba(28, 42, 56, .04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 "DM Sans", system-ui, -apple-system, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.login-card {
  width: min(100%, 460px);
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2 { font-family: "DM Sans", system-ui, -apple-system, sans-serif; font-weight: 600; }

h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.intro { margin: 0 0 24px; color: var(--secondary); }
.login-form { display: grid; gap: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }

.field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.field input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.password-control { position: relative; }
.password-control input { padding-right: 86px; }

.password-visibility {
  position: absolute;
  top: 50%;
  right: 5px;
  min-width: 72px;
  min-height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button, .provider-button {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
}

.primary-button { background: var(--accent); color: #fff; cursor: pointer; }
.primary-button:hover { background: var(--ink); border-color: var(--ink); }

.login-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid #D9A7A1;
  border-radius: 8px;
  background: #FFF1EF;
  color: #873A35;
}
.login-card > [role="alert"] { margin: 0 0 18px; padding: 11px 13px; border: 1px solid #D9A7A1; border-radius: 8px; background: #FFF1EF; color: #873A35; }
.login-card > [role="status"] { margin: 0 0 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--mist); color: var(--ink); }
.login-card > [role="status"]:empty { display: none; }

.alternative-login { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.alternative-login h2 { margin: 0 0 5px; font-size: 20px; }
.alternative-login > p { margin: 0 0 14px; color: var(--secondary); font-size: 14px; }
.provider-options { display: grid; gap: 10px; }

.provider-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-color: var(--line-strong);
  background: transparent;
  color: var(--secondary);
  font-size: 15px;
  text-align: left;
}

.provider-button:disabled { cursor: not-allowed; }
.coming-soon { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.help-link { display: inline-block; min-height: 44px; margin-top: 20px; padding: 10px 0; color: var(--accent); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 480px) {
  .login-shell { padding: 16px; }
  .login-card { border-radius: 10px; }
  h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
