/* Sign-in, sign-up and reset pages. Same palette as the dashboard, light and dark. */

:root {
  --page: #f3f5fb;
  --card: #ffffff;
  --line: #e1e5ef;
  --ink: #1f2a44;
  --ink-2: #5b6780;
  --muted: #8a94ab;
  --accent: #1f4e9c;
  --accent-soft: #e8eef9;
  --accent-ink: #ffffff;
  --red: #b42318;
  --red-soft: #fdecea;
  --green: #12744a;
  --green-soft: #e3f5ec;
  --field: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0f1320;
    --card: #171d2e;
    --line: #2a3350;
    --ink: #e7ebf5;
    --ink-2: #aab3c9;
    --muted: #7f8aa5;
    --accent: #7fa6ff;
    --accent-soft: rgba(127, 166, 255, 0.14);
    --accent-ink: #0c1020;
    --red: #ff8a80;
    --red-soft: rgba(255, 138, 128, 0.14);
    --green: #6ee0a6;
    --green-soft: rgba(110, 224, 166, 0.14);
    --field: #1d2437;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #0f1320;
  --card: #171d2e;
  --line: #2a3350;
  --ink: #e7ebf5;
  --ink-2: #aab3c9;
  --muted: #7f8aa5;
  --accent: #7fa6ff;
  --accent-soft: rgba(127, 166, 255, 0.14);
  --accent-ink: #0c1020;
  --red: #ff8a80;
  --red-soft: rgba(255, 138, 128, 0.14);
  --green: #6ee0a6;
  --green-soft: rgba(110, 224, 166, 0.14);
  --field: #1d2437;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 28px rgba(16, 24, 40, 0.08);
}

.auth-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  object-fit: contain;
}

h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.notice.error {
  background: var(--red-soft);
  color: var(--red);
}

.notice.ok {
  background: var(--green-soft);
  color: var(--green);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.auth-submit {
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 160ms ease, transform 120ms ease;
}

.auth-submit:hover {
  filter: brightness(1.06);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-note {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.auth-links {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.auth-links a,
.auth-wrap a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-foot {
  margin: 22px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
