﻿* { box-sizing: border-box; }



[hidden] { display: none !important; }

button:focus,
.tor-button:focus,
.map-marker:focus,
.status-switch:focus {
  outline: none;
}

button:focus-visible,
.tor-button:focus-visible,
.map-marker:focus-visible,
.status-switch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

.overview-mode-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 4px;
}

.overview-mode-button {
  min-width: 170px;
  padding: 11px 20px;
  border: 1px solid #555;
  border-radius: 10px;
  background: #303030;
  color: #ddd;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.overview-mode-button:hover { background: #444; }
.overview-mode-button.active { border-color: #3e7e3e; background: #3e7e3e; color: #fff; }

.map-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
    width: min(96%, 1800px);
  margin: 24px auto 0;
  padding: 8px;
  border: 1px solid #454545;
  border-radius: 12px;
  background: #222;
  box-shadow: 0 6px 18px rgba(0,0,0,.24);
}

.map-selector-button {
  display: flex;
  flex: 1 1 calc((100% - 24px) / 4);
  min-width: calc((100% - 24px) / 4);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #555;
  border-radius: 9px;
  background: #303030;
  color: #ddd;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.map-selector-button:hover { background: #444; }
.map-selector-button.active { border-color: #3e7e3e; background: #3e7e3e; color: #fff; }
#mapView.has-map-selector .public-map-shell { margin-top: 10px; }

.public-map-shell {
  display: grid;
  place-items: center;
  width: min(96%, 1800px);
  margin: 24px auto 20px;
  padding: 12px;
  border: 1px solid #3f3f3f;
  border-radius: 16px;
  background: #1d1d1d;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}

.public-map {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--map-frame-width, min(84%, 1400px));
  height: var(--map-frame-height, clamp(350px, calc(100dvh - 480px), 680px));
  min-height: 350px;
  overflow: hidden;
  border: 1px solid #3f3f3f;
  border-radius: 11px;
  background: #1d1d1d;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  color: #aaa;
  cursor: grab;
  touch-action: pan-y;
}

.public-map.has-image { display: block; min-height: 350px; }
.public-map.is-panning { cursor: grabbing; }
.public-map > .public-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
  will-change: transform, filter;
}

.public-map > .public-map-image.map-contour-image {
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.92))
          drop-shadow(-1px 0 0 rgba(255,255,255,.92))
          drop-shadow(0 1px 0 rgba(255,255,255,.92))
          drop-shadow(0 -1px 0 rgba(255,255,255,.92))
          drop-shadow(0 4px 9px rgba(0,0,0,.72));
}

.public-map > .public-map-image.map-tile-preview {
  filter: none;
}

.public-map > .public-map-image.map-tile-preview.map-contour-image {
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.92))
          drop-shadow(-1px 0 0 rgba(255,255,255,.92))
          drop-shadow(0 1px 0 rgba(255,255,255,.92))
          drop-shadow(0 -1px 0 rgba(255,255,255,.92));
}

.public-map > .public-map-image.map-tile-preview.tiles-covered {
  opacity: 0;
}

.public-map-tiles {
  position: absolute;
  z-index: 2;
  overflow: visible;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform, filter;
}

.public-map-tiles.map-contour-image {
  filter: none;
}

.public-map-tiles.map-contour-image.tiles-ready {
  filter: drop-shadow(1px 0 0 rgba(255,255,255,.92))
          drop-shadow(-1px 0 0 rgba(255,255,255,.92))
          drop-shadow(0 1px 0 rgba(255,255,255,.92))
          drop-shadow(0 -1px 0 rgba(255,255,255,.92));
}

.public-map-tile {
  position: absolute;
  display: block;
  max-width: none;
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

.public-map-tile.tile-ready {
  opacity: 1;
}

.map-fullscreen-close { display: none; }
body.map-fullscreen-open { overflow: hidden; }

.public-map-shell.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.public-map-shell.map-fullscreen .public-map {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  touch-action: none;
}

.public-map-shell.map-fullscreen .public-map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.public-map-shell.map-fullscreen .map-fullscreen-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(24,24,24,.88);
  color: #fff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

body.map-fullscreen-open .overlay { z-index: 400; }
body.map-fullscreen-open .popup { z-index: 410; }
.public-map-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.map-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 7;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  background: rgba(20,20,20,.78);
  color: #d0d0d0;
  font-size: 11px;
  font-weight: 300;
  pointer-events: none;
}
.public-map-empty { padding: 80px 20px; font-size: 17px; }
.public-map .map-no-markers { position: absolute; top: 16px; left: 50%; padding: 7px 11px; border-radius: 7px; background: rgba(15,15,15,.82); transform: translateX(-50%); }

.map-marker {
  position: absolute;
  z-index: 4;
  width: 50px;
  height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -100%);
  cursor: pointer;
  pointer-events: auto;
}

.map-marker:hover { z-index: 8; transform: translate(-50%, -100%) scale(1.08); }
.map-marker .marker-drop {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #777;
  box-shadow: 0 4px 12px rgba(0,0,0,.75);
  transform: rotate(-45deg);
  cursor: pointer;
}

.marker-status-hint {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 35;
  width: max-content;
  max-width: min(220px, 72vw);
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 7px;
  background: rgba(24,26,29,.97);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,.42);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.map-marker.marker-status-hint-visible .marker-status-hint {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.map-marker .marker-core { color: #fff; font-size: 13px; font-weight: 800; transform: rotate(45deg); }
.map-marker.status-error .marker-core::after { content: "!"; }
.map-marker .marker-label {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: max-content;
  max-width: 210px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  background: rgba(15,15,15,.9);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
}

.map-marker .marker-label small { display: block; margin-top: 2px; color: #c8c8c8; font-size: 10px; font-weight: 300; }
.map-marker.status-open .marker-drop,
.map-marker.status-hold-open .marker-drop { background: #4CAF50; }
.map-marker.status-closed .marker-drop,
.map-marker.status-hold-closed .marker-drop { background: #f44336; }
.map-marker.status-unknown .marker-drop {
  background: #FFC107;
  animation: none;
  transition: background-color 1.5s ease-in-out;
}
.map-marker.status-error .marker-drop {
  background: #ff5507;
  animation: none;
  transition: background-color 1.5s ease-in-out;
}
body.status-pulse-dark .map-marker.status-unknown .marker-drop { background-color: #6a6a6a; }
body.status-pulse-dark .map-marker.status-error .marker-drop { background-color: #6a6a6a; }
.map-marker.status-hold-open .marker-core,
.map-marker.status-hold-closed .marker-core {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.map-marker.locked .marker-drop { background: #676767; }
.map-marker.not .marker-drop { background: #ff2222; box-shadow: 0 0 0 4px rgba(255,35,35,.28), 0 4px 12px rgba(0,0,0,.75); }
.map-marker-cluster .marker-drop {
  background: #686868;
  box-shadow: 0 0 0 4px rgba(150,150,150,.2), 0 4px 12px rgba(0,0,0,.75);
}
.map-marker-cluster .marker-core { font-size: 15px; }

.map-marker.popup-source-active { z-index: 8; }
.map-marker.popup-source-active .marker-drop {
  box-shadow: 0 0 0 3px rgba(235,238,240,.72), 0 0 16px rgba(235,238,240,.22), 0 4px 12px rgba(0,0,0,.65);
  filter: brightness(1.1);
}

/* In der Kartenansicht verwendet die Legende dieselben leeren Tropfen wie die Karte. */
.map-overview-active .legend-center .status-switch {
  width: 24px;
  height: 29px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.map-overview-active .legend-center .switch-circle,
.map-overview-active .legend-center .status-switch.status-hold-open .switch-circle,
.map-overview-active .legend-center .status-switch.status-hold-closed .switch-circle,
.map-overview-active .legend-center .status-switch.status-error .switch-circle {
  top: 1px;
  left: 2px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 2px 5px rgba(0,0,0,.55);
  transform: rotate(-45deg);
}

.map-overview-active .legend-center .status-open .switch-circle,
.map-overview-active .legend-center .status-hold-open .switch-circle { background: #4CAF50; }
.map-overview-active .legend-center .status-closed .switch-circle,
.map-overview-active .legend-center .status-hold-closed .switch-circle { background: #f44336; }
.map-overview-active .legend-center .status-unknown .switch-circle {
  background: #FFC107;
  animation: none;
  transition: background-color 1.5s ease-in-out;
}
.map-overview-active .legend-center .status-error .switch-circle {
  background: #ff5507;
  animation: none;
  transition: background-color 1.5s ease-in-out;
}
body.status-pulse-dark.map-overview-active .legend-center .status-unknown .switch-circle { background-color: #6a6a6a; }
body.status-pulse-dark.map-overview-active .legend-center .status-error .switch-circle { background-color: #6a6a6a; }

.map-overview-active .legend-center .status-hold-open .switch-circle::after,
.map-overview-active .legend-center .status-hold-closed .switch-circle::after {
  width: 6px;
  height: 6px;
  border: 0;
  background: #fff;
}

.map-overview-active .legend-center .status-error .switch-circle::after {
  font-size: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
}

  .loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  .loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #bd0000;

    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  .button-link {
  display: inline-block;
  padding: 2em 2em;
  background-color: #313131ac; /* Blau wie Bootstrap */
  color: rgb(255, 255, 255);
  text-decoration: none;
  margin-bottom: 20px;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.7em;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

.button-link:hover {
  background-color: #232323ac; /* dunkleres Blau */
}
.mains {
  display: flex;          /* ordnet Inhalte nebeneinander oder zentriert */
  justify-content: center; /* horizontal mittig */
  margin: 20px;   
  margin-top: 100px;        /* etwas Abstand */
}

.main-buttons {
  background-color: rgba(255, 0, 0, 0.805);  /* Hintergrundfarbe */
  color: white;           /* Schriftfarbe */
  border: none;           /* keinen Standardrahmen */
  padding: 20px 75px;     /* Innenabstand */
  font-size: 1.2em;       /* Schriftgröße */
  border-radius: 50px;    /* runde Ecken */
  cursor: pointer;        /* Mauszeiger-Hand */
  box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* leichter Schatten */
  transition: 0.2s;       /* Animation für Hover */
}

.main-buttons:hover {
  background-color: darkred; /* beim drüberfahren dunkler */
}

#hold_open_all {
  font-weight: bold; /* nur für diesen Button extra fett */
}

/* Dreigeteilte Leiste: NOT links, Status exakt mittig, Bedienung rechts. */
.status-page .status-legend {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto minmax(300px, 1fr);
  align-items: center;
  gap: 18px;
}

.status-page .legend-left,
.status-page .legend-right,
.status-page .legend-center {
  display: flex;
  align-items: center;
}

.status-page .legend-left { justify-content: flex-start; gap: 16px; }
.status-page .legend-center { justify-content: center; gap: 24px; }
.status-page .legend-right { justify-content: flex-end; gap: 8px; }
.status-page .legend-menu-item { display: none; }

.status-page .app-version {
  color: #a8a8a8;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .25px;
  white-space: nowrap;
}

.status-page .session-status {
  color: #c7c7c7;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .15px;
  white-space: nowrap;
}

.status-page .session-status strong {
  color: #f1f1f1;
  font-weight: 700;
}

.status-page .session-status #sessionStatusCountdown {
  display: inline !important;
  margin-left: 4px;
  color: #9fc8a3;
  font-variant-numeric: tabular-nums;
}

.status-page .legend-left .config_menu,
.status-page .legend-right .config_menu {
  width: 118px;
  min-height: 30px;
  padding: 5px;
}

.status-page #hold_open_all {
  border: 1px solid #ff8a8a;
  background: #c71919;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .42);
}

.status-page #hold_open_all.not-active {
  background: #ff3030;
  animation: notPulse 1.1s ease-in-out infinite alternate;
}

.status-page #hold_open_all.not-pending,
.status-page #hold_open_all:disabled {
  cursor: wait;
  opacity: .78;
}

@keyframes notPulse {
  from { box-shadow: 0 4px 8px rgba(0, 0, 0, .42), 0 0 0 2px rgba(255, 48, 48, .18); }
  to { box-shadow: 0 4px 8px rgba(0, 0, 0, .42), 0 0 0 5px rgba(255, 48, 48, .08); }
}

@media (max-width: 1900px) {
  .status-page .status-legend {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .status-page .legend-left {
    display: grid;
    grid-template-columns: auto minmax(0, auto);
    grid-template-rows: auto auto;
    justify-content: flex-start;
    column-gap: 12px;
    row-gap: 2px;
  }

  .status-page .emergency-menu-item {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }

  .status-page .app-version {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .status-page .session-status {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .status-page .legend-menu-item {
    display: inline-flex;
  }

  .status-page .legend-center {
    display: none;
    position: absolute;
    right: 16px;
    bottom: calc(100% + 8px);
    z-index: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 16px;
    width: min(560px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid #565b60;
    border-radius: 14px;
    background: linear-gradient(180deg, #2b2b2b 0%, #202020 100%);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, .38);
  }

  .status-page .legend-center.expanded {
    display: grid;
    animation: status-legend-open .2s cubic-bezier(.2, .72, .25, 1) both;
  }

  .status-page .legend-center .legend-item {
    justify-content: flex-start;
  }

  .status-page #legendToggle[aria-expanded="true"] {
    border-color: #5d8b61;
    background: #29472c;
  }
}

@keyframes status-legend-open {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
  .status-page .status-legend { display: flex; }
  .status-page .legend-center { display: none; }
  .status-page .app-version { display: none; }
  .status-page .session-status { display: none; }
  .status-page .legend-left { flex: 1 1 0; }
  .status-page .legend-right { flex: 2 1 0; gap: 8px; }
  .status-page .legend-left .mobile-menu-item,
  .status-page .legend-right .mobile-menu-item { flex: 1 1 0; min-width: 0; }
  .status-page .legend-left .config_menu,
  .status-page .legend-right .config_menu { width: 100%; }
}





.info-box {
  background: var(--box-bg, #727272);
  color: var(--text, #fff);
  padding: 20px;
  border-radius: 30px;
  
  /* NEU: Zentrieren */
  max-width: 1400px;
  width: 98%;
  margin: 60px auto 20px auto; /* oben, rechts, unten, links */
}
.control-box {
  background: var(--box-bg, #727272);
  color: var(--text, #fff);
  padding: 20px;
  border-radius: 30px;
  
  /* NEU: Zentrieren */
  max-width: 1400px;
  width: 98%;
  margin: 60px auto 60px auto; /* oben, rechts, unten, links */
}
.control-box button {
  padding: 20px 50px;
  font-size: 20px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  transition: transform 0.3s;
}

.control-box button:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.control-box button:active {
  transform: scale(0.99);
  filter: brightness(0.95);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.3);
}




.button-row {
  display: flex;
  justify-content: center;
  gap: 20px; /* HIER: Abstand zwischen Buttons */
  margin-bottom: 20px;
}

@media screen and (min-width: 769px) {
  .popup .button-row.hold-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .popup .button-row.hold-row .control-hold {
    width: 100%;
    min-width: 0;
    padding-right: 20px;
    padding-left: 20px;
    white-space: nowrap;
  }
}

.control1 {
  background-color: #8d8d8d;
  width: 50%;
  padding: 20px 20px;
  margin-top: 10px;
}
.control2 {
  background-color: #5e5e5e;
    width: 50%;
  padding: 20px 20px;
  margin-top: 10px;
}
.control3 {
  background-color: #bd0000;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}
.control4 {
  background-color: #ff35356f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}

.status-button {
  background-color: #dbadad6f;
  width: 100%;
  max-width: 1500px;
  pointer-events: none;   /* macht ihn NICHT klickbar */
  cursor: default;        /* Standard-Pfeil, kein Hand-Symbol */
}

.status-button.status-unknown{
    background-color: #b8b8b86f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}
.status-button.status-open{
    background-color: #59ff186f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}

.status-button.status-hold-open{
    background-color: #59ff186f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}
.status-button.status-hold-closed{
    background-color: #ff18186f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}

.status-button.status-closed{
    background-color: #ff18186f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}
.status-button.status-error{
    background-color: #ff9b186f;
  width: 100%; /* nimmt gesamte Zeile */
  max-width: 1500px;
}


#themeSwitch {
  transform: scale(0.6); /* optional: Schalter etwas größer */
  margin-right: 0px;
    position: relative;
  top: 2.5px; /* oder z. B. 3px, je nach gewünschter Höhe */
}
label[for="themeSwitch"] {
  font-size: 10px;
  color: #ccc; /* oder z. B. #000 für helles Theme */
  vertical-align: middle;
  
}

.config-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.config-list li {
margin-bottom: 30px;
}



.back-button{

font-size: 22px;
font-weight: bold;
background-color: #9d3434;
width: 50%;
padding: 20px 20px;
margin-top: 50px;
border-radius: 30px;
display: inline-block;
text-decoration: none;
color: white;
}

.config-button{

font-size: 1rem;
background-color: #5f5f5f;
width: auto;
padding: 10px 20px;
 margin-top: 15px;
border-radius: 30px;
border: none;
color: white;
width: fit-content;
}

.save-button {
  background-color: #5f5f5f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  border-radius: 30px;
  transition: background-color 0.3s;
}

.save-button:hover {
  background-color: #1976D2;
}

.theme-toggle {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 200;
    font-size: 4px;
  color: #ccc;
  opacity: 0.8;
}

.site-header {
  background-color: #00000022;
  padding: 15px 0;
  border-bottom: 1px solid #cccccc30;
  width: 100%;
  height: auto;
}

.logo {
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.site-header .logo-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 30px);
  width: min(900px, 92vw);
  margin: 0 auto;
  text-decoration: none;
}

.site-header .logo-group .logo-primary {
  flex: 0 1 420px;
  width: auto;
  max-width: min(42vw, 420px);
  max-height: 108px;
  margin: 0;
  object-fit: contain;
}

.logo-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 64px;
  background: rgba(255,255,255,.2);
}

.customer-logo-shell {
  display: flex;
  flex: 0 1 420px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 72px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: #f3f3f1;
  box-shadow: 0 3px 9px rgba(0,0,0,.2);
}

.customer-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
}

.logo-group.customer-logo-missing {
  width: min(500px, 92vw);
}

.logo-group.customer-logo-missing .logo-divider,
.logo-group.customer-logo-missing .customer-logo-shell {
  display: none;
}

.logo-group.customer-logo-missing .logo-primary {
  max-width: min(100%, 500px);
  margin: 0 auto;
}

body {
  font-family: Arial, sans-serif;
  background-color: #272727;
;
  margin: 0;
  padding: 0px;
  text-align: center;
}

/* Scrollraum fuer die feste Bedienleiste, damit das Ortsbild komplett sichtbar bleibt. */
body.status-page {
  padding-bottom: 90px;
}

h1 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 30px;
}

.tor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* dynamisch, aber schön gleichmäßig */
  gap: 30px;                /* gleichmäßiger Abstand zwischen Buttons */
  max-width: 900px;         /* Gesamtbreite begrenzen */
  margin: 40px auto;        /* zentriert mit oben/unten etwas Luft */
  justify-items: center;    /* Button-Inhalt zentrieren */
}
.tor-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font-size: 20px;              /* feste Größe */
  font-weight: bold;
  background-color: #4c8043;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.tor-button .tor-labels {
  flex: 1;                      /* füllt den Bereich links */
  margin-right: 10px;           /* Abstand zum Slider */
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tor-button .tor-name,
.tor-button .tor-type {
  overflow: hidden;             /* Text darf nicht rausragen */
  white-space: nowrap;          /* keine zweite Zeile */
  text-overflow: ellipsis;      /* "..." falls zu lang */
}

.tor-button .tor-name {
  font-weight: 700;
}

.tor-button .tor-type {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.1;
}

.tor-button .status-switch {
  flex-shrink: 0;               /* behält seine Größe */
}


.anlagen-button {
  background-color: #3a3a3a;   /* dunkler als Control-Buttons */
  color: #ffffff;
  font-size: 16px;             /* kleiner als Steuer-Buttons */
  font-weight: bold;
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  margin: 10px 0 25px 0;       /* mehr Abstand nach unten */
  cursor: pointer;
  transition: background 0.3s;
  width: auto;                 /* nicht volle Breite */
  display: inline-block;
}

.anlagen-button:hover {
  background-color: #5a5a5a;
}


.tor-button:hover {
  transform: scale(1.05);
  background-color: #3d6c37;
}

.tor-button.popup-source-active {
  outline: 2px solid rgba(235,238,240,.72);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(235,238,240,.16);
  filter: brightness(1.1);
}

.tor-button:not(.locked):not(.not):not(.out-of-service):active {
  transform: scale(0.985);
  background-color: #345d2f;
  transition-duration: 0.06s;
}
/* ============= */
/* SLIDER-STIL   */
/* ============= */
.status-switch {
  position: relative;
  width: 50px;
  height: 20px;
  background-color: #444;
  border-radius: 20px;
  margin: 5px 0;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
  cursor: help;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.status-hint {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 30;
  width: max-content;
  max-width: min(220px, 72vw);
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 7px;
  background: rgba(24, 26, 29, 0.96);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.42);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.status-hint::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 18px;
  border: 6px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.68);
}

.status-switch.status-hint-visible .status-hint,
.status-switch:focus-visible .status-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .status-switch:hover .status-hint {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.switch-circle {
  position: absolute;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #9E9E9E;
  transition: left 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Zustände */
.status-open .switch-circle {
  left: 2px;
  background-color: #4CAF50;
  box-shadow: 0 0 10px #4CAF50;
}

.status-closed .switch-circle {
  left: 32px;
  background-color: #f44336;
  box-shadow: 0 0 10px #f44336;
}

.status-unknown .switch-circle {
  left: 17px;
  background-color: #FFC107;
  animation: blink-led 2s infinite;
}

/* Offen-Halten: linker grüner Kreis mit weißem Punkt */
.status-switch.status-hold-open .switch-circle {
  left: 2px;
  background-color: #4CAF50;
  box-shadow: 0 0 10px #4CAF50;
  position: relative;
}
.status-switch.status-hold-open .switch-circle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 30%; height: 30%;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Zu-Halten: rechter roter Kreis mit weißem Punkt */
.status-switch.status-hold-closed .switch-circle {
  left: 32px;
  background-color: #f44336;
  box-shadow: 0 0 10px #f44336;
  position: relative;
}
.status-switch.status-hold-closed .switch-circle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 30%; height: 30%;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}


.status-switch.status-error .switch-circle {
  left: 17px;
  background-color: #ff5507;
  
  animation: blink-led 2s infinite;
}

.status-switch.status-error .switch-circle::after {
  content: "!";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(255, 255, 255);            /* Textfarbe */
  font-size: 18px;         /* Größe anpassen */
  font-weight: bold;       /* schön fett */
}

/* Blinken */
@keyframes blink-led {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px #FFC107;
  }
  50% {
    opacity: 0.3;
    box-shadow: 0 0 2px #333;
  }
}

/* ============= */
/* Popups, UI    */
/* ============= */

.popup {
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.9);
  /* Öffnen und Schließen werden vollständig über die Popup-Keyframes gesteuert.
     Eine parallele Transition würde nach dem Öffnen kurz in einen alten
     Zwischenstand zurückspringen und dadurch sichtbar ruckeln. */
  transition: none;
  position: fixed;
  top: 50%;
  left: 50%;
  border: 1px solid #555;
  background: linear-gradient(180deg, #303030 0%, #292929 100%);
  padding: 30px 60px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  z-index: 310;
  max-width: 500px;
  text-align: center;
  transform-origin: center;
  will-change: transform, opacity;
}

.popup.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.popup.popup-opening {
  animation: popup-fade-in .26s ease-out both;
}

.popup.popup-closing {
  visibility: visible;
  pointer-events: none;
  animation: popup-fade-out .22s ease-in both;
}

.popup.popup-opening.popup-overview-motion {
  animation: popup-from-trigger .58s cubic-bezier(.2,.78,.24,1) both;
}

.popup.popup-closing.popup-overview-motion {
  animation: popup-to-trigger .46s cubic-bezier(.46,0,.82,.34) both;
}

@keyframes popup-fade-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes popup-fade-out {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes popup-from-trigger {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--popup-offset-x, 0px)), calc(-50% + var(--popup-offset-y, 0px))) scale(.14);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.025);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes popup-to-trigger {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--popup-offset-x, 0px)), calc(-50% + var(--popup-offset-y, 0px))) scale(.14);
  }
}

.popup h2 {
  margin-top: 0;
  color: #ffffff;
  font-size: 30px;
}

.cluster-popup {
  width: min(1120px, calc(100vw - 40px));
  max-width: 1120px;
  max-height: 88vh;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
}

.cluster-popup.popup-opening {
  animation: popup-fade-in .52s cubic-bezier(.2,.72,.25,1) both;
}

.cluster-popup.popup-closing {
  animation: popup-fade-out .4s ease-in both;
}

.cluster-popup > h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: .01em;
}

.cluster-popup-subtitle {
  margin: 6px 0 0;
  color: #aeb2b6;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .035em;
}

.cluster-popup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding-top: 30px;
}

.cluster-control-panel {
  position: relative;
  padding: 18px;
  border: 1px solid #666;
  border-radius: 12px;
  background: #292929;
}

.cluster-control-panel .cluster-panel-marker {
  top: 0;
  left: 50%;
  width: 38px;
  height: 38px;
  cursor: help;
  pointer-events: auto;
  transform: translate(-50%, -100%);
}

.cluster-control-panel .cluster-panel-marker:hover { transform: translate(-50%, -100%); }
.cluster-control-panel .cluster-panel-marker .marker-drop {
  width: 32px;
  height: 32px;
  border-width: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,.7);
}
.cluster-control-panel .cluster-panel-marker.status-hold-open .marker-core,
.cluster-control-panel .cluster-panel-marker.status-hold-closed .marker-core {
  width: 6px;
  height: 6px;
  border: 0;
  background: #fff;
}

.popup-status-marker {
  position: relative;
  top: auto;
  left: auto;
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  cursor: help;
  transform: none;
}

.popup-status-marker:hover { transform: none; }
.popup-status-marker[hidden] { display: none; }
.popup-status-marker .marker-drop {
  width: 32px;
  height: 32px;
  border-width: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,.7);
  cursor: help;
}
.cluster-panel-marker .marker-drop { cursor: help; }
.popup-status-marker.status-hold-open .marker-core,
.popup-status-marker.status-hold-closed .marker-core {
  width: 6px;
  height: 6px;
  border: 0;
  background: #fff;
}

.cluster-panel-marker .marker-status-hint,
.popup-status-marker .marker-status-hint {
  top: 50%;
  left: calc(100% + 8px);
  transform: translate(4px, -50%);
}
.cluster-panel-marker.marker-status-hint-visible .marker-status-hint,
.popup-status-marker.marker-status-hint-visible .marker-status-hint {
  transform: translate(0, -50%);
}
@media (hover: hover) and (pointer: fine) {
  .cluster-panel-marker .marker-drop:hover ~ .marker-status-hint,
  .popup-status-marker .marker-drop:hover ~ .marker-status-hint {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
  }
}

.cluster-control-panel h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.cluster-control-type {
  min-height: 18px;
  margin: 4px 0 0;
  color: #c7c7c7;
  font-size: 13px;
  font-weight: 300;
}

.cluster-control-panel .anlagen-button { margin: 10px 0 14px; }
.cluster-control-panel .button-row { gap: 10px; margin-bottom: 10px; }
.cluster-control-panel .control-button,
.cluster-control-panel .control-button2,
.cluster-control-panel .control-button3 {
  min-width: 0;
  padding: 13px 16px;
  font-size: 15px;
}

.cluster-popup .cluster-close-button {
  display: block;
  width: auto;
  min-width: 140px;
  margin: 18px auto 0;
  padding: 11px 26px;
  font-size: 16px;
}

.cluster-popup .cluster-close-button:hover { transform: scale(1.04); }

.diagnostic-popup {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: min(94vh, 1040px);
  padding: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  border-color: #536056;
  background: linear-gradient(160deg, #282b29 0%, #202321 48%, #1d1f1e 100%);
  box-shadow: 0 24px 70px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.045);
  text-align: left;
}

.diagnostic-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.diagnostic-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #8eb993;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.diagnostic-popup .diagnostic-heading h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.08;
}

.diagnostic-popup .diagnostic-type {
  margin: 5px 0 0;
  color: #aeb4af;
  font-size: 14px;
  font-weight: 400;
}

.diagnostic-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 145px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #5b625d;
  border-radius: 999px;
  background: rgba(40,43,41,.88);
  font-size: 13px;
  white-space: nowrap;
}

#diagnosticStatus.reachable { border-color: #5d9663; background: rgba(48,92,53,.56); color: #b8edbe; }
#diagnosticStatus.unreachable { border-color: #a84c4c; background: rgba(115,38,38,.55); color: #ffb2b2; }

.diagnostic-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.diagnostic-stat {
  min-width: 0;
  padding: 12px 9px;
  border: 1px solid #464c48;
  border-radius: 11px;
  background: rgba(44,48,45,.72);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.diagnostic-stat strong,
.diagnostic-stat span { display: block; }
.diagnostic-stat strong { margin-bottom: 3px; color: #fff; font-size: 21px; line-height: 1.05; }
.diagnostic-stat span { color: #a8adaa; font-size: 10px; font-weight: 700; }
.diagnostic-stat-error strong { color: #ff8686; }

.diagnostic-chart-card {
  margin-top: 10px;
  padding: 12px 13px 10px;
  border: 1px solid #424945;
  border-radius: 12px;
  background: rgba(25,28,26,.73);
}

.diagnostic-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}
.diagnostic-card-head strong { color: #f3f5f3; font-size: 13px; }
.diagnostic-card-head span { color: #8f9691; font-size: 10px; font-weight: 700; text-align: right; }

.diagnostic-hourly-chart { width: 100%; height: 138px; }
.diagnostic-hourly-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.diagnostic-grid-line { stroke: #38403a; stroke-width: 1; }
.diagnostic-activity-bar { fill: rgba(92,153,89,.42); }
.diagnostic-activity-area { fill: rgba(92,153,89,.13); }
.diagnostic-activity-line { fill: none; stroke: #80c77c; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.diagnostic-error-bar { fill: rgba(226,73,73,.78); }
.diagnostic-axis { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: -2px; color: #747c76; font-size: 9px; line-height: 1; }
.diagnostic-axis span:nth-child(2), .diagnostic-axis span:nth-child(3), .diagnostic-axis span:nth-child(4) { text-align: center; }
.diagnostic-axis span:last-child { text-align: right; }
.diagnostic-chart-legend { display: flex; justify-content: center; gap: 18px; margin-top: 8px; color: #9ca19d; font-size: 10px; font-weight: 700; }
.diagnostic-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.diagnostic-chart-legend i { width: 13px; height: 4px; border-radius: 3px; }
.diagnostic-chart-legend i.activity { background: #76ba72; }
.diagnostic-chart-legend i.errors { background: #e04c4c; }

.diagnostic-week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 108px;
}
.diagnostic-week-day { display: grid; grid-template-rows: 20px 76px 16px; min-width: 0; color: #9ba09c; font-size: 10px; font-weight: 700; text-align: center; }
.diagnostic-week-day > strong { color: #eaf4ea; font-size: 11px; }
.diagnostic-week-column { position: relative; overflow: visible; width: 68%; height: 74px; margin: 0 auto; border: 1px solid #3e4941; border-radius: 7px 7px 3px 3px; background: rgba(57,74,59,.21); }
.diagnostic-week-fill { position: absolute; right: 0; bottom: 0; left: 0; min-height: 2px; max-height: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #77bd72, #3f7642); }
.diagnostic-week-error { position: absolute; top: -5px; right: -8px; z-index: 2; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border: 1px solid #ff7676; border-radius: 999px; background: #842e2e; color: #fff; font-size: 9px; box-shadow: 0 2px 8px rgba(190,30,30,.35); }

.diagnostic-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.diagnostic-events > div { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid #414743; border-radius: 10px; background: rgba(43,46,44,.55); }
.diagnostic-events span { color: #959b96; font-size: 10px; font-weight: 700; }
.diagnostic-events strong { color: #f0f1f0; font-size: 12px; overflow-wrap: anywhere; }
.diagnostic-events > div:first-child strong { color: #ff9a9a; }

.diagnostic-actions { display: grid; grid-template-columns: 1.15fr 1.35fr .8fr; gap: 10px; margin-top: 14px; }

.diagnostic-popup .diagnostic-service-button,
.diagnostic-popup .diagnostic-reset-button,
.diagnostic-popup .diagnostic-close-button {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.diagnostic-popup .diagnostic-service-button.restore { background: #2f6d38; }
.popup.diagnostic-popup .diagnostic-reset-button { background: #713434; }
.popup.diagnostic-popup .diagnostic-reset-button:hover { background: #864040; }
.diagnostic-popup .diagnostic-service-button:disabled,
.diagnostic-popup .diagnostic-reset-button:disabled { opacity: .55; cursor: wait; }

.tor-button.out-of-service {
  background: #555;
  opacity: .72;
}

.tor-button.out-of-service .status-switch { opacity: .45; }
.map-marker.out-of-service .marker-drop { background: #686868 !important; animation: none !important; }
.map-marker.out-of-service .marker-core::after { content: "×"; color: #fff; font-size: 17px; }

@media (hover: none) and (pointer: coarse) {
  .tor-button:not(.locked):not(.not):not(.out-of-service):hover {
    transform: none;
    background-color: #4c8043;
  }

  .tor-button:not(.locked):not(.not):not(.out-of-service):active {
    transform: scale(0.985);
    background-color: #3d6c37;
  }

  .diagnostic-long-press-target { -webkit-touch-callout: none; user-select: none; }
  .tor-button.diagnostic-long-press-target.long-press-pending {
    box-shadow: 0 0 0 3px rgba(83,156,232,.72), 0 6px 18px rgba(0,0,0,.35);
    filter: brightness(1.08);
  }
  .map-marker.diagnostic-long-press-target.long-press-pending .marker-drop {
    box-shadow: 0 0 0 4px rgba(83,156,232,.72), 0 4px 12px rgba(0,0,0,.7);
    filter: brightness(1.08);
  }
}

.overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.232);
  z-index: 300;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay.closing {
  opacity: 0;
  visibility: visible;
}

/* Steuer-Buttons */
.control-button,
.control-button2,
.control-button3 {
  width: 100%;
  padding: 20px 70px;
  margin-top: 10px;
  font-size: 20px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  transition: transform 0.4s;
}

.control-button {
  background-color: #8d8d8d;
}

.control-button:hover {
  transform: scale(1.08);
}

.control-button2 {
  background-color: #5e5e5e;
}

.control-button2:hover {
  transform: scale(1.08);
}

.control-button3 {
  background-color: #bd0000;
}

.control-button3:hover {
  transform: scale(1.08);
}

/* Einheitlicher Stil für Schaltflächen in Pop-ups */
.popup .control-button,
.popup .control-button2,
.popup .control-button3 {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.popup .control-button { background: #3e7e3e; }
.popup .control-button2 { background: #3b6ea8; }
.popup .control-button3 { background: #b73535; }

#popup > .control-button:last-child,
.popup .cluster-close-button,
.popup .diagnostic-close-button {
  background: #4b4b4b;
}

.popup .control-button:hover,
.popup .control-button2:hover,
.popup .control-button3:hover {
  border-color: rgba(255, 255, 255, 0.23);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.24);
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.popup .control-button:active,
.popup .control-button2:active,
.popup .control-button3:active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  filter: brightness(0.96);
  transform: translateY(0);
}

/* Anlagenbedienung: neutrale Taster mit heller Kontur und leichtem Innenlicht */
#popup .control-button,
#popup .control-button2,
#popup .control-button3,
.cluster-popup .control-button,
.cluster-popup .control-button2,
.cluster-popup .control-button3 {
  border: 1px solid #858a8f;
  border-radius: 16px;
  background: #62666b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 9px rgba(255,255,255,.055), 0 3px 7px rgba(0,0,0,.22);
}

#popup .control-hold,
.cluster-popup .control-hold {
  background: #45494e;
  border-color: #686d72;
}

#popup .control-button3,
.cluster-popup .control-button3 {
  background: #a92f35;
  border-color: #c44d54;
}

#popup > .control-button:last-child,
.cluster-popup .cluster-close-button {
  background: #4d5156;
  border-color: #70757a;
}

#popup .control-button:hover,
#popup .control-button2:hover,
#popup .control-button3:hover,
.cluster-popup .control-button:hover,
.cluster-popup .control-button2:hover,
.cluster-popup .control-button3:hover {
  border-color: #a3a8ad;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 11px rgba(255,255,255,.08), 0 5px 10px rgba(0,0,0,.25);
}

#popup .control-hold:hover,
.cluster-popup .control-hold:hover {
  border-color: #81868b;
}

#popup .control-button3:hover,
.cluster-popup .control-button3:hover {
  border-color: #dc676d;
}

#popup > .control-button:last-child:hover,
.cluster-popup .cluster-close-button:hover {
  border-color: #898e93;
}

/* Status-Legende unten */
.status-legend {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1a1a1a;
  color: #ffffff;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 10px 20px;
  font-size: 16px;
  border-top: 1px solid #444;
  z-index: 100;
}

.status-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Formulare */
input[type="text"],
input[type="number"],
select {
  background-color: #969696;
  color: white;
  border: 1px solid #666;
  border-radius: 30px;
  padding: 20px;
  font-size: 20px;
  font-weight: bold;
  width: 100%;
  max-width: 500px;
  text-align: center;
  appearance: none;
}

select option {
  text-align: center;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #cbcbcb;
  box-shadow: 0 0 6px #ffd900;
}

label {
  color: #ffffff;
  font-weight: bold;
  font-size: 28px;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}
/* Header-Bereich mit Logo und Streifen */
/* Header mit Logo */

/* Standard-Stil */

 .weekdays, .timer, .action, .save {
      display: flex;
      justify-content: center;
      gap: 10px;
      max-width: 600px;
      margin: 10px auto;
      padding: 20px;
      background: #727272;
      border-radius: 30px;  
      /* NEU: Zentrieren */
      max-width: 1200px;
      width: 98%;

    }

    .weekdays input[type="checkbox"] {
  appearance: none;          /* Standard-Look ausblenden */
  -webkit-appearance: none;  /* Safari Fix */
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 6px;        /* oder 50% für rund */
  background: #444;
  cursor: pointer;
  position: relative;
  margin-right: 6px;
  transition: background 0.3s, transform 0.2s;
}
.weekdays input[type="checkbox"]:checked {
  background: #1bc120;       /* Grün wenn aktiv */
  border-color: #1bc120;
}
.weekdays input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.timer-box,
.timer-box h2,
.timer-box label {
  color: #ffffff;
}
.timer-box {
  /* Layout */
  display: flex;
  flex-direction: column;     /* Inhalte untereinander */
  justify-content: center;    /* vertikal zentrieren */
  align-items: stretch;        /* horizontal zentrieren */
  gap: 10px;                  /* Abstand zwischen den inneren Elementen */

  /* Abstände zum Rahmen */
  padding: 30px 0;            /* oben + unten 30px, links + rechts 0 */
  margin: 20px auto;          /* außen: 20px oben/unten, automatisch zentriert */

  /* Größe */
  max-width: 1400px;
  width: 98%;

  /* Optik */
  background: #5a5a5a;
  border-radius: 30px;  
}





    
    .weekdays label { display: flex; align-items: center; gap: 5px; }

    .timer input[type="time"] {
      font-size: 1.5em;
      padding: 5px 20px;
      border: none;
      border-radius: 10px;
      background: #4f4f4f;
      color: white;
      cursor: pointer;
    }

    .action button, .save button {
      font-size: 1.2em;
      padding: 5px 20px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      background: #4f4f4f;
      color: white;
      transition: background 0.3s;
    }
    .action button.active { background: #1bc120; }
    .action button:hover, .save button:hover { background: #45a049; }

#entries {
  display: block;         /* sicherstellen, dass es ein Block ist */
  width: 500px;         /* feste Breite, frei wählbar */
  max-width: none;        /* damit kein Limit mehr greift */
  margin: 20px auto;      /* zentriert */
  padding: 15px;
  background: #6b6b6b;
  border-radius: 30px;
}


/* Ein einzelner Eintrag */
.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  margin: 6px 0;
  background: #a5a5a5;
  color: white;
  border-radius: 20px;

  width: auto;          /* war: 100% */
  max-width: 100%;      /* passt sich an den Parent an */
  box-sizing: border-box;
}


/* Einträge farblich unterscheiden */
.entry-row.auf {
  background: #319f35;   /* sattes Grün */
  color: white;
}

.entry-row.zu {
  background: #9f3831;   /* Rot */
  color: white;
}

/* Tag-Überschrift */
#entries h3 {
  margin: 15px 0 8px;
  padding: 5px 12px;
  background: #4f4f4f;
  color: white;
  border-radius: 8px;
  text-align: center;
}


    .delete-btn {
      background: red;
      color: white;
      border: none;
      border-radius: 5px;
      padding: 5px 10px;
      cursor: pointer;
    }
    .delete-btn:hover { background: darkred; }


/* Overlay dunkelt den Hintergrund ab */
#pwOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6); /* halbtransparent schwarz */
  z-index: 999;                /* über Inhalt */
  display: none;
}

/* Passwort-Popup */
#pwPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #555;
  background: linear-gradient(180deg, #303030 0%, #292929 100%);
  color: white;
  padding: 28px;
  overflow: hidden;
  border-radius: 18px;
  z-index: 1000;               
  display: none;
  width: 90%;                 /* bis zu 90% Breite des Screens */
  max-width: 460px;           /* aber nicht breiter als 460px */
  box-shadow: 0 18px 55px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.035);
  transition: top .22s ease;
}

#pwPopup::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #315a35, #5d9963 50%, #315a35);
}


#pwPopup h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  text-align: left;
}

.login-panel-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 24px; }
.login-security-mark { position: relative; display: block; width: 48px; height: 48px; border: 1px solid #5d8b61; border-radius: 14px; background: linear-gradient(180deg, #315a35, #27472b); box-shadow: 0 8px 20px rgba(29,72,34,.3), inset 0 1px 0 rgba(255,255,255,.08); }
.login-security-mark::before { content: ""; position: absolute; inset: 12px; background: center/24px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1fff2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3M12 14v2'/%3E%3C/svg%3E"); }
.login-subtitle { margin: 5px 0 0; color: #aeb5ae; font-size: 13px; line-height: 1.3; text-align: left; }
.login-fields { display: grid; gap: 15px; }
.login-field { display: grid; gap: 7px; color: #d8d8d8; font-size: 13px; font-weight: 700; text-align: left; }
.login-input-shell { position: relative; display: block; }
.login-input-shell::before { content: ""; position: absolute; z-index: 1; top: 50%; left: 14px; width: 19px; height: 19px; background-position: center; background-repeat: no-repeat; background-size: 19px 19px; transform: translateY(-50%); pointer-events: none; opacity: .78; }
.login-user-input::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6dbd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.login-password-input::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6dbd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }

#pwPopup input {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 52px;
  margin: 0;
  padding: 10px 46px 10px 44px;
  border: 1px solid #51565a;
  border-radius: 11px;
  background: #202326;
  color: #f5f5f5;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  appearance: none;
}

#pwPopup input::placeholder {
  color: #858b8f;
  font-weight: 500;
  opacity: 1;
}

#pwPopup input:focus {
  outline: none;
  border-color: #6fa875;
  background: #25292c;
  box-shadow: 0 0 0 3px rgba(93,139,97,.16), inset 0 1px 3px rgba(0,0,0,.28);
}

#pwPopup input:-webkit-autofill,
#pwPopup input:-webkit-autofill:hover,
#pwPopup input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f5;
  caret-color: #f5f5f5;
  box-shadow: inset 0 0 0 1000px #202326;
}

.login-password-toggle { position: absolute; z-index: 2; top: 50%; right: 8px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: transparent; font-size: 0; cursor: pointer; transform: translateY(-50%); }
.login-password-toggle::before { content: ""; position: absolute; inset: 8px; background: center/20px 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bfc5bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); opacity: .8; }
.login-password-toggle.visible::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bfc5bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18M10.6 10.7A2.5 2.5 0 0 0 14 14.2M9.8 5.2A11.8 11.8 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.1 3M6.6 6.6C3.6 8.4 2 12 2 12s3.5 7 10 7a10 10 0 0 0 4.1-.9'/%3E%3C/svg%3E"); }
.login-password-toggle:hover { background: rgba(255,255,255,.07); }

#pwOverlay.active, #pwPopup.active {
  display: block;
}

.login-version {
  display: none;
}

body.auth-locked .login-version {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1002;
  display: block;
  color: #929292;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .2px;
  transform: translateX(-50%);
}

body.auth-locked {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #181a1d;
}

body.auth-locked .overview-mode-switch,
body.auth-locked #statusView,
body.auth-locked #mapView,
body.auth-locked .status-legend {
  visibility: hidden;
  pointer-events: none;
}

body.auth-locked .site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: 100%;
  padding: 14px 0;
  background: transparent;
}

body.auth-locked .site-header a {
  pointer-events: none;
}

body.auth-locked .header-bar {
  display: none;
}

body.auth-locked #pwOverlay {
  display: block;
  opacity: 1;
  visibility: visible;
  background: #181a1d;
}

body.auth-locked #pwPopup {
  top: var(--login-popup-top, 56%);
  z-index: 1002;
  border: 1px solid rgba(124,166,128,.38);
  background: linear-gradient(180deg, rgba(38,40,39,.985), rgba(27,29,28,.985));
  box-shadow: 0 22px 70px rgba(0,0,0,.54), 0 0 0 1px rgba(255,255,255,.025), inset 0 1px 0 rgba(255,255,255,.04);
}

body.auth-locked #pwPopup.login-keyboard-adjusted {
  max-height: calc(var(--login-visible-height, 100dvh) - 24px);
  overflow-y: auto;
}

body.auth-locked:not(.auth-intro) .site-header a {
  opacity: 0;
}

body.auth-locked.auth-intro .site-header a {
  transform-origin: center center;
  will-change: transform, opacity;
  animation: login-logo-flight 2.45s cubic-bezier(.22,.72,.2,1) both;
}

body.auth-locked.auth-intro #pwPopup.active {
  animation: login-panel-arrive .82s cubic-bezier(.22,.72,.2,1) 1.78s both;
}

@keyframes login-logo-flight {
  0% {
    opacity: 0;
    transform: translateY(calc(50dvh - 50% - 14px)) scale(1.08);
  }
  18% {
    opacity: 1;
    transform: translateY(calc(50dvh - 50% - 14px)) scale(1.12);
  }
  42% {
    opacity: 1;
    transform: translateY(calc(50dvh - 50% - 14px)) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes login-panel-arrive {
  0% {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -46%) scale(.975);
  }
  100% {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }
}

body.overview-reveal .overview-mode-switch {
  animation: overview-piece-reveal .7s ease-out .08s both;
}

body.overview-reveal .location-section-label {
  animation: overview-piece-reveal .55s ease-out .32s both;
}

body.overview-reveal .tab-header {
  animation: overview-piece-reveal .72s ease-out .46s both;
}

body.overview-reveal .assets-section-label {
  animation: overview-piece-reveal .55s ease-out .72s both;
}

body.overview-reveal .tor-grid .tor-button {
  animation: overview-piece-reveal .72s cubic-bezier(.2,.75,.25,1) .88s both;
}

body.overview-reveal .tor-grid .tor-button:nth-child(2) { animation-delay: 1.02s; }
body.overview-reveal .tor-grid .tor-button:nth-child(3) { animation-delay: 1.16s; }
body.overview-reveal .tor-grid .tor-button:nth-child(n+4) { animation-delay: 1.3s; }

body.overview-reveal .ort-label {
  animation: overview-piece-reveal .65s ease-out 1.38s both;
}

body.overview-reveal .location-image-shell {
  animation: overview-image-reveal .95s cubic-bezier(.2,.75,.25,1) 1.55s both;
}

body.overview-reveal .status-legend {
  animation: overview-footer-reveal .72s ease-out 1.82s both;
}

@keyframes overview-piece-reveal {
  0% {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(18px) scale(.985);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translateY(0) scale(1);
  }
}

@keyframes overview-image-reveal {
  0% {
    opacity: 0;
    filter: brightness(.65) blur(8px);
    transform: translateY(22px) scale(.97);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translateY(0) scale(1);
  }
}

@keyframes overview-footer-reveal {
  0% { opacity: 0; transform: translateY(100%); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-locked.auth-intro .site-header a,
  body.auth-locked.auth-intro #pwPopup.active,
  body.overview-reveal .overview-mode-switch,
  body.overview-reveal .location-section-label,
  body.overview-reveal .tab-header,
  body.overview-reveal .assets-section-label,
  body.overview-reveal .tor-grid .tor-button,
  body.overview-reveal .ort-label,
  body.overview-reveal .location-image-shell,
  .location-viewer:not([hidden]),
  .location-viewer:not([hidden]) .location-viewer-stage img,
  .location-viewer:not([hidden]) .location-viewer-toolbar,
  body.overview-reveal .status-legend {
    animation-delay: 0s;
    animation-duration: .01ms;
  }

  .popup.popup-opening,
  .popup.popup-closing {
    animation: none;
  }
}

body.auth-locked #pwPopup .button-row {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}

body.auth-locked #pwPopup #pwOkButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border-color: #659a6a;
  border-radius: 11px;
  background: linear-gradient(180deg, #438a49, #326f38);
  box-shadow: 0 8px 20px rgba(32,91,39,.26), inset 0 1px 0 rgba(255,255,255,.08);
  line-height: 1;
  text-align: center;
}

.tor-button.locked,
.tor-button.not {
  position: relative;
  pointer-events: auto;
  border: 1px solid rgba(255, 94, 94, .92);
  background: linear-gradient(90deg,
    #4c8043 0%,
    #486f42 32%,
    #674134 56%,
    #98272b 74%,
    #d11d24 100%);
  box-shadow: inset -18px 0 30px rgba(255, 35, 45, .32), 0 5px 14px rgba(0, 0, 0, .28), 0 0 10px rgba(213, 31, 39, .14);
}

.tor-button.locked::after,
.tor-button.not::after {
  order: 1;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 26px;
  margin-right: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 160, 160, .76);
  border-radius: 999px;
  background: rgba(111, 8, 15, .76);
  color: #fff;
  font-size: .72em;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .24);
}

.tor-button.locked::after { content: "Stopp Aktiv"; }
.tor-button.not::after { content: "Not Auf"; }

.tor-button.locked .status-switch,
.tor-button.not .status-switch {
  order: 2;
}

.configs {
  display: flex;          /* ordnet Inhalte nebeneinander oder zentriert */
  justify-content: center; /* horizontal mittig */
      /* etwas Abstand */
}

.config_menu {
  background-color: #5e5e5ecd;  /* Hintergrundfarbe */
  color: white;           /* Schriftfarbe */
  border: none;           /* keinen Standardrahmen */
  padding: 5px 5px;     /* Innenabstand */
  font-size: 0.8em;       /* Schriftgröße */
  border-radius: 50px;    /* runde Ecken */
  cursor: pointer;        /* Mauszeiger-Hand */
  box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* leichter Schatten */
  transition: 0.2s;       /* Animation für Hover */
}

.config_menu:hover {
  background-color: #303030cd; /* beim drüberfahren dunkler */
}

#config_menu1 {
  font-weight: bold; /* nur für diesen Button extra fett */
}



/*config */



.intern_config_form {
  display: flex;
  flex-direction: column;
  align-items: center;   /* alles mittig auf der Seite */
  margin: 30px auto;
  max-width: 500px;      /* Begrenzung */
  background: #363636;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.intern_config {
  display: block;
  width: 80%;           /* nimmt volle Breite des Containers */
  margin: 8px 0;
  font-weight: bold;
  color: #fff;
  font-size: 18px;
  text-align: left;      /* Label linksbündig */
}

.intern_config input {
  width: 100%;
  padding: 12px 16px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  background-color: #535353;
  color: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
  transition: 0.3s;
}

.intern_config input:focus {
  outline: none;
  background-color: #505050;
  box-shadow: 0 0 6px #ffd900;
}

.intern_config_form button {
  margin-top: 20px;
  background-color: #9d3434;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.intern_config_form button:hover {
  background-color: #b53c3c;
}

.time-box {
  margin: 20px auto;          /* zentriert mit Abstand */
  padding: 20px 30px;
  border-radius: 8px;
  background: #2d2d2d;        /* dunkler Hintergrund */
  max-width: 600px;           /* etwas breiter */
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  color: #fff;                /* weiße Schrift */
}

.time-box h2 {
  margin-top: 0;
  font-size: 22px;
  text-align: center;
  color: #ffa600;             /* passt zu deinem Fokus-Gelb */
}

.time-box label {
  display: block;
  margin: 15px 0 5px 0;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
  text-align: left;
}

.time-box input,
.time-box select {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  background-color: #3c3c3c;
  color: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
  transition: 0.3s;
  margin-top: 5px;
}

.time-box input:focus,
.time-box select:focus {
  outline: none;
  background-color: #505050;
  box-shadow: 0 0 6px #ffd900;
}

.time-box button {
  display: block;
  margin: 20px auto 0 auto;
  background-color: #5f5f5f;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.time-box button:hover {
  background-color: #2575c5;
}

#intern2 {
  background-color: #4f6a8d;
  width: 50%;
}
#intern3 {
  background-color: #86a553;
  width: 50%;
}
#intern4 {
  background-color: #86a553;
  width: 50%;
}

/* ============================= */
/*  Blockierte Tage - sauberes Layout */
/* ============================= */

#blockDayList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  margin: 0;
}

.block-entry-row {
  display: flex;
  align-items: center;          /* vertikal mittig */
  justify-content: space-between;
  background: #9f3831;
  color: #fff;
  border-radius: 12px;
  padding: 5px;                   /* KEIN zusätzlicher Innenabstand */
  margin: 0;                    /* KEIN äußerer Abstand */
  height: 50px;                 /* feste Höhe für Gleichmäßigkeit */
  overflow: hidden;             /* verhindert Schattenüberhang */
}

.block-entry-row span {
  flex: 1;
  text-align: center;
  font-size: 16px;
  line-height: 50px;            /* Text mittig in der Zeile */
}

.block-entry-row button {
  background: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 12px 12px 12px 12px;
  width: 40px;
  height: 100%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  padding: 0;
  margin: 0;
  transition: background 0.2s;
}

.block-entry-row button:hover {
  background: #ff7070;
}


.tor-tabs {
  display: flex;
  flex-direction: column;
  align-items: center;
    width: min(96%, 1800px);
    max-width: 1800px;
  margin: 24px auto 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tab-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0 auto 10px;
  padding: 8px;
  border: 1px solid #454545;
  border-radius: 12px;
  background: #222;
  box-shadow: 0 6px 18px rgba(0,0,0,.24);
}

.tab-btn {
  display: flex;
  flex: 1 1 calc((100% - 24px) / 4);
  min-width: calc((100% - 24px) / 4);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #555;
  border-radius: 9px;
  background: #303030;
  color: #ddd;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn:hover {
  background-color: #555;
}

.tab-btn.active {
  border-color: #3e7e3e;
  background-color: #3e7e3e;
  color: #fff;
}

.overview-section-label {
  display: none;
}

/* Bereich unter den Tabs */
.tab-content {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 650px; /* verhindert Springen beim Wechsel */
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #3f3f3f;
  border-radius: 16px;
  background: #1d1d1d;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}

/* Jede Ortsansicht */
.ort-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Sichtbarer Ort */
.ort-container.visible {
  opacity: 1;
  position: relative;
}

/* Versteckter Ort */
.ort-container.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.tor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 420px));
  gap: 24px;
  justify-content: center;
  justify-items: center;
  align-items: center;
  padding: 10px;
  margin: 10px auto;
  width: 100%;
  max-width: 1750px;
  margin-top: 50px;
}

/* Ortsbilder erhalten denselben Kartenrahmen wie die Kartenansicht. */
.location-image-shell {
  display: block;
  width: 80%;
  max-width: 724px;
  margin: 0 auto 30px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #3f3f3f;
  border-radius: 16px;
  background: #1d1d1d;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  line-height: 0;
  cursor: zoom-in;
}

.ort-image {
  display: block;
  width: 100%;
  max-width: none;
  max-height: 450px;
  margin: 0;
  border-radius: 11px;
  box-shadow: none;
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.7s ease;
}

.location-image-shell:hover .ort-image { transform: scale(1.012); }

body.location-viewer-open { overflow: hidden; }
.location-viewer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(9,10,11,.96);
}
.location-viewer:not([hidden]) {
  animation: location-viewer-fade-in .3s ease-out both;
}
.location-viewer:not([hidden]) .location-viewer-stage img {
  animation: location-viewer-image-in .46s cubic-bezier(.2,.75,.25,1) both;
}
.location-viewer:not([hidden]) .location-viewer-toolbar {
  animation: location-viewer-toolbar-in .42s cubic-bezier(.2,.75,.25,1) .08s both;
}
.location-viewer-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 52px 24px 104px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.location-viewer-stage:active { cursor: grabbing; }
.location-viewer-stage img {
  display: block;
  max-width: 92vw;
  max-height: calc(100dvh - 156px);
  border: 1px solid #4a4a4a;
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(0,0,0,.62);
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
}
.location-viewer-toolbar {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 1301;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #555;
  border-radius: 12px;
  background: rgba(34,34,34,.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.48);
  transform: translateX(-50%);
}
.location-viewer-toolbar button {
  min-width: 44px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #5b5b5b;
  border-radius: 9px;
  background: #3a3a3a;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.location-viewer-toolbar button:hover { background: #4b4b4b; }
.location-viewer-toolbar .location-zoom-reset { min-width: 84px; }
.location-viewer-toolbar .location-viewer-close { background: #b73535; }
.location-viewer-toolbar .location-viewer-close:hover { background: #c94343; }

@keyframes location-viewer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes location-viewer-image-in {
  from { opacity: 0; filter: brightness(.7) blur(7px); }
  to { opacity: 1; filter: none; }
}

@keyframes location-viewer-toolbar-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Ortsname direkt über dem Bild */
.ort-label {
  text-align: center;
  margin: 30px auto 10px;
  font-size: 1.7em;
  font-weight: BOLDER;
  color: #ddd;
  letter-spacing: 0.5px;
  min-height: 1.5em;
}


/* ============================= */
/* Kalender-Import (ICS Upload)  */
/* ============================= */

.upload-blocking {
  background: var(--box-bg, #5a5a5a);
  color: var(--text, #fff);
  padding: 30px 40px;
  border-radius: 30px;
  max-width: 900px;
  width: 95%;
  margin: 40px auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-blocking:hover {
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(0,0,0,0.4);
}

.upload-blocking h3 {
  font-size: 1.6em;
  margin-bottom: 20px;
  color: #ffd900; /* Akzentfarbe wie im Theme */
  letter-spacing: 0.5px;
}

.upload-blocking input[type="file"] {
  display: inline-block;
  background: #3c3c3c;
  color: #fff;
  border: 1px solid #777;
  border-radius: 25px;
  padding: 12px 16px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.upload-blocking input[type="file"]:hover {
  background: #4a4a4a;
  border-color: #ccc;
}

.upload-blocking button {
  margin-left: 15px;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  background-color: #9d3434;
  color: white;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.upload-blocking button:hover {
  background-color: #b93f3f;
  transform: scale(1.05);
}

.upload-blocking button:active {
  transform: scale(0.98);
  background-color: #7d2424;
}

/* Info-Text unterhalb */
.upload-blocking small {
  display: block;
  margin-top: 10px;
  color: #ddd;
  font-size: 0.9em;
  opacity: 0.8;
}



