/* base.css -- colour tokens (light/dark), page background, cards, form fields, buttons, hints, messages, helpers. Every page loads it first.
   Split out of style.css on 2026-10-30 (one stylesheet per area).
   Order on a page: base.css, then app.css (chat and admin), then the page's own. */

/* ltchat -- mobile first, no framework; light and dark follow the device.
   Colours since 2026-10-31 (Bert: "weg vom Gruenen, heller, freundlicher"):
   friendly blue accent, warm peach glow; "online" stays green (chat.css). */
:root {
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f2f5fb;
  --border: #e1e6f0;
  --text: #1b2233;
  --muted: #5f6880;
  --accent: #2e6be6;
  --accent-strong: #2258c7;
  --accent-soft: #e8effe;
  --accent-text: #ffffff;
  --warm-soft: #fff0e1;
  --bubble: #ffffff;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --error-bg: #fdecec;
  --error-text: #9b1c1c;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(28, 39, 76, 0.08);
  --shadow: 0 1px 2px rgba(28, 39, 76, 0.05), 0 8px 24px rgba(28, 39, 76, 0.08);
  --shadow-lg: 0 24px 64px rgba(28, 39, 76, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b;
    --surface: #181c25;
    --surface-2: #1f2430;
    --border: #2b3140;
    --text: #e7eaf2;
    --muted: #9aa3b8;
    --accent: #7ea6ff;
    --accent-strong: #a3bfff;
    --accent-soft: #1e2a47;
    --accent-text: #0a1226;
    --warm-soft: #2a2219;
    --bubble: #212735;
    --danger: #f2b8b5;
    --danger-soft: #3b1f1d;
    --error-bg: #3b1f1d;
    --error-text: #f2b8b5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 10% -120px, var(--warm-soft), transparent 70%),
    radial-gradient(1100px 600px at 90% -200px, var(--accent-soft), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

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

/* ---------- Login, setup, forgot-password cards ---------- */

.card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 30px 26px 26px;
}

.logo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.brand {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

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

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px; /* below 16px iOS Safari zooms on focus */
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px; /* comfortable touch target */
  transition: background 0.15s, transform 0.05s, opacity 0.15s;
}

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

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

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

.secondary-button {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background: var(--border);
}

.small-button {
  width: auto;
  min-height: 36px;
  padding: 7px 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  font-size: 14px;
}

.small-button:hover {
  background: var(--accent);
  color: var(--accent-text);
}

.danger-button {
  width: auto;
  min-height: 36px;
  padding: 7px 14px;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 999px;
  font-size: 14px;
}

.danger-button:hover {
  background: var(--danger);
  color: #ffffff;
}

.icon-button {
  width: auto;
  min-height: 38px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.hint {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.message {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 18px;
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.message.info {
  background: var(--accent-soft);
  color: var(--text);
}

.below {
  margin: 18px 0 0;
  font-size: 14px;
  text-align: center;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 400;
}

.check input {
  width: auto;
  margin: 0;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}

.hidden {
  display: none !important;
}


@media (max-width: 720px) {
  .card {
    padding: 26px 20px 22px;
  }
}
