/* Shkolo MCP — login/consent/privacy page stylesheet (#611) */

/* ── Custom properties: light defaults ──────────────────────────────── */
:root {
  color-scheme: light dark;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555555;
  --border: #cccccc;
  --input-bg: #ffffff;
  --input-text: #1a1a1a;
  --btn-bg: #1a56db;
  --btn-text: #ffffff;
  --btn-hover-bg: #1648c0;
  --link: #1a56db;
  --link-hover: #1648c0;
  --error-bg: #fde8e8;
  --error-text: #9b1c1c;
  --error-border: #f98080;
  --focus-ring: #1a56db;
}

/* ── Dark theme overrides ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #444444;
    --input-bg: #2a2a2a;
    --input-text: #e0e0e0;
    --btn-bg: #4a90d9;
    --btn-text: #ffffff;
    --btn-hover-bg: #3a7fc1;
    --link: #6ab0f5;
    --link-hover: #8fc3f7;
    --error-bg: #4b1313;
    --error-text: #fca5a5;
    --error-border: #b91c1c;
    --focus-ring: #6ab0f5;
  }
}

/* ── Base layout ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header, main {
  width: 100%;
  max-width: 28rem;
}

/* ── Typography ──────────────────────────────────────────────────────── */
h1 {
  font-size: 1.5rem;
  margin-block: 0.75rem;
  color: var(--text);
}

h2 {
  font-size: 1.125rem;
  margin-block: 0.75rem;
  color: var(--text);
}

p {
  margin-block: 0.5rem;
  color: var(--text);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

/* ── Form elements ───────────────────────────────────────────────────── */
label {
  display: block;
  font-weight: 600;
  margin-block-start: 0.75rem;
  margin-block-end: 0.25rem;
  color: var(--text);
}

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button[type="submit"] {
  display: block;
  width: 100%;
  margin-block-start: 1rem;
  padding: 0.625rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--btn-hover-bg);
}

button[type="submit"]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── Error / alert panel ─────────────────────────────────────────────── */
[role="alert"] {
  padding: 0.75rem 1rem;
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
  border-radius: 0.375rem;
  margin-block: 0.75rem;
}
