:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5a667a;
  --line: #dde2e9;
  --primary: #1f5fbf;
  --ok-bg: #e3f3ea;
  --ok-fg: #14603a;
  --warn-bg: #fff1d6;
  --warn-fg: #7a4a00;
  --bad-bg: #fbe4e2;
  --bad-fg: #9c1f18;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 8px 24px;
  background: #14233b;
  color: #fff;
}

.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.topbar nav a {
  color: #d5dce8;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topbar nav a.active { background: #fff; color: #0b1220; font-weight: 600; }
.userpick { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #d5dce8; }
.userpick select { min-height: 44px; border-radius: 6px; padding: 0 8px; font: inherit; }

.content { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.sr { position: absolute; left: -9999px; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  margin: 16px 0;
}
.msg { padding: 10px 14px; border-radius: 8px; max-width: 85%; white-space: pre-wrap; }
.msg-user { align-self: flex-end; background: #e1ecfb; color: #174a99; }
.msg-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }

.composer { display: flex; gap: 8px; }
.composer input { flex: 1 1 auto; }
input[type="text"], input:not([type]), select {
  min-height: 44px;
  border: 1px solid #aeb7c4;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}
input[type="checkbox"] { width: 22px; height: 22px; }
.auto { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; min-height: 44px; }

/* Form.io-Knöpfe (.btn, Auswahllisten) behalten ihr eigenes Aussehen. */
button:not(.btn):not(.choices__button) {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.secondary:not(.btn) { background: #fff; color: var(--text); border-color: #c5ccd6; font-weight: 500; }
button:not(.btn):not(.choices__button):disabled { opacity: 0.45; cursor: not-allowed; }

.notice { background: var(--ok-bg); color: var(--ok-fg); padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-weight: 600; }
.error { color: var(--bad-fg); font-weight: 600; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.box-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.box-head h2 { flex: 1 1 200px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e8ecf2; color: #3a4658; }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag-warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag-bad { background: var(--bad-bg); color: var(--bad-fg); }

.notice-warn { background: var(--warn-bg); color: var(--warn-fg); padding: 10px 14px; border-radius: 8px; margin: 8px 0; font-weight: 600; }
.login { max-width: 480px; margin: 40px auto; }
.login form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 12px; }
