:root {
  --blue: #1f5fa8;
  --blue-dark: #163f70;
  --green: #2f9e56;
  --red: #c0392b;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #dbe1e8;
  --text: #22292f;
  --muted: #6b7684;
}

* { box-sizing: border-box; }

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

header.topbar {
  background: var(--blue-dark);
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

header.topbar a { color: white; text-decoration: none; }
header.topbar .brand { font-weight: 700; font-size: 1.1rem; }
header.topbar nav a { margin-left: 16px; opacity: 0.9; }
header.topbar nav a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

h1 { font-size: 1.5rem; margin-top: 0; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; color: var(--blue-dark); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge.geplant { background: #e6eefb; color: var(--blue); }
.badge.bestanden { background: #e5f6ea; color: var(--green); }
.badge.nicht_bestanden { background: #fbe7e5; color: var(--red); }
.badge.laufend { background: #fff3d6; color: #9a6a00; }
.badge.abgeschlossen { background: #e5f6ea; color: var(--green); }

.btn {
  display: inline-block;
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}
.btn:hover { background: var(--blue-dark); }
.btn.secondary { background: white; color: var(--blue); border: 1px solid var(--blue); }
.btn.small { padding: 5px 10px; font-size: 0.82rem; }

form.inline { display: inline; }

input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 10px;
  font-family: inherit;
}

label { font-weight: 600; font-size: 0.88rem; color: var(--muted); }

.login-wrap {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-box input {
  text-align: center;
  letter-spacing: 4px;
  font-size: 1.4rem;
  text-transform: uppercase;
}
.error { color: var(--red); font-size: 0.9rem; }

/* Prüfungsprotokoll-Checkliste */
.protocol-category { margin-bottom: 22px; }
.protocol-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: white;
}
.protocol-item.checked { background: #eefaf1; border-color: #b9e6c6; }
.protocol-item .checkbox-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.protocol-item.checked .checkbox-btn {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.protocol-item .item-text { flex: 1; font-size: 1rem; }
.protocol-item .item-time { font-size: 0.78rem; color: var(--muted); min-width: 60px; text-align: right; }

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin: 10px 0 4px;
}
.progress-bar .fill { height: 100%; background: var(--green); }

/* Einsatzplan */
.ez-scroll {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ez-scroll table { width: 100%; }
.ez-scroll th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.ez-scroll td, .ez-scroll th { font-size: 0.88rem; padding: 6px 8px; }
tr.ez-aktuell td {
  background: #e6eefb;
  font-weight: 600;
}
tr.ez-pruefung td {
  color: var(--red);
  font-weight: 600;
}
tr.ez-urlaub td {
  color: var(--muted);
  font-style: italic;
}

.notice {
  background: #fff8e6;
  border: 1px solid #f0d896;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #7a5b00;
}
