/* The sign-in page's only stylesheet. The page sends a CSP of `style-src 'self'`, so there is no inline style. */
:root {
  color-scheme: light dark;
  --bg: #f4f1eb;
  --card: #ffffff;
  --fg: #1b1a4a;
  --muted: #5c6072;
  --border: #c7c1b3;
  --accent: #5b5bff;
  --accent-hover: #4444e6;
  --accent-fg: #ffffff;
  --error-bg: #fdecee;
  --error-fg: #8f1d2c;
  --error-border: #f2b8c0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b27;
    --card: #14133a;
    --fg: #ece7dc;
    --muted: #999386;
    --border: #3f4253;
    --accent: #8383ff;
    --accent-hover: #9c9cff;
    --accent-fg: #0c0b27;
    --error-bg: #3a1620;
    --error-fg: #ffb3bf;
    --error-border: #6b2a38;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

main {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

h1 { margin: 0; font-size: 22px; font-weight: 600; }
.sub { margin: 2px 0 20px; color: var(--muted); font-size: 14px; }

label { display: block; margin: 14px 0 4px; font-size: 14px; font-weight: 500; }

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit; /* 16px: iOS does not zoom a focused field */
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-fg);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

button:hover { background: var(--accent-hover); }

.error {
  margin: 0 0 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--error-fg);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 6px;
}
