/**
 * Aktuelle visuelle Schicht der Anwendung: Layout, Kontrast, Dark Mode, Zeitstrahl, Wochenraster und geführtes Tutorial.
 */
/* Diese Datei wird nach den klassischen Stylesheets geladen. Spätere Regeln
   überschreiben deren Darstellung gezielt, ohne die VIS-Daten zu verändern. */
:root {
  --brand: #c00017;
  --brand-dark: #9f0013;
  --ink: #20252e;
  --muted: #697180;
  --line: #e2e5eb;
  --canvas: #f5f6f8;
  --soft-red: #fff0f2;
  --radius: 12px;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #326ec2;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
#container {
  height: 100dvh;
  display: grid;
  grid-template-rows: 68px 54px minmax(0, 1fr) 30px;
  overflow: hidden;
}
#header {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  height: auto;
  padding: 0 28px;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  z-index: 210;
  font: inherit;
}
.headertitel {
  order: 1;
  position: static;
  float: none;
  margin: 0;
  font:
    700 24px Segoe UI,
    Arial,
    sans-serif;
  letter-spacing: -0.7px;
  text-shadow: none;
  color: var(--ink);
}
.headerlogo {
  position: static;
  inset: auto;
  width: 36px;
  height: 36px;
  filter: none;
}
#header #userbox {
  position: static;
  float: none;
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: auto;
  font-size: 13px;
}
#userboximg {
  width: 25px;
  height: 25px;
  padding: 5px;
  margin: 0;
  background: var(--brand);
  box-shadow: none;
  border-radius: 50%;
  float: none;
}
#userboxtext {
  height: auto;
  margin: 0;
  position: static;
  display: block;
  font-weight: 600;
}
#userboxlogout {
  display: flex;
  align-items: center;
  position: static;
  float: none;
  height: 36px;
  margin: 0 0 0 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  background: white;
  box-shadow: none;
}
#userboxlogout img {
  height: 16px;
  filter: brightness(0.4);
  margin-right: 6px;
  float: none;
}
#userboxlogout:hover {
  color: var(--brand);
  background: var(--soft-red);
}
#navigation {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 0 28px;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  z-index: 200;
  overflow-x: auto;
}
#navigation a,
#navigation a.active {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: auto;
  width: auto;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  box-shadow: none;
  font-weight: 600;
  overflow: visible;
}
#navigation a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
#navigation a:hover {
  background: var(--soft-red);
  color: var(--brand);
}
#content:has(.wrapper) {
  background:
    radial-gradient(ellipse at 15% 20%, #fff 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #f6dce0 0%, transparent 55%),
    var(--canvas);
}
html[data-theme="dark"] #content:has(.wrapper) {
  background:
    radial-gradient(ellipse at 15% 20%, #283447 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #4b2530 0%, transparent 55%),
    var(--canvas);
}
#content {
  position: relative;
  inset: auto;
  width: auto;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  margin: 0;
  background: var(--canvas);
  font: inherit;
  overflow: auto;
  z-index: 100;
}
#footer {
  grid-row: 4;
  position: relative;
  inset: auto;
  height: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border: 0;
  border-top: 1px solid var(--line);
  font:
    11px Segoe UI,
    Arial,
    sans-serif;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
}
#footer #status {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  width: auto;
  min-width: 100px;
  height: auto;
  padding: 0;
  margin-right: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
#footer #status #statuspfeil {
  width: 7px;
  height: 7px;
  background: #2b956c;
  border-radius: 50%;
  color: transparent;
  margin-right: 8px;
  font-size: 0;
  float: none;
}
#footer #status #statuskringel {
  position: static;
  width: 16px;
  height: 16px;
  margin: 0 7px 0 0;
}
#footer #zeit {
  float: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
}
.wrapper {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  min-height: 520px;
  overflow: visible;
  padding: 24px 28px 20px;
}
.planning-heading {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.eyebrow {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
}
#content h1,
.planning-heading h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 5px 0 4px;
  line-height: 1.2;
}
.planning-heading p,
.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.primary,
.secondary {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 15px;
  font-weight: 600;
  background: white;
  color: var(--ink);
}
.primary {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: white !important;
}
.primary:hover {
  background: var(--brand-dark) !important;
}
.secondary:hover {
  background: var(--soft-red);
  color: var(--brand);
}
.menucontainer {
  grid-column: 1/-1;
  position: relative;
  inset: auto;
  height: auto;
  width: auto;
  z-index: 60;
}
.menucontainer #timelinemenu {
  position: static;
  inset: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  text-align: left;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.menucontainer #timelinemenu .menu-btn {
  box-sizing: border-box;
  min-height: 38px;
  height: 38px;
  width: auto;
  padding: 0 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
}
.menucontainer #timelinemenu .menu-btn:hover {
  background: var(--canvas);
  border-color: #b5bbc6;
  padding: 0 12px;
}
.menucontainer #timelinemenu .menu-btn:active {
  background: #eef0f4;
}
.menu-inp-gotoDate {
  box-sizing: border-box;
  position: static;
  inset: auto;
  height: 38px;
  width: 142px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  background: white;
  color: var(--ink);
}
.more-actions {
  position: relative;
  font-size: 12px;
}
.more-actions summary {
  cursor: pointer;
  padding: 10px;
  color: var(--muted);
  border-radius: 6px;
}
.action-popover {
  position: absolute;
  top: 44px;
  left: 0;
  min-width: 250px;
  background: white;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px #20252e22;
  z-index: 200;
}
.action-popover button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: white;
  padding: 12px;
  text-align: left;
  font-size: 13px;
}
.action-popover button:hover {
  background: var(--canvas);
}
.danger {
  color: var(--brand);
}
.items-panel {
  box-sizing: border-box;
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: auto;
  padding: 18px 16px 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 30;
}
.panel-heading h2 {
  font-size: 17px;
  letter-spacing: -0.35px;
  margin: 5px 0 6px;
}
.panel-heading p {
  font-size: 12px;
}
#buttonmenu {
  position: static;
  inset: auto;
  display: flex;
  gap: 3px;
  width: auto;
  height: auto;
  padding: 4px;
  margin: 16px 0 14px;
  background: var(--canvas);
  border-radius: 8px;
}
#buttonmenu a,
#buttonmenu a.active {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  inset: auto;
  width: auto;
  height: 34px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  font-size: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
}
#buttonmenu a.active {
  background: white;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 1px 4px #20252e15;
}
.filter-container {
  position: static;
  inset: auto;
  display: block;
  box-sizing: border-box;
  flex: none;
  width: auto;
  padding: 0;
  margin: 0;
  background: white;
  border: 0;
}
.search-label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fcfcfd;
}
.search-field span {
  font-size: 22px;
  color: var(--muted);
}
.search-field input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 13px;
  border-radius: 6px;
  padding: 0;
  color: var(--ink);
}
.filter-checkboxes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  flex: none;
  padding: 0;
  margin: 14px 0;
  border: 0;
}
.filter-checkboxes legend {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.filter-checkboxes label {
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  margin: 0;
  font-size: 12px;
}
.filter-checkboxes input {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  margin: 0 2px 0 0;
}
.results-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
#filter-reset {
  background: none;
  border: 0;
  color: var(--brand);
  font-size: 11px;
  padding: 6px;
}
.objektliste {
  position: relative;
  inset: auto;
  flex: 1;
  min-height: 0;
  margin: 8px 0 0;
  padding: 2px 2px 8px;
  border: 0;
  background: white;
  overflow: auto;
  scrollbar-width: thin;
}
.objektliste h3 {
  display: none;
}
.items {
  box-sizing: border-box;
  float: none;
  display: block;
  columns: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 13px;
  overflow: visible;
}
.items li.item,
.items li.object-item {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 9px;
  padding: 12px 10px;
  min-height: 62px;
  border-radius: 9px;
  border: 1px solid #dce3ef !important;
  border-left: 3px solid #6586be !important;
  background: #f7f9fd !important;
  color: var(--ink) !important;
  box-shadow: none;
  text-shadow: none !important;
  transition: box-shadow 0.15s;
}
.items li:hover {
  box-shadow: 0 3px 12px #20252e14;
  border-color: #9aabc4 !important;
}
.items li.item-mitarbeiter {
  border-left-color: #ca8544 !important;
  background: #fff8f0 !important;
}
.items li.item-fahrzeug {
  border-left-color: #738089 !important;
  background: #f6f7f8 !important;
}
.items li.object-item-technik {
  border-left-color: #8372b4 !important;
  background: #f8f6ff !important;
}
.items li[filter_verfuegbar="vorgemerkt"] {
  border-left-color: #bc8d28 !important;
  background: #fffaf0 !important;
}
.items li[filter_verfuegbar="verplant"] {
  border-left-color: #378966 !important;
  background: #f1faf5 !important;
}
.terminobjekt {
  font-size: 12px;
  line-height: 1.45;
}
.terminobjekt infohead {
  height: auto;
  font-size: 12px;
  padding-right: 24px;
  line-height: 1.5;
}
.terminobjekt infotext {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}
.terminobjekt infotermin,
.terminobjekt inforef {
  font-size: 10px;
  margin-top: 6px;
  color: var(--muted);
}
.iteminfobtn {
  width: 17px;
  height: 17px;
  top: 0;
  right: 0;
  filter: none;
}
#empty-results {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  padding: 10px 0;
}
.visualization-container {
  position: relative;
  inset: auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 65px minmax(0, 1fr) 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.timeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.timeline-heading h2 {
  font-size: 17px;
  margin: 4px 0 0;
  letter-spacing: -0.3px;
}
#visible-period {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
#visualization {
  position: relative;
  inset: auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  font-size: 13px;
  grid-row: 2;
  overflow: hidden;
}
div.vis-timeline {
  border: 0;
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
}
.vis-labelset .vis-label {
  color: var(--ink);
  background: #fcfcfd;
  border-bottom-color: #edf0f4;
  font-size: 13px;
}
.vis-labelset .vis-label .vis-inner {
  padding: 12px 10px;
}
.vis-time-axis .vis-text {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px;
}
.vis-time-axis .vis-grid.vis-minor {
  border-color: #edf0f4;
}
.vis-time-axis .vis-grid.vis-major {
  border-color: #dfe3ea;
}
.vis-today.vis-odd,
.vis-today.vis-even {
  background: #fff4f5;
}
.vis-item.vis-background.freizeit {
  background: #f5f6f9;
}
.vis-item:not(.vis-background) {
  border-radius: 5px;
  box-shadow: none;
}
.vis-item.vis-selected:not(.vis-background) {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin: 0 5px 0 10px;
}
.legend-dot.draft {
  background: #c59a34;
  margin-left: 0;
}
.legend-dot.released {
  background: #378966;
}
#grouphighlight,
#timemarker,
#timelineecke {
  pointer-events: none;
}
#loadstatus,
#loginstatus {
  box-sizing: border-box;
  width: 240px;
  height: auto;
  min-height: 160px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 15px 60px #20252e26;
  padding: 24px;
  z-index: 3000;
  font-size: 14px;
}
#loadstatus > img,
#loginstatus > img {
  position: static;
  inset: auto;
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  filter: none;
}
#itemkontext {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px #20252e26;
  padding: 16px;
  font-family: inherit;
  max-width: calc(100vw - 32px);
  overflow: auto;
  z-index: 3000;
}
#terminkontext {
  z-index: 3000;
  max-width: calc(100vw - 32px);
}
.kontextbtn {
  font-size: 13px;
  border-radius: 6px;
  min-height: 34px;
}
.notification-container {
  position: fixed;
  z-index: 4000;
  right: 24px;
  bottom: 48px;
  font-family: inherit;
}
body.login-page #navigation {
  display: none;
}
body.login-page #container {
  grid-template-rows: 68px minmax(0, 1fr) 30px;
}
body.login-page #footer {
  grid-row: 3;
}
body.login-page #content {
  min-height: 0;
}
#loginwrapper {
  box-sizing: border-box;
  position: relative;
  inset: auto;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  height: auto;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 15% 20%, #fff 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #f6dce0 0%, transparent 55%),
    var(--canvas);
  animation: none;
}
#loginbox {
  box-sizing: border-box;
  position: relative;
  inset: auto;
  width: min(100%, 440px);
  height: auto;
  max-height: none;
  padding: 36px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 48px #3037440c;
  text-align: left;
  font-weight: 400;
  animation: none !important;
  opacity: 1 !important;
}
#loginbox form {
  margin: 0;
}
#loginbox h1 {
  font-size: 28px;
  margin: 10px 0;
  letter-spacing: -0.8px;
}
.login-intro {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}
#loginbox label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 7px;
}
#loginbox input {
  box-sizing: border-box;
  position: static;
  inset: auto;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid #d6dbe3;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  opacity: 1;
  animation: none;
}
.password-field {
  display: flex;
  align-items: center;
  position: relative;
}
#loginbox .password-field input {
  padding-right: 82px;
}
#password-toggle {
  position: absolute;
  right: 6px;
  background: white;
  border: 0;
  color: var(--brand);
  padding: 10px;
  font-size: 12px;
  border-radius: 6px;
}
.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 46px;
  margin-top: 24px;
  font-size: 14px;
}
.login-help {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
#login-error {
  padding: 12px;
  background: var(--soft-red);
  border: 1px solid #f0bdc5;
  border-radius: 8px;
  color: #9f0013;
  font-size: 13px;
  line-height: 1.5;
}
.platz_headermenue,
.platz_loginbox,
.platz_footerbox {
  display: none !important;
}
dialog.help-dialog {
  box-sizing: border-box;
  width: min(560px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 20px 80px #20252e33;
  font-size: 14px;
}
dialog::backdrop {
  background: #20252e66;
}
.help-dialog h2 {
  margin: 6px 0 20px;
  font-size: 24px;
  letter-spacing: -0.5px;
}
.help-dialog ol {
  padding-left: 22px;
  columns: 1;
}
.help-dialog li {
  padding: 0 0 16px;
  line-height: 1.6;
}
.help-dialog li span {
  display: block;
  color: var(--muted);
}
.help-dialog p {
  line-height: 1.6;
  color: var(--muted);
}
.help-dialog form {
  text-align: right;
}
@media (min-width: 1600px) {
  .wrapper {
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 20px;
  }
  .items-panel {
    padding: 20px;
  }
}
@media (max-width: 1000px) {
  .wrapper {
    padding: 18px;
    gap: 12px;
    grid-template-columns: 280px minmax(0, 1fr);
  }
  #header {
    padding: 0 18px;
  }
  #navigation {
    padding: 0 18px;
  }
  .menucontainer #timelinemenu {
    gap: 10px;
  }
  .timeline-footer #selection-summary {
    display: none;
  }
}
@media (max-width: 700px) {
  #container {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: 64px 50px minmax(0, 1fr) auto;
    overflow: visible;
  }
  #header {
    padding: 0 14px;
    gap: 8px;
  }
  .headertitel {
    font-size: 20px;
  }
  .headerlogo {
    width: 30px;
    height: 30px;
  }
  #userboximg {
    display: none;
  }
  #userboxtext {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #userboxlogout {
    padding: 0 8px;
    font-size: 11px;
    margin-left: 0;
  }
  #userboxlogout img {
    display: none;
  }
  #navigation {
    padding: 0 8px;
    gap: 0;
  }
  #navigation a,
  #navigation a.active {
    padding: 0 14px;
    font-size: 13px;
  }
  #content {
    overflow: visible;
  }
  .wrapper {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    gap: 14px;
  }
  .planning-heading {
    align-items: flex-start;
  }
  #content h1 {
    font-size: 27px;
  }
  .planning-heading p {
    font-size: 12px;
    max-width: 230px;
  }
  #help-open {
    font-size: 11px;
    padding: 0 10px;
    min-height: 36px;
  }
  .items-panel {
    max-height: 440px;
    min-height: 350px;
    padding: 16px;
  }
  .objektliste {
    min-height: 100px;
  }
  .visualization-container {
    height: 520px;
    flex: none;
    grid-template-rows: 65px minmax(0, 1fr) 36px;
  }
  .timeline-heading {
    padding: 0 12px;
  }
  #visible-period {
    font-size: 10px;
  }
  .timeline-footer {
    font-size: 10px;
  }
  #footer {
    padding: 10px 14px;
    white-space: normal;
    font-size: 9px;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.5;
  }
  #footer #zeit {
    display: none;
  }
  .menucontainer #timelinemenu {
    padding: 10px;
  }
  .toolbar-group {
    gap: 5px;
  }
  .menucontainer #timelinemenu .menu-btn {
    font-size: 11px;
    padding: 0 10px;
  }
  .more-actions summary {
    padding: 10px 4px;
    font-size: 11px;
  }
  body.login-page #container {
    min-height: 100dvh;
    height: auto;
    grid-template-rows: 64px minmax(0, 1fr) auto;
  }
  body.login-page #userboxtext {
    max-width: none;
    font-size: 11px;
  }
  #loginbox {
    padding: 28px 22px;
  }
  #loginwrapper {
    padding: 28px 14px;
  }
  #loginbox h1 {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Die folgenden Korrekturen entkoppeln dekorative Altregeln von den Karten.
   Status und Metadaten bleiben bei schmalen Ressourcenlisten lesbar. */
#timelineecke,
#grouphighlight {
  display: none !important;
}
.terminobjekt {
  display: flow-root;
}
.terminobjekt infohead {
  white-space: normal;
}
.items li.item,
.items li.object-item {
  overflow: visible;
}

#loginbox {
  transform: none;
}
#loginbox div {
  opacity: 1;
  animation: none !important;
}
.items li[filter_verfuegbar]::after {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.items li[filter_verfuegbar="ungeplant"]::after {
  content: "Offen";
  background: #eaf0f9;
  color: #43648f;
}
.items li[filter_verfuegbar="vorgemerkt"]::after {
  content: "Vorgemerkt";
  background: #fcf0d8;
  color: #85631d;
}
.items li[filter_verfuegbar="verplant"]::after {
  content: "Geplant";
  background: #e5f4eb;
  color: #2d7354;
}
.timeline-empty {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 160px;
  z-index: 20;
  padding: 24px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

/* Höherer Kontrast für Werkzeuge und Zeitstrahl. Feste Rahmenbreiten verhindern,
   dass benachbarte Schaltflächen beim Hover ihre Position ändern. */
:root {
  --ink: #172033;
  --muted: #40516b;
  --line: #cad2df;
  --canvas: #f3f5f8;
  --soft-red: #fff0f2;
  --surface: #fff;
  --surface-raised: #fff;
  --field: #fff;
  --track: #fbfcfe;
  --offtime: #f0f2f6;
  --weekend: #fde9ec;
  --card: #f8f9fc;
}
.wrapper {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding-top: 16px;
}
.theme-toggle {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 88px;
  height: 38px;
  margin-left: auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.theme-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--soft-red);
}
.theme-icon {
  font-size: 18px;
  line-height: 1;
}
#header #userbox {
  order: 3;
  margin-left: 0;
}
#navigation a,
#navigation a.active {
  color: var(--ink);
}
#navigation a.active {
  color: var(--brand);
  background: var(--soft-red);
}
.eyebrow {
  color: var(--brand);
}
.menucontainer #timelinemenu {
  border-left: 4px solid var(--brand);
}
.menucontainer #timelinemenu .menu-btn,
#userboxlogout,
.secondary {
  border-color: #b8c2d0;
  color: var(--ink);
  font-weight: 650;
}
.menucontainer #timelinemenu .menu-btn:hover,
#userboxlogout:hover,
.secondary:hover {
  border-color: var(--brand);
  background: var(--soft-red);
  color: var(--brand);
}
.menucontainer #timelinemenu .menu-btn:disabled {
  border-color: var(--line);
  background: var(--canvas);
  color: var(--muted);
  opacity: 0.75;
}
.menucontainer #timelinemenu #btn-today {
  border-color: #e1a8b0;
  background: var(--soft-red);
  color: var(--brand);
}
.menucontainer #timelinemenu #help-open {
  border-color: var(--brand);
  color: var(--brand);
}
.more-actions summary {
  font-weight: 650;
  color: var(--ink);
}
.more-actions summary:hover {
  color: var(--brand);
  background: var(--soft-red);
}
.action-popover button {
  color: var(--ink);
}
.action-popover button.danger {
  color: var(--brand);
}
.search-label,
.filter-checkboxes label {
  color: var(--ink);
}
.filter-checkboxes legend,
.results-line,
#empty-results,
.panel-heading p,
.timeline-footer,
#visible-period {
  color: var(--muted);
}
.search-field {
  border-color: #aeb9c9;
}
.search-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #c0001720;
}
.search-field input::placeholder {
  color: #536078;
  opacity: 1;
}
#buttonmenu {
  background: var(--soft-red);
  border: 1px solid #f0d7dc;
}
#buttonmenu a {
  color: var(--ink);
}
#buttonmenu a.active {
  background: var(--brand);
  color: white;
}
#buttonmenu a.active:hover {
  background: var(--brand-dark);
  color: white;
}
#filter-reset {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.items li.item,
.items li.object-item {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
.items li.item-auftrag {
  border-left-color: var(--brand) !important;
}
.items li[filter_verfuegbar="ungeplant"]::after {
  background: #f8dfe4;
  color: #8e0011;
}
.timeline-heading {
  border-bottom-color: var(--line);
}
.vis-panel.vis-left,
.vis-labelset .vis-label {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
.vis-labelset .vis-label {
  border-bottom: 1px solid var(--line) !important;
}
.vis-labelset .vis-label .vis-inner {
  font-size: 13px;
  font-weight: 650;
}
.vis-panel.vis-top,
.vis-time-axis.vis-foreground {
  background: var(--surface) !important;
}
.vis-time-axis .vis-text {
  color: var(--ink) !important;
  font-size: 12px;
  font-weight: 600;
}
.vis-time-axis .vis-text.vis-major {
  color: var(--brand) !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.vis-time-axis .vis-grid.vis-minor {
  border-color: #e7ebf0 !important;
}
.vis-time-axis .vis-grid.vis-major {
  border-color: #cbd3df !important;
}
.vis-panel.vis-center {
  background: var(--track);
}
.vis-foreground .vis-group:nth-child(even) {
  background: #f7f9fc;
}
.vis-foreground .vis-group:hover {
  background: #fae7eb !important;
}
.vis-item.vis-background.freizeit {
  background: var(--offtime) !important;
  opacity: 0.55;
}
.vis-item.vis-background.wochenende {
  background: var(--weekend) !important;
  border-left: 2px solid #eb9ca8 !important;
}
.vis-current-time {
  background-color: var(--brand) !important;
  width: 2px !important;
  z-index: 20 !important;
}
.vis-item:not(.vis-background) {
  border-color: #ab6a76;
  color: var(--ink);
}
.vis-item.vis-selected:not(.vis-background) {
  outline: 2px solid var(--brand);
}
.legend-dot.weekend {
  background: #e698a4;
}
.timeline-empty {
  background: var(--surface);
  color: var(--muted);
}

/* Dark Mode: dieselben Bedienelemente und VIS-Zeilen erhalten dunkle Flächen
   und helle Schrift. Die semantischen Statusfarben bleiben unterscheidbar. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f5fa;
  --muted: #bdc8d9;
  --line: #354054;
  --canvas: #111821;
  --soft-red: #3b1c27;
  --surface: #1a2431;
  --surface-raised: #202c3c;
  --field: #16202c;
  --track: #18222f;
  --offtime: #121a25;
  --weekend: #43242c;
  --card: #222f40;
  --brand: #e04558;
  --brand-dark: #bf1831;
  background: var(--canvas);
}
html[data-theme="dark"] body,
html[data-theme="dark"] #content {
  background: var(--canvas);
  color: var(--ink);
}
html[data-theme="dark"] #header,
html[data-theme="dark"] #navigation,
html[data-theme="dark"] #footer,
html[data-theme="dark"] .menucontainer #timelinemenu,
html[data-theme="dark"] .items-panel,
html[data-theme="dark"] .visualization-container,
html[data-theme="dark"] .filter-container,
html[data-theme="dark"] .objektliste,
html[data-theme="dark"] .timeline-heading,
html[data-theme="dark"] .timeline-footer,
html[data-theme="dark"] .action-popover,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] #userboxlogout,
html[data-theme="dark"] .menucontainer #timelinemenu .menu-btn,
html[data-theme="dark"] dialog.help-dialog,
html[data-theme="dark"] #loadstatus,
html[data-theme="dark"] #loginstatus,
html[data-theme="dark"] #loginbox,
html[data-theme="dark"] #itemkontext {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .headertitel,
html[data-theme="dark"] #userboxtext,
html[data-theme="dark"] #content h1,
html[data-theme="dark"] #content h2 {
  color: var(--ink);
}
html[data-theme="dark"] .primary,
html[data-theme="dark"] .menucontainer #timelinemenu .primary {
  background: #c00017 !important;
  border-color: #e04558 !important;
  color: #fff !important;
}
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] #userboxlogout:hover,
html[data-theme="dark"] .menucontainer #timelinemenu .menu-btn:hover {
  background: var(--soft-red);
  color: #fff;
  border-color: var(--brand);
}
html[data-theme="dark"] .menucontainer #timelinemenu .menu-btn:disabled {
  background: #293344;
  color: #aab6c7;
  border-color: var(--line);
}
html[data-theme="dark"] .menucontainer #timelinemenu #btn-today,
html[data-theme="dark"] .menucontainer #timelinemenu #help-open {
  background: var(--soft-red);
  color: #ffd6dc;
  border-color: var(--brand);
}
html[data-theme="dark"] .menu-inp-gotoDate,
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] #loginbox input,
html[data-theme="dark"] #password-toggle,
html[data-theme="dark"] #moveDate,
html[data-theme="dark"] #moveTime,
html[data-theme="dark"] #selectTeam {
  background: var(--field);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .search-field input::placeholder,
html[data-theme="dark"] #loginbox input::placeholder {
  color: #c1cbda;
}
html[data-theme="dark"] #buttonmenu {
  background: #2a2130;
  border-color: #613343;
}
html[data-theme="dark"] #buttonmenu a {
  color: #e9e7ec;
}
html[data-theme="dark"] #buttonmenu a.active {
  background: #c00017;
  color: white;
}
html[data-theme="dark"] .items li.item,
html[data-theme="dark"] .items li.object-item {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  border-left-color: var(--brand) !important;
}
html[data-theme="dark"] .items li.item-mitarbeiter {
  border-left-color: #e2a36a !important;
}
html[data-theme="dark"] .items li.item-fahrzeug {
  border-left-color: #9db0c7 !important;
}
html[data-theme="dark"] .items li.object-item-technik {
  border-left-color: #ac9ce3 !important;
}
html[data-theme="dark"] .terminobjekt infotext,
html[data-theme="dark"] .terminobjekt infotermin,
html[data-theme="dark"] .terminobjekt inforef {
  color: var(--muted);
}
html[data-theme="dark"] .items li[filter_verfuegbar="ungeplant"]::after {
  background: #5b2735;
  color: #ffe4e8;
}
html[data-theme="dark"] .items li[filter_verfuegbar="vorgemerkt"]::after {
  background: #594520;
  color: #fff0ca;
}
html[data-theme="dark"] .items li[filter_verfuegbar="verplant"]::after {
  background: #234938;
  color: #d2f6e2;
}
html[data-theme="dark"] .vis-panel.vis-left,
html[data-theme="dark"] .vis-labelset .vis-label,
html[data-theme="dark"] .vis-panel.vis-top,
html[data-theme="dark"] .vis-time-axis.vis-foreground {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .vis-panel.vis-center {
  background: var(--track);
}
html[data-theme="dark"] .vis-foreground .vis-group:nth-child(even) {
  background: #1f2b3a;
}
html[data-theme="dark"] .vis-foreground .vis-group:hover {
  background: #482634 !important;
}
html[data-theme="dark"] .vis-time-axis .vis-text {
  color: var(--ink) !important;
}
html[data-theme="dark"] .vis-time-axis .vis-text.vis-major {
  color: #ff96a4 !important;
}
html[data-theme="dark"] .vis-time-axis .vis-grid.vis-minor {
  border-color: #334052 !important;
}
html[data-theme="dark"] .vis-time-axis .vis-grid.vis-major {
  border-color: #647187 !important;
}
html[data-theme="dark"] .vis-item.vis-background.freizeit {
  background: var(--offtime) !important;
  opacity: 0.7;
}
html[data-theme="dark"] .vis-item.vis-background.wochenende {
  background: var(--weekend) !important;
  border-left-color: #a65362 !important;
}
html[data-theme="dark"] .vis-item:not(.vis-background) {
  color: #fff;
  border-color: #a4838b;
}
html[data-theme="dark"] .vis-item.vis-selected:not(.vis-background) {
  outline-color: #ff7689;
}
html[data-theme="dark"] #loginwrapper {
  background:
    radial-gradient(ellipse at 15% 20%, #283447 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, #4b2530 0%, transparent 55%),
    var(--canvas);
}
html[data-theme="dark"] #login-error {
  background: #44202a;
  color: #ffe3e8;
  border-color: #945162;
}
html[data-theme="dark"] .action-popover button {
  background: var(--surface);
  color: var(--ink);
}
html[data-theme="dark"] .action-popover button:hover {
  background: var(--surface-raised);
}
html[data-theme="dark"] #itemkontext #Hauptadresse,
html[data-theme="dark"] #itemkontext #Lieferadresse,
html[data-theme="dark"] #itemkontext #Kontaktadresse,
html[data-theme="dark"] #itemkontext #Auftragstext {
  background: var(--field);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .kontextbtn {
  background: var(--surface-raised);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] #visualization,
html[data-theme="dark"] .vis-timeline,
html[data-theme="dark"] .vis-panel.vis-background {
  background: var(--track) !important;
}
html[data-theme="dark"] .vis-time-axis .vis-text.vis-today {
  background: #4a2734 !important;
  color: #ffe8ed !important;
}
html[data-theme="dark"]
  .vis-item:not(.vis-background):not(.freigegeben):not(.simulation) {
  background: #712b3b !important;
  color: #fff !important;
  border-color: #d56c80 !important;
}
html[data-theme="dark"] .vis-item.freigegeben:not(.vis-background) {
  background: #265443 !important;
  color: #fff !important;
  border-color: #68b08b !important;
}
html[data-theme="dark"] .vis-item.simulation:not(.vis-background) {
  background: #6d4f2e !important;
  color: #fff !important;
  border-color: #ca9d55 !important;
}
html[data-theme="dark"] .vis-item:not(.vis-background) .vis-item-content,
html[data-theme="dark"] .vis-item:not(.vis-background) .vis-item-content * {
  color: #fff !important;
}
@media (max-width: 700px) {
  .wrapper {
    gap: 12px;
    padding-top: 12px;
  }
  .theme-toggle {
    min-width: 38px;
    width: 38px;
    padding: 0;
  }
  .theme-label {
    display: none;
  }
  #header #userbox {
    margin-left: 0;
  }
  #userboxtext {
    display: none;
  }
  body.login-page #userboxtext {
    display: none;
  }
  .timeline-footer {
    font-size: 9px;
  }
}

/* Kompakte Ressourcen-Karten und Zeitvorschau beim Platzieren/Verschieben. */
.items li.item,
.items li.object-item {
  min-height: 0;
  margin-bottom: 5px;
  padding: 7px 9px;
}
.terminobjekt {
  line-height: 1.25;
}
.terminobjekt infohead {
  line-height: 1.25;
}
.terminobjekt infotext {
  margin-top: 1px;
  line-height: 1.25;
}
.terminobjekt infotermin,
.terminobjekt inforef {
  margin-top: 2px;
}
.items li[filter_verfuegbar]::after {
  margin-top: 3px;
  padding: 1px 5px;
}
#footer #zeit {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.menucontainer #timelinemenu .menu-btn,
.menucontainer #timelinemenu .menu-btn:hover,
.menucontainer #timelinemenu .menu-btn:active {
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  padding: 0 12px;
}
html[data-theme="dark"] #buttonmenu a:not(.active):hover,
html[data-theme="dark"] #buttonmenu a:not(.active):focus-visible {
  background: #49303b;
  color: #fff;
}
.placement-preview {
  position: fixed;
  z-index: 5000;
  pointer-events: none;
  max-width: 230px;
  padding: 7px 10px;
  border: 1px solid #d47784;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  box-shadow: 0 8px 25px #1720333d;
  line-height: 1.35;
  white-space: nowrap;
}
.placement-preview small {
  display: block;
  color: #8e0011;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.placement-preview strong {
  display: block;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .placement-preview {
  background: #273446;
  color: #fff;
  border-color: #e26a7b;
}
html[data-theme="dark"] .placement-preview small {
  color: #ffabb8;
}

/* Wochenkalender: sieben Tages-Spalten, vertikale Position nach Uhrzeit und
   nebeneinander liegende Karten bei gleichzeitig geplanten Terminen. */
.view-controls {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  margin-left: auto;
}
.view-control {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.view-control:hover {
  background: var(--soft-red);
  color: var(--brand);
}
.view-control[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}
.timeline-heading #visible-period {
  margin-left: 6px;
}
#weekly-calendar {
  grid-row: 2;
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: auto;
  background: var(--surface);
  scrollbar-width: thin;
}
.week-header,
.week-grid {
  display: grid;
  grid-template-columns: 56px repeat(5, minmax(125px, 1fr));
  min-width: 681px;
}
.week-header {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 39px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.week-header > span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.week-header > span:first-child {
  color: var(--muted);
  font-weight: 600;
}
.week-header .week-day-label.today {
  color: var(--brand);
  background: var(--soft-red);
}
.week-hours {
  position: relative;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.week-hours span {
  position: absolute;
  left: 5px;
  transform: translateY(-50%);
}
.week-day {
  position: relative;
  border-left: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 51px,
    var(--line) 51px,
    var(--line) 52px
  );
}
.week-day.weekend {
  background: repeating-linear-gradient(
    to bottom,
    var(--weekend) 0,
    var(--weekend) 51px,
    var(--line) 51px,
    var(--line) 52px
  );
}
.week-day.today {
  box-shadow: inset 2px 0 var(--brand);
}
.week-event {
  position: absolute;
  box-sizing: border-box;
  z-index: 2;
  display: block;
  overflow: hidden;
  padding: 3px 5px;
  border: 1px solid #b44355;
  border-left: 3px solid var(--brand);
  border-radius: 5px;
  background: #ffe8ed;
  color: #57141e;
  text-align: left;
  font-size: 10px;
  line-height: 1.25;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}
.week-event:hover {
  z-index: 4;
  outline: 2px solid var(--brand);
}
.week-event strong,
.week-event span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-event.released {
  background: #def4e9;
  border-color: #3d9972;
  color: #154a34;
}
.week-event.simulation {
  background: #fff0d2;
  border-color: #c5902b;
  color: #5c4117;
}
.week-empty {
  position: absolute;
  top: 65px;
  left: 70px;
  z-index: 3;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
html[data-theme="dark"] .view-controls {
  background: var(--surface-raised);
}
html[data-theme="dark"] .view-control {
  color: var(--ink);
}
html[data-theme="dark"] .view-control[aria-pressed="true"] {
  background: #c00017;
  color: #fff;
}
html[data-theme="dark"] .week-event {
  background: #712b3b;
  color: #fff;
  border-color: #d56c80;
}
html[data-theme="dark"] .week-event.released {
  background: #265443;
  border-color: #68b08b;
}
html[data-theme="dark"] .week-event.simulation {
  background: #6d4f2e;
  border-color: #ca9d55;
}
@media (max-width: 700px) {
  .timeline-heading {
    gap: 5px;
  }
  .view-control {
    padding: 0 6px;
    font-size: 10px;
  }
  .timeline-heading #visible-period {
    display: none;
  }
}

/* Kompakter Panelkopf und Ressourcenfarben. CSS-Variablen pro Termin kommen
   aus weekly-view.js; für Dark Mode gibt es passende dunkle Farbwerte. */
.items-panel {
  padding-top: 11px;
}
.panel-heading .eyebrow {
  display: none;
}
.panel-heading h2 {
  margin: 0 0 3px;
  font-size: 16px;
}
.panel-heading p {
  font-size: 11px;
  line-height: 1.25;
}
#buttonmenu {
  margin: 10px 0 9px;
}
.week-event,
.week-event.released,
.week-event.simulation {
  background: var(--employee-bg);
  border-color: var(--employee-border);
  color: var(--employee-text);
  touch-action: none;
  user-select: none;
}
.week-event strong,
.week-event .week-event-time,
.week-event .week-event-employee {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-event strong {
  padding-right: 20px;
}
.week-event:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.week-event-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid #a62638;
  border-radius: 4px;
  background: #c00017;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.week-event-remove:hover,
.week-event-remove:focus-visible {
  background: #8d0011;
  outline: 2px solid #fff;
  outline-offset: -3px;
}
.week-event .week-event-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.week-event .week-event-employee {
  font-weight: 600;
}
.week-event-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  vertical-align: middle;
  border-radius: 50%;
  background: #c59a34;
}
.week-event-status.released {
  background: #248c60;
}
.week-event-status.simulation {
  background: #bb7625;
}
.week-event.is-dragging {
  z-index: 20;
  opacity: 0.85;
  box-shadow: 0 6px 20px #17203366;
  cursor: grabbing;
}
.week-move-preview {
  position: fixed;
  z-index: 5100;
  pointer-events: none;
  padding: 7px 10px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 24px #17203355;
  white-space: nowrap;
}
html[data-theme="dark"] .week-event,
html[data-theme="dark"] .week-event.released,
html[data-theme="dark"] .week-event.simulation {
  background: var(--employee-bg-dark);
  border-color: var(--employee-border-dark);
  color: #fff;
}
html[data-theme="dark"] .week-event-status.released {
  background: #73d9a5;
}
html[data-theme="dark"] .week-event-status.simulation {
  background: #f4c479;
}
html[data-theme="dark"] .week-event-remove {
  border-color: #ff8393;
  background: #c00017;
  color: #fff;
}

/* In der Wochenansicht liegt die Mitarbeiter-Auswahl zwischen Kopf und Raster.
   Der erste Tab enthält alle Termine, die übrigen genau einen Mitarbeiter. */
.visualization-container.week-mode {
  grid-template-rows: 65px 42px minmax(0, 1fr) 36px;
}
.week-employee-tabs {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.week-employee-tab {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.week-employee-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--soft-red);
}
.week-employee-tab[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.visualization-container.week-mode #weekly-calendar {
  grid-row: 3;
}
.visualization-container.week-mode .timeline-footer {
  grid-row: 4;
}
.week-employee-selected .week-day {
  cursor: copy;
}
.items-panel.week-planning-pool #buttonmenu [data-type] {
  display: none !important;
}
.items-panel.week-planning-pool #buttonmenu [data-type="auftraege"] {
  display: inline-flex !important;
}
.week-day.week-drop-target {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  background-color: var(--soft-red);
}
.week-empty {
  pointer-events: none;
  max-width: min(380px, 70%);
  line-height: 1.4;
}
html[data-theme="dark"] .week-employee-tabs {
  background: var(--surface);
}
html[data-theme="dark"] .week-employee-tab[aria-selected="true"] {
  color: #fff;
}
html[data-theme="dark"] .week-day.week-drop-target {
  background-color: #602533;
}

/* Interaktiver Rundgang: abgedunkelter Hintergrund, hervorgehobenes Zielelement
   und darüberliegende Schrittkarte mit tastaturbedienbaren Aktionen. */
.tour-scrim {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: transparent;
}
.tour-spotlight {
  position: fixed;
  z-index: 6001;
  pointer-events: none;
  border: 2px solid #ff788b;
  border-radius: 9px;
  box-shadow:
    0 0 0 100vmax #111821b8,
    0 0 0 5px #fff8;
  background: transparent;
}
.tour-card {
  box-sizing: border-box;
  position: fixed;
  z-index: 6002;
  width: min(340px, calc(100vw - 24px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 18px 55px #0006;
  font-size: 13px;
  line-height: 1.5;
}
.tour-card h2 {
  margin: 4px 24px 8px 0;
  font-size: 18px;
  line-height: 1.25;
}
.tour-card p {
  margin: 0 0 14px;
  color: var(--muted);
}
.tour-progress {
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.tour-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}
.tour-close:hover {
  background: var(--soft-red);
  color: var(--brand);
}
.tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.tour-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
}
.tour-actions button:last-child {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.tour-actions button:disabled {
  opacity: 0.4;
}
html[data-theme="dark"] .tour-card {
  background: var(--surface-raised);
}
