body { font-family: sans-serif; margin: 0; padding: 20px; background: #121212; color: #f1f1f1; }
h1, h3 { text-align: center; }
h3 { margin-top: 30px; margin-bottom: 10px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
button { font-size: 20px; padding: 15px; flex: 1 1 calc(45% - 10px); border: none; border-radius: 10px; background: #1e88e5; color: white; cursor: pointer; }
button:active { background: #1565c0; }
.summary, .notes-list { background: #1e1e1e; padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.note-item { border-bottom: 1px solid #333; padding: 6px 0; }
.clear-data { background: #d32f2f; margin-top: 10px; width: 100%; padding: 15px; border-radius: 10px; font-size: 18px; border: none; cursor: pointer; }

.numpad-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 1000;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.numpad { width: 90%; max-width: 500px; background: #222; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.numpad-display { background: #333; color: white; padding: 20px; font-size: 48px; text-align: right; font-family: monospace; min-height: 60px; }
.numpad-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #111; }
.numpad-button { background: #333; border: none; color: white; font-size: 36px; padding: 25px 0; cursor: pointer; }
.numpad-button:active { background: #555; }
.numpad-button.confirm { background: #1e88e5; grid-column: span 3; }
.numpad-button.confirm:active { background: #1565c0; }

.task-count-numpad {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  box-sizing: border-box;
}
.task-count-numpad .numpad-button { padding: 30px 0; font-size: 42px; }
.task-count-numpad .other-button { padding: 15px 0; font-size: 22px; background-color: #555; }

#heatmap-container { height: 400px; border-radius: 10px; z-index: 1; border: 1px solid #444; margin-top: 10px; }
.marker-pin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid white; box-shadow: 0 0 8px rgba(0,0,0,0.9);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #ffffff !important; color: #333 !important; box-shadow: 0 3px 14px rgba(0,0,0,0.4) !important; }
.leaflet-control-zoom-in, .leaflet-control-zoom-out { color: #333 !important; background-color: #fff !important; border-bottom: 1px solid #ccc !important; }

.legend { line-height: 18px; color: #333; background: rgba(255,255,255,0.9); padding: 8px 12px; border-radius: 5px; box-shadow: 0 0 15px rgba(0,0,0,0.2); }
.legend-gradient { height: 15px; border: 1px solid #999; width: 100%; background: linear-gradient(to right, hsl(120,90%,50%), hsl(60,90%,50%), hsl(0,90%,50%)); margin-top: 5px; margin-bottom: 5px; }
.legend-labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: bold; }

.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9); z-index: 1001;
  display: none; flex-direction: column; justify-content: center; align-items: center;
  padding: 15px;
}
.modal-content {
  background: #222; width: 100%; height: 100%; max-width: 1200px;
  border-radius: 15px; padding: 20px; box-sizing: border-box;
  display: flex; flex-direction: column;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal-header h4 { margin: 0 0 15px 0; flex-grow: 1; }
.modal-close-btn { font-size: 30px; cursor: pointer; color: white; background: none; border: none; }
#historical-map-container { flex-grow: 1; border-radius: 10px; z-index: 1; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 5px 0; }
.filter-group { flex: 1; min-width: 180px; }
.filter-group label { display: block; margin-bottom: 3px; font-size: 13px; }
.filter-group input[type="range"] { width: 100%; margin-top: 2px; }
.filter-group .range-labels { display: flex; justify-content: space-between; font-size: 11px; }

.edit-dialog-inputs { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.edit-dialog-inputs label { font-size: 16px; }
.edit-dialog-inputs input { background: #333; color: white; border: 1px solid #555; padding: 10px; border-radius: 5px; font-size: 18px; }

.summary p { margin: 4px 0; font-size: 14px; }
.summary h3 { margin-top: 5px; margin-bottom: 10px; }

#archive-list-container { display: none; overflow-y: auto; flex-shrink: 1; background: #333; padding: 10px; border-radius: 5px; margin-top: 10px; max-height: 250px; }
.archive-note-item { border-bottom: 1px solid #555; padding: 8px 5px; font-size: 12px; display: flex; justify-content: space-between; }

#screenshot-footer { display: none; text-align: center; font-size: 10px; color: #777; margin-top: 10px; padding-top: 5px; border-top: 1px solid #333; }

.collapsible-section summary {
  list-style: none; display: block; cursor: pointer; padding: 10px;
  background: #333; border-radius: 5px; font-size: 15px; font-weight: 500; margin-top: 10px;
}
.collapsible-section summary::-webkit-details-marker { display: none; }
.collapsible-section summary:hover { background: #444; }
.collapsible-section summary::after { content: ' (Rozwiń) ▼'; float: right; font-size: 0.9em; color: #ccc; }
.collapsible-section[open] summary::after { content: ' (Zwiń) ▲'; }
.collapsible-section > .filter-group { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; padding: 10px; background: #2a2a2a; }

.mic-icon {
  font-size: 20px; padding: 8px 10px; position: absolute; right: 5px; top: 50%;
  transform: translateY(-50%); cursor: pointer; border-radius: 50%; line-height: 1;
}
.mic-icon:active, .mic-icon.listening { background: rgba(255,255,255,0.2); }

#voice-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9); z-index: 2000;
  display: none; flex-direction: column; justify-content: center; align-items: center;
  color: white; font-size: 28px; text-align: center; padding: 20px;
}
#voice-overlay-content { background: #333; padding: 30px 50px; border-radius: 15px; }
#voice-transcript { display: block; font-size: 20px; color: #ccc; margin-top: 15px; min-height: 25px; font-style: italic; }

@media (max-width: 600px) {
  .button-row { flex-direction: column; }
  button { flex: 1 1 100%; }
  .numpad { width: 95%; }
  .numpad-display { font-size: 40px; }
  .numpad-button { font-size: 30px; padding: 20px 0; }
}

.btn-sm { font-size: 14px; padding: 8px 12px; flex: 0 1 auto; }
.btn-green { background: #2e7d32; }
.btn-orange { background: #fb8c00; }
.btn-gray { background: #555; }
