:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-muted: #fbfaf6;
  --ink: #0d1b2e;
  --ink-2: #1f2c47;
  --muted: #5b6884;
  --brand: #1d4ed8;
  --brand-soft: #e7edff;
  --warm: #c2683f;
  --border: rgba(13, 27, 46, 0.1);
  --border-2: rgba(13, 27, 46, 0.14);
  --border-strong: rgba(13, 27, 46, 0.22);
  --shadow-md: 0 6px 18px -6px rgba(13, 27, 46, 0.18), 0 1px 2px rgba(13, 27, 46, 0.08);
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(231, 237, 255, 0.55), rgba(246, 227, 211, 0.38) 48%, transparent 74%),
    var(--bg);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
}

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

.auth-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  padding: clamp(26px, 5vw, 34px);
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 850;
  text-decoration: none;
}

.auth-brand img {
  width: 28px;
  height: 28px;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 6vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

p {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-intro {
  margin-bottom: 24px;
  color: var(--ink-2);
  font-size: 1rem;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 24px;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  list-style: none;
}

.trust-list li {
  position: relative;
  padding-left: 14px;
}

.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--warm);
}

label {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;
}

input:hover {
  border-color: var(--border-strong);
}

button {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: var(--ink-2);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.message,
.error {
  margin: 0 0 16px;
  border-radius: 8px;
  padding: 11px 13px;
  font-weight: 750;
}

.message.success {
  border: 1px solid rgba(10, 138, 95, 0.22);
  background: #dff1e8;
  color: #075f42;
}

.message.error,
.error {
  border: 1px solid rgba(184, 57, 42, 0.24);
  background: #f7e1dc;
  color: #8f261b;
}

.login-links,
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  margin-top: 18px;
}

.login-links a,
.auth-links a,
.secondary,
.home-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.login-links a:hover,
.auth-links a:hover,
.secondary:hover,
.home-link:hover,
.legal-note a:hover {
  color: var(--brand);
}

.legal-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.legal-note a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 9px;
}

.auth-legal-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-footer a:hover {
  color: var(--brand);
}

.auth-legal-footer span {
  font-weight: 800;
}

.home-link,
.secondary {
  margin-top: 12px;
  color: var(--muted);
}

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

  .auth-card {
    padding: 24px 20px;
  }

  .login-links,
  .auth-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
