:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-fg: #0f172a;
  --color-muted: #64748b;
  --color-sky: #0369a1;
  --color-sky-soft: #e0f2fe;
  --color-border: #e2e8f0;
  --color-danger: #b91c1c;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(14, 165, 233, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(3, 105, 161, 0.08), transparent 45%),
    var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--color-sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-sub { font-size: 0.85rem; color: var(--color-muted); }

.card {
  width: 100%;
  max-width: 26rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.card .lead {
  margin: 0 0 1.35rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
  color: var(--color-fg);
}
.field input:focus {
  outline: 2px solid var(--color-sky-soft);
  border-color: var(--color-sky);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-sky);
  color: #fff;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.65; cursor: wait; }

.err {
  display: none;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: var(--color-danger);
  font-size: 0.9rem;
}
.err.show { display: block; }

.foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  font-size: 0.85rem;
}
