html {
  background: #f4f7fb;
}

html,
body.login-page {
  width: 100%;
  min-width: 0;
}

body.login-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(14, 165, 166, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
  color: var(--ink);
  overflow-x: hidden;
  overflow-y: auto;
}

.page {
  width: 100vw;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.shell,
.login-panel {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
}

.shell {
  max-width: none;
  margin: 0;
}

.login-panel {
  max-width: 300px;
}

.login-card {
  width: 100%;
  display: grid;
  gap: 13px;
  padding: 26px 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.login-brand {
  color: var(--ink);
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.login-card h2 {
  margin: -4px 0 2px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.login-card p {
  margin: -4px auto 2px;
  max-width: 220px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.login-card form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.field input {
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 4px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 72, 138, 0.12);
}

.field input::placeholder {
  color: #94a3b8;
}

.form-links,
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-items: start;
}

.support-link {
  width: fit-content;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.support-link--muted {
  color: var(--muted);
}

.support-link--muted:hover,
.support-link--muted:focus-visible {
  color: var(--primary);
}

.support-link:hover,
.support-link:focus-visible {
  color: #0f766e;
  text-decoration: underline;
  outline: none;
}

.submit,
.social-submit {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.submit {
  margin-top: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.submit:hover,
.submit:focus-visible {
  background: #0f766e;
  border-color: #0f766e;
  outline: none;
}

.divider {
  margin-top: 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.divider::before,
.divider::after {
  content: '';
  height: 1px;
  background: rgba(148, 163, 184, 0.42);
}

.social-form {
  margin: 0;
}

.social-submit {
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: #ffffff;
  color: var(--ink);
}

.social-submit:hover,
.social-submit:focus-visible {
  border-color: rgba(14, 165, 166, 0.38);
  background: rgba(14, 165, 166, 0.06);
  outline: none;
}

.social-mark {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.social-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-footer {
  justify-items: center;
  justify-content: center;
  padding-top: 2px;
}

.muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.muted .support-link {
  display: inline;
  width: auto;
  font-size: inherit;
  font-weight: 700;
}

.flash {
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 6px;
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

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

  .login-panel {
    max-width: 280px;
  }

  .login-card {
    width: 100%;
    padding: 24px 22px;
  }
}
