:root {
  --brand: #8b0000;
  --brand-dark: #650000;
  --bg: #f5f5f5;
  --text: #1d1d1f;
  --muted: #666;
  --card: #fff;
  --border: #ddd;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: var(--brand); color: white; box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 1000; position: relative; }
.topbar nav { display: flex; gap: 8px; align-items: center; }
.topbar a, .topbar button { color: white; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 8px 10px; text-decoration: none; }
#gpsStatus { margin-left: 10px; font-size: 14px; opacity: .9; }
main { height: calc(100% - 56px); position: relative; }
#map { width: 100%; height: 100%; }
.actionbar { position: absolute; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 900; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
button, input, select, textarea { font: inherit; }
button { border: 1px solid var(--border); background: white; border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
button.primary, .primary { background: var(--brand); color: white; border-color: var(--brand-dark); }
.auth-panel { position: fixed; inset: 0; z-index: 2000; background: linear-gradient(145deg, #580000, #222); display: grid; place-items: center; padding: 16px; }
.card { background: var(--card); border-radius: 16px; padding: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.18); border: 1px solid var(--border); }
.auth-card { width: min(480px, 100%); }
.auth-card h1 { margin-top: 0; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 12px 0; }
.tabs button { box-shadow: none; border-radius: 8px; }
.tabs button.active { background: var(--brand); color: white; }
.tab-content { display: none; }
.tab-content.active { display: grid; gap: 10px; }
label { display: grid; gap: 4px; font-weight: 600; margin: 8px 0; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: white; }
textarea { min-height: 80px; resize: vertical; }
.message { margin-top: 12px; color: var(--brand-dark); min-height: 20px; }
.info-panel { position: absolute; top: 12px; right: 12px; z-index: 950; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 110px); overflow: auto; background: rgba(255,255,255,.96); border-radius: 14px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.info-panel h2 { margin: 0 0 8px; }
.hydrant-list { padding-left: 20px; }
.hydrant-list li { margin: 0 0 10px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.hydrant-list span { float: right; color: var(--muted); }
.direction { display: grid; place-items: center; margin: 8px 0; }
.arrow { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: white; font-size: 46px; line-height: 1; transform-origin: center; }
dialog { border: none; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.35); max-width: 460px; width: calc(100% - 24px); }
dialog menu { display: flex; justify-content: flex-end; gap: 10px; padding: 0; }
.admin-body { height: auto; min-height: 100%; }
.admin-main { height: auto; max-width: 1100px; margin: 20px auto; padding: 0 12px; display: grid; gap: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.inline-form { display: grid; grid-template-columns: 1.4fr 1fr 2fr auto; gap: 8px; align-items: end; margin-top: 14px; }
code { background: #eee; padding: 1px 4px; border-radius: 4px; }
@media (max-width: 760px) {
  .actionbar { grid-template-columns: 1fr 1fr; }
  .actionbar button { padding: 10px 8px; }
  .info-panel { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 122px); right: 8px; left: 8px; width: auto; max-height: 45%; }
  .inline-form { grid-template-columns: 1fr; }
  .topbar { font-size: 14px; }
  #gpsStatus { display: block; margin-left: 0; }
}

/* FireGPS Karten-Symbole */
.firegps-user-icon,
.firegps-hydrant-icon {
  background: transparent;
  border: none;
}
.user-dot {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a73e8;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0,0,0,.55);
}
.user-ring {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(26,115,232,.45);
  background: rgba(26,115,232,.12);
}
.hydrant-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px 8px 8px 0;
  transform: rotate(-45deg);
  background: var(--brand);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,.45);
  font-weight: 800;
  font-size: 15px;
}
.hydrant-symbol::first-letter {
  transform: rotate(45deg);
}
.firegps-hydrant-icon .hydrant-symbol {
  line-height: 1;
}
.firegps-hydrant-icon .hydrant-symbol {
  text-align: center;
}
.firegps-hydrant-icon .hydrant-symbol {
  transform: rotate(-45deg);
}
.firegps-hydrant-icon .hydrant-symbol::before {
  content: 'H';
  transform: rotate(45deg);
}
.firegps-hydrant-icon .hydrant-symbol {
  font-size: 0;
}
.firegps-hydrant-icon .hydrant-symbol::before {
  font-size: 15px;
}
.confirm-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 500;
  background: #fff8e1;
  border: 1px solid #f0d98a;
  border-radius: 10px;
  padding: 10px;
}
.confirm-row input {
  width: auto;
  margin-top: 3px;
}
button.danger {
  background: #7a0000;
  color: #fff;
  border-color: #520000;
}
button.small {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14px;
}
.table-wrap {
  overflow-x: auto;
}
small {
  color: var(--muted);
}
