:root {
  --bg: #080c1c; --card: #111833; --card2: #0d1329; --line: #24305e; --text: #f8f4f0; --muted: #a9b3d6;
  --blue: #3351D0; --blue-h: #4262e6; --cyan: #108D94; --red: #ff6b6b; --red-bg: #3a1016; --green: #35d07f;
  --amber: #ffb020;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: #8fb0ff; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 17px; margin: 0 0 14px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Kopfzeile */
.top { display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--card2); }
.top .brand { display: flex; align-items: center; gap: 12px; font-weight: 650; font-size: 18px; text-decoration: none;
  color: var(--text); }
.top .brand img { height: 26px; }
.top .grow { flex: 1; }
.top nav { display: flex; gap: 6px; align-items: center; }
.top nav a, .top nav button { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 8px;
  background: none; border: 0; font: inherit; cursor: pointer; }
.top nav a:hover, .top nav button:hover, .top nav a.on { background: var(--card); color: var(--text); }
.who { color: var(--muted); font-size: 13px; margin-right: 6px; }

main { max-width: 1180px; margin: 0 auto; padding: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 22px; }

/* Formulare */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card2);
  color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; margin: 0;
  cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 9px; border: 0;
  background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--blue-h); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.ghost:hover { background: var(--card2); }
.btn.danger { background: transparent; border: 1px solid #6b2630; color: var(--red); font-weight: 500; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 6px 10px; font-size: 13px; }

.msg { padding: 10px 14px; border-radius: 9px; margin: 0 0 14px; font-size: 14px; }
.msg.err { background: var(--red-bg); color: #ffb3b3; border: 1px solid #6b2630; }
.msg.ok { background: #0d2e22; color: #9ff0c4; border: 1px solid #1d5c40; }
.msg.info { background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.hidden { display: none !important; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.login .logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 22px;
  font-size: 20px; font-weight: 650; }
.login .logo img { height: 34px; }
.login .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* Board-Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tile { display: block; padding: 26px 24px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--blue); transform: translateY(-2px); }
.tile .t { font-size: 19px; font-weight: 650; }
.tile .s { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile .bar { height: 4px; width: 44px; border-radius: 2px; background: var(--cyan); margin-bottom: 16px; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { color: var(--muted); font-size: 13px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13.5px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.admin { background: #1d2a6b; color: #b9c7ff; }
.pill.off { background: #2b2f45; color: var(--muted); }
.pill.lock { background: var(--red-bg); color: #ffb3b3; }
.pill.wait { background: #3d2c07; color: var(--amber); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #4a5275; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(53, 208, 127, .18); }
tr.waiting td { background: rgba(255, 176, 32, .05); }
td select { min-width: 170px; }
.inline-pw { display: flex; gap: 6px; margin-top: 8px; }
.inline-pw input { max-width: 220px; }
.sect-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sect-head h2 { margin: 0; }
code.url { background: var(--card2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }

@media (max-width: 760px) {
  main { padding: 16px; }
  .top { padding: 12px 16px; flex-wrap: wrap; }
  .hide-sm { display: none; }
  td, th { padding-left: 6px; padding-right: 6px; }
}
