* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #e8e8e8; background: #0f1115;
}

#bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; background: rgba(17, 19, 25, 0.95);
  border-bottom: 1px solid #23262f; backdrop-filter: blur(6px);
  flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.brand::before { content: "🌍 "; }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters label { color: #8a909c; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.count { color: #8a909c; font-size: 12px; white-space: nowrap; }

input, select, button {
  font: inherit; color: #e8e8e8; background: #1a1d25;
  border: 1px solid #2c303b; border-radius: 8px; padding: 6px 10px;
}
input[type="date"] { color-scheme: dark; }
input:focus, select:focus { outline: none; border-color: #4a8cff; }

button { cursor: pointer; background: #4a8cff; border-color: #4a8cff; color: #fff; font-weight: 600; }
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; border-color: #2c303b; color: #8a909c; font-weight: 500; }
button:disabled { opacity: 0.6; cursor: default; }

#map { position: absolute; top: 56px; bottom: 0; left: 0; right: 0; background: #0f1115; }
.leaflet-container { background: #0f1115; }

.evt-dot span {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4);
}

.leaflet-popup-content-wrapper { background: #1a1d25; color: #e8e8e8; border-radius: 10px; }
.leaflet-popup-tip { background: #1a1d25; }
.pop h3 { margin: 6px 0 2px; font-size: 16px; }
.pop .cat { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #0f1115;
  padding: 1px 7px; border-radius: 20px; font-weight: 700; }
.chk { display: flex; align-items: center; gap: 5px; }
.chk input { width: auto; }
.pop .recur { font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: #00b894; border: 1px solid #00b894; padding: 1px 6px; border-radius: 20px; margin-left: 4px; }
.pop .when { color: #4a8cff; font-weight: 600; font-size: 13px; }
.pop .where { color: #8a909c; font-size: 12px; }
.pop p { margin: 6px 0; color: #c4c8d0; }
.pop a { color: #4a8cff; }

/* modal */
.hidden { display: none !important; }
#overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #161922; border: 1px solid #2c303b; border-radius: 14px;
  padding: 24px; width: 100%; max-width: 460px; position: relative;
}
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal .x { position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 22px; color: #8a909c; padding: 0; }
#add-form label { display: block; color: #8a909c; font-size: 12px; margin-bottom: 12px; }
#add-form input, #add-form select, #add-form textarea {
  display: block; width: 100%; margin-top: 4px; }
#add-form textarea { resize: vertical; }
.row { display: flex; gap: 12px; }
.row label { flex: 1; }
.form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
#form-msg { color: #ff6b6b; font-size: 12px; }

@media (max-width: 760px) {
  .actions { margin-left: 0; }
  .filters label { font-size: 11px; }
}
