

:root {
  --rw-ziel: var(--tipp-ziel);
  --rw-ampel-gruen: #007A45;
  --rw-ampel-rot: #c0392b;
  --rw-ampel-gelb: #e8a317;
}

.rw-leiste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent;
}

.rw-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--rw-ziel);
  padding: 0 16px;
  font: 600 0.95rem/1.2 inherit;
  color: var(--text, #1c2b33);
  background: var(--flaeche, #fff);
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  white-space: nowrap;
}

.rw-knopf:hover { background: var(--marke-soft, #e6f2ec); }
.rw-knopf:focus-visible {
  outline: none;
  border-color: var(--marke, #007A45);
  box-shadow: 0 0 0 3px rgba(4, 135, 85, 0.25);
}
.rw-knopf.an {
  background: var(--marke, #007A45);
  border-color: var(--marke, #007A45);
  color: #fff;
}
.rw-knopf.stark {
  background: var(--marke, #007A45);
  border-color: var(--marke, #007A45);
  color: #fff;
}
.rw-knopf.stark:hover { background: var(--marke-dunkel, #005C34); }
.rw-knopf.zart { color: var(--text-mute, #6b7a85); }
.rw-knopf.breit { width: 100%; }
.rw-icon { font-size: 1.15rem; line-height: 1; }

.rw-klein {
  min-height: 38px;
  padding: 0 12px;
  font: 600 0.9rem/1 inherit;
  background: var(--flaeche, #fff);
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 8px;
  cursor: pointer;
}
.rw-klein:hover { background: var(--marke-soft, #e6f2ec); }
.rw-klein.an { border-color: var(--marke, #007A45); background: var(--marke-soft, #e6f2ec); color: var(--marke, #007A45); }
.rw-legende-abschnitt { margin-top: 6px; }

.rw-panel {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 1200;
  width: min(380px, calc(100vw - 32px));

  max-height: calc(100vh - 84px - var(--aime-frei));
  display: flex;
  flex-direction: column;
  background: var(--flaeche, #fff);
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);

  overflow: hidden auto;

  scrollbar-gutter: stable;
}

.rw-panel-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rand, #dde3e7);

  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--flaeche, #fff);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.rw-panel-kopf h3 { margin: 0; font-size: 1.05rem; }

.rw-schliessen {
  min-width: var(--rw-ziel);
  min-height: var(--rw-ziel);
  font-size: 1.35rem;
  line-height: 1;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text-mute, #6b7a85);
  cursor: pointer;
}
.rw-schliessen:hover { background: var(--grund, #f5f7f8); color: var(--text, #1c2b33); }

.rw-zeitraum,
.rw-saetze {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 0;
}
.rw-zeitraum label,
.rw-saetze label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
  color: var(--text-mute, #6b7a85);
}
.rw-zeitraum input,
.rw-saetze input {
  min-height: 38px;
  padding: 0 8px;
  font: 500 0.95rem/1 inherit;
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 8px;

  min-width: 8.5rem;
}
.rw-saetze input { min-width: 6rem; }

.rw-startzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 0;
}
.rw-start-label {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-mute, #6b7a85);
}
.rw-start.an {
  background: var(--marke, #007A45);
  border-color: var(--marke, #007A45);
  color: #fff;
}

.rw-start:disabled {
  color: var(--text-mute, #6b7a85);
  background: var(--grund, #f5f7f8);
  cursor: not-allowed;
}
.rw-start-ort,
.rw-start-hinweis {
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-mute, #6b7a85);
}
.rw-start-hinweis {
  padding: 8px 10px;
  color: var(--marke-dunkel, #005C34);
  background: var(--marke-soft, #e6f2ec);
  border-radius: 8px;
}

.rw-start-icon span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 2px;
  font: 700 0.85rem/1 system-ui, sans-serif;
  color: #fff;
  background: var(--marke, #007A45);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.rw-bereiche {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 0;
}
.rw-bereiche:empty { display: none; }

.rw-frage {
  margin: 12px 14px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #1d2b33);
}

.rw-nachschaerfen {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--ut-gruen, #007a45);
  background: var(--grund, #f5f7f8);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-mute, #6b7a85);
}

.rw-vorgabe,
.rw-hinweis {
  margin: 8px 14px 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-mute, #6b7a85);
}
.rw-hinweis {
  padding: 8px 10px;
  background: var(--grund, #f5f7f8);
  border-radius: 8px;
}
.rw-warnung {
  margin: 12px 14px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--rw-ampel-rot);
  background: #fdeceb;
  border-radius: 8px;
}

.rw-kopfzahlen { padding: 10px 14px 0; }
.rw-zeile { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; font-size: 0.95rem; }
.rw-zeile.gross strong { font-size: 1.5rem; }
.rw-detail { font-size: 0.82rem; color: var(--text-mute, #6b7a85); }

.rw-liste {

  flex: 0 1 auto;
  padding: 10px 14px;
}

.rw-stelle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rand, #eef2f4);
}
.rw-stelle-text { flex: 1; min-width: 0; }
.rw-stelle-text strong { font-size: 0.95rem; }

.rw-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font: 700 0.85rem/1 inherit;
  color: #fff;
  background: var(--marke, #007A45);
  border-radius: 50%;
}
.rw-stelle.faellig .rw-nr { background: var(--rw-ampel-rot); }

.rw-befrass { font-size: 0.82rem; color: var(--rw-ampel-rot); }

.rw-stelle.erledigt { opacity: 0.65; }
.rw-stelle.erledigt .rw-nr {
  background: var(--rw-ampel-gruen);
  font-size: 0.95rem;
}

.rw-tour {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rand, #eef2f4);
}
.rw-tour.fertig { opacity: 0.7; }
.rw-tour-knoepfe { display: flex; align-items: center; gap: 4px; }

.rw-weg-hinweise:not(:empty) {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: var(--grund, #f5f7f8);
  border-left: 4px solid #e8730c;
  border-radius: 0 8px 8px 0;
}
.rw-weg-schritt { margin-top: 4px; }

.rw-weg {
  min-width: 38px;
  min-height: 38px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-mute, #6b7a85);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.rw-weg:hover { background: #fdeceb; color: var(--rw-ampel-rot); }

.rw-leer { padding: 16px 0; font-size: 0.92rem; color: var(--text-mute, #6b7a85); }

.rw-aktionen {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--flaeche, #fff);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--rand, #dde3e7);
  background: var(--grund, #f5f7f8);
}

.rw-kennzahl {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rand, #eef2f4);
}
.rw-kz-name { flex: 1; font-size: 0.9rem; color: var(--text-mute, #6b7a85); }

.rw-liste h4 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
}

.rw-satz {
  margin: 8px 0;
  padding: 8px 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: var(--grund, #f5f7f8);
  border-left: 4px solid var(--rand, #dde3e7);
  border-radius: 0 8px 8px 0;
}
.rw-satz.warnung { border-left-color: var(--rw-ampel-rot); }
.rw-satz.gut { border-left-color: var(--rw-ampel-gruen); }

.rw-legende {
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.5;

  max-width: min(260px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.rw-legende strong { display: block; margin-bottom: 4px; font-size: 0.85rem; }
.rw-legende-zeile { display: flex; align-items: center; gap: 8px; }

.rw-legende-punkt {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.rw-punkt {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: #fff;
  border: 3px solid #9aa4ad;
  border-radius: 50%;
}

.rw-nummer-icon span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font: 700 0.8rem/1 system-ui, sans-serif;
  color: #fff;
  background: #1a73e8;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.rw-nummer-icon.erledigt span {
  background: var(--rw-ampel-gruen);
  font-size: 0.95rem;
}

.rw-station-icon span {
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  background: #fff;
  border: 3px solid #9aa4ad;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.rw-station-popup { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.rw-station-popup .rw-knopf { min-height: 40px; font-size: 0.9rem; }

.rw-fahrt {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1300;
  width: min(560px, calc(100vw - 24px));
  padding: 12px 14px;
  background: var(--flaeche, #fff);
  border: 1px solid var(--rand, #dde3e7);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}
.rw-fahrt-kopf { display: flex; align-items: center; gap: 10px; }
.rw-fahrt-kopf > div { flex: 1; min-width: 0; }
.rw-fahrt-knoepfe { display: flex; gap: 8px; margin-top: 10px; }
.rw-fahrt-knoepfe .rw-knopf { flex: 1; }

@media (max-width: 640px) {
  .rw-panel { top: auto; bottom: 0; right: 0; left: 0; width: 100%;
              max-height: 72vh; border-radius: 14px 14px 0 0; }
  .rw-knopf { padding: 0 12px; }
}

.rw-fahrt-abschluss {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rand, #eef2f4);
}
.rw-fahrt-abschluss .rw-klein { flex: 1; }

.rw-folge { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 6px; }
.rw-folge > details { border: 1px solid var(--rand); border-radius: 8px; padding: 6px 10px; }
.rw-folge > details > summary {
  cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--text-mute);
  min-height: 28px; display: flex; align-items: center;
}
.rw-folge textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px;
  padding: 8px 10px; border: 1px solid var(--rand); border-radius: 6px;
  margin: 6px 0; resize: vertical;
}
.rw-folge textarea:focus { outline: none; border-color: var(--ut-gruen); box-shadow: 0 0 0 3px var(--ut-gruen-hell); }
.rw-folge input[type="file"] { font-size: 0.82rem; max-width: 100%; }
.rw-ki-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rw-ki-budget { font-size: 0.85rem; color: var(--text-mute); display: flex; align-items: center; gap: 6px; }
.rw-ki-budget input { width: 4.5rem; font: inherit; font-size: 16px; padding: 4px 6px; border: 1px solid var(--rand); border-radius: 6px; }
.rw-ki-echo {
  margin: 6px 0 0; padding: 8px 10px; font-size: 0.85rem; line-height: 1.4;
  color: var(--text-mute); background: var(--grund, #f5f7f8); border-radius: 8px;
}
.rw-ki-echo.gut { color: var(--marke-dunkel, #005C34); background: var(--marke-soft, #e6f2ec); }
