@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0e1013; color: #e6e8eb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
a { color: inherit; }

/* --- Login --- */
.login-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
}
.login-badge {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(200,16,46,0.12); border: 1px solid rgba(200,16,46,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 18px;
}
.login-screen h1 { font-size: 20px; margin: 0 0 4px; }
.login-sub { color: #8b8f98; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; margin: 0 0 28px; }
.login-btn {
  background: #c8102e; color: #fff; text-decoration: none;
  font-weight: 600; font-size: 14px; padding: 12px 22px; border-radius: 8px;
}

/* --- App shell --- */
#app { min-height: 100vh; }
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #1c1f26;
  position: sticky; top: 0; background: #0e1013; z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.badge {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(200,16,46,0.12); border: 1px solid rgba(200,16,46,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.header-title { font-size: 15px; font-weight: 700; }
.header-sub { font-size: 11.5px; color: #8b8f98; font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #8b8f98;
}
.user-chip a { color: #8b8f98; text-decoration: underline; }

.tab-bar {
  display: flex; gap: 4px; padding: 10px 12px;
  border-bottom: 1px solid #1c1f26; overflow-x: auto;
}
.tab-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: #8b8f98; cursor: pointer; white-space: nowrap;
}
.tab-btn.active { color: #e6e8eb; background: #1a1d23; border-color: #2a2e37; }

main { padding: 14px 12px 40px; max-width: 720px; margin: 0 auto; }

.filter-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.stat-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-chip { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 4px 9px; border-radius: 20px; font-weight: 600; }

select {
  font-family: inherit; font-size: 13px; font-weight: 500;
  background: #1a1d23; color: #e6e8eb; border: 1px solid #2a2e37;
  border-radius: 7px; padding: 8px 10px; cursor: pointer;
}

.list { display: flex; flex-direction: column; gap: 8px; }

.person-row {
  display: flex; align-items: center; gap: 10px;
  background: #14171c; border: 1px solid #1c1f26; border-radius: 9px; padding: 10px 12px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 13.5px; font-weight: 600; }
.person-meta { font-size: 11.5px; color: #8b8f98; font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
.qual-row { display: flex; gap: 4px; flex-wrap: wrap; }
.qual-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 600; color: #8b8f98;
  border: 1px solid #2a2e37; border-radius: 4px; padding: 2px 5px;
}
.status-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.count-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #8b8f98;
  border: 1px solid #2a2e37; border-radius: 20px; padding: 3px 8px; white-space: nowrap;
}

.ei-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ei-label { font-size: 12.5px; color: #8b8f98; }

.edit-card {
  background: #14171c; border: 1px solid #1c1f26; border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.edit-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-btn {
  display: flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 7px; border: 1px solid #2a2e37; background: transparent;
  color: #8b8f98; cursor: pointer;
}
.status-btn.active-verfuegbar { border-color: #3fb950; color: #3fb950; background: rgba(63,185,80,0.12); }
.status-btn.active-nicht_verfuegbar { border-color: #f85149; color: #f85149; background: rgba(248,81,73,0.12); }
.status-btn.active-unbekannt { border-color: #8b8f98; color: #8b8f98; background: rgba(139,143,152,0.12); }
.note-input {
  font-family: inherit; font-size: 12.5px; background: #0e1013;
  border: 1px solid #2a2e37; border-radius: 6px; padding: 7px 9px; color: #e6e8eb; width: 100%;
}

.einsatz-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-label { font-size: 12px; color: #8b8f98; font-family: 'JetBrains Mono', monospace; }
.primary-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: #fff;
  background: #c8102e; border: none; border-radius: 7px; padding: 8px 12px; cursor: pointer;
}
.primary-btn-full { width: 100%; justify-content: center; }
.form-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #14171c; border: 1px solid #1c1f26; border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.form-input {
  font-family: inherit; font-size: 13px; background: #0e1013;
  border: 1px solid #2a2e37; border-radius: 6px; padding: 8px 10px; color: #e6e8eb;
}

.einsatz-card {
  background: #14171c; border: 1px solid #1c1f26; border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.einsatz-top { display: flex; justify-content: space-between; align-items: flex-start; }
.einsatz-titel { font-size: 14px; font-weight: 700; }
.icon-btn { background: transparent; border: none; color: #8b8f98; cursor: pointer; padding: 4px; font-size: 15px; }
.assigned-row { display: flex; gap: 6px; flex-wrap: wrap; }
.assigned-chip {
  display: flex; align-items: center; gap: 5px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #e6e8eb;
  background: #1a1d23; border: 1px solid #2a2e37; border-radius: 20px; padding: 4px 8px; cursor: pointer;
}
.empty-small { font-size: 11.5px; color: #8b8f98; font-style: italic; }
.secondary-btn {
  display: flex; align-items: center; gap: 6px; align-self: flex-start;
  font-family: inherit; font-size: 12px; font-weight: 600; color: #e6e8eb;
  background: transparent; border: 1px solid #2a2e37; border-radius: 7px;
  padding: 6px 10px; cursor: pointer;
}
.assign-panel {
  display: flex; flex-direction: column; gap: 4px;
  background: #0e1013; border: 1px solid #1c1f26; border-radius: 8px; padding: 8px;
  max-height: 240px; overflow-y: auto;
}
.assign-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 4px; cursor: pointer; }

.empty-state { font-size: 12.5px; color: #8b8f98; padding: 20px 0; text-align: center; }

/* --- Admin --- */
.admin-page { background: #0e1013; color: #e6e8eb; }
.admin-wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-page h1 { font-size: 18px; }
.hint { font-size: 12.5px; color: #8b8f98; }
.back-link { font-size: 12.5px; color: #8b8f98; text-decoration: none; }
.admin-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.admin-form input, .admin-form select {
  font-family: inherit; font-size: 13px; background: #14171c;
  border: 1px solid #2a2e37; border-radius: 6px; padding: 8px 10px; color: #e6e8eb;
}
.admin-form input[type=email] { flex: 1 1 260px; }
.admin-form button {
  font-family: inherit; font-size: 13px; font-weight: 600; color: #fff;
  background: #c8102e; border: none; border-radius: 6px; padding: 8px 14px; cursor: pointer;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-bottom: 1px solid #1c1f26; }
.admin-table a { color: #f85149; text-decoration: none; }
