:root {
  color-scheme: dark;
  --bg: #061118;
  --panel: #0d1e27;
  --panel2: #102a35;
  --line: #18e5d4;
  --line-soft: rgba(24,229,212,.18);
  --border: #294d60;
  --text: #f4f7fa;
  --muted: #8fb5c4;
  --accent: #39bfff;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(0,196,255,.08), transparent 35%),
    linear-gradient(180deg, #061118, #08151c);
}

.topbar {
  height: 58px;
  padding: 8px 14px;
  border-bottom: 2px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #071218;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 { margin: 0; font-size: 20px; }
.subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }

.status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.topbar-actions select, .header-button, .management-search, .timetable-meta input, .timetable-row input {
  min-height: 32px; padding: 5px 11px; border: 1px solid #426174; border-radius: 999px; background: #10242d; color: #fff; font: inherit;
}
.topbar-actions select { min-width: 210px; font-weight: 800; }
.header-button { cursor: pointer; font-weight: 800; background: linear-gradient(#71869a,#344451); }
.header-button:disabled { opacity: .45; cursor: default; }

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.dot-on { background: #20df75; color: #20df75; }
.dot-off { background: #df3b4f; color: #df3b4f; }
.client-count {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-width: 70px;
  text-align: center;
}

.layout {
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 10px;
  align-items: start;
}

.track-layout { min-width: 0; display: grid; grid-template-columns: minmax(520px,1.65fr) minmax(360px,1fr); gap: 10px; align-items: start; }
.track-layout .panel-left { grid-row: 1 / span 2; }
.track-layout .panel-right-top { grid-column: 2; grid-row: 1; }
.track-layout .panel-right-bottom { grid-column: 2; grid-row: 2; }

.sidebar { display: grid; gap: 10px; align-content: start; position: sticky; top: 68px; }
.side-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  background: linear-gradient(180deg, rgba(16,36,46,.98), rgba(6,17,23,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.side-card h2 { margin: 0 0 7px; padding-bottom: 7px; border-bottom: 1px solid rgba(143,181,196,.28); font-size: 16px; }
.vehicle-card-row {
  min-height: 27px; display: grid; grid-template-columns: 88px minmax(0,1fr);
  gap: 8px; align-items: center; border-bottom: 1px solid rgba(143,181,196,.15); font-size: 12px;
}
.vehicle-card-row span { color: #9bc7d8; }
.vehicle-card-row b { min-width: 0; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
#vehicleCardDue { display: grid; gap: 2px; padding: 4px 0; overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; }
#vehicleCardDue .vehicle-card-deadline-line { display: block; color: inherit; }
.status-pill {
  min-height: 20px; padding: 2px 8px; border: 1px solid #d7e4ed;
  border-radius: 999px; background: #e7eff6; color: #102033;
}
.side-button {
  width: 100%; min-height: 31px; margin-top: 8px; border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; color: #fff; font-weight: 800; cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 5px rgba(0,0,0,.35);
}
.side-button.primary { background: linear-gradient(#7398ca, #254d85); }
.side-button.secondary { background: linear-gradient(#a4b2c1, #364453); }
.side-button.danger { background: linear-gradient(#f16a78, #a51f31); }
.side-button:disabled { opacity: .45; cursor: default; }
.deadlines-list { display: grid; gap: 8px; }
.deadline-item {
  width: 100%; padding: 8px 9px; border: 1px solid #35515f; border-left: 5px solid #55c7ff;
  border-radius: 7px; background: #09171d; color: #fff; font-size: 13px; font-weight: 800;
  text-align: left; cursor: pointer;
}
.deadline-item.bba { border-left-color: #facc15; }
.deadline-item.bfa { border-left-color: #3b82f6; }
.deadline-item.bbi { border-left-color: #22c55e; }
.muted { color: var(--muted); font-size: 12px; }
.search-dialog {
  width: min(380px, calc(100vw - 28px)); border: 1px solid var(--border); border-radius: 12px;
  background: #0d1e27; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.65);
}
.search-dialog::backdrop { background: rgba(0,7,11,.72); }
.search-dialog h2 { margin-top: 0; }
.search-dialog label { display: block; margin-bottom: 6px; color: var(--muted); }
.search-dialog input {
  width: 100%; padding: 10px; border: 1px solid #426174; border-radius: 8px;
  background: #071218; color: #fff; font-size: 16px;
}
.search-message { min-height: 18px; color: #ffadb7; font-size: 12px; }
.management-dialog {
  width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 30px); border: 1px solid var(--border); border-radius: 12px;
  background: #0d1e27; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.65); overflow: auto;
}
.management-dialog::backdrop { background: rgba(0,7,11,.72); }
.wide-dialog { width: min(1040px, calc(100vw - 28px)); }
.overview-dialog { width: min(1260px, calc(100vw - 22px)); }
.management-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; border-bottom: 1px solid #385268; padding-bottom: 10px; }
.management-header h2, .management-header p { margin: 0; }
.management-header p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.management-tile { min-height: 74px; padding: 12px; border: 1px solid #385268; border-radius: 10px; background: #10242d; color: #fff; text-align: left; cursor: pointer; }
.management-tile b, .management-tile span { display: block; }
.management-tile span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.overview-header-actions { display: flex; gap: 8px; }
.overview-summary-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 16px 0; }
.overview-summary-card {
  min-height: 92px; display: grid; grid-template-columns: 48px auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px;
  padding: 16px 20px; border: 1px solid #385d72; border-radius: 10px; background: linear-gradient(135deg,#132d38,#0d2028); color: #dbeaf0;
}
.overview-summary-card .overview-card-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid #a5d5e7; border-radius: 12px; color: #a5d5e7; font-size: 25px; }
.overview-summary-card > strong { align-self: end; font-size: 32px; line-height: 1; color: #fff; }
.overview-summary-card > span:last-of-type { align-self: start; font-size: 13px; }
.overview-defect-card { border-color: #8a4b2d; }
.overview-defect-card .overview-card-icon { border-color: #ff7543; color: #ff7543; }
.overview-deadline-card { border-color: #887026; }
.overview-deadline-card .overview-card-icon { border-color: #facc15; color: #facc15; border-radius: 50%; }
.overview-mini-counts { grid-column: 2 / 4; display: flex; gap: 7px; margin-top: 6px; }
.overview-mini-counts b { padding: 3px 9px; border: 1px solid #b84a2e; border-radius: 6px; background: #351c17; font-size: 10px; }
.overview-table-wrap { overflow: auto; border: 1px solid #35566a; border-radius: 10px; background: #09181f; }
.overview-table { width: 100%; min-width: 1030px; border-collapse: collapse; color: #e7f1f5; font-size: 12px; }
.overview-table th, .overview-table td { padding: 9px 7px; border-right: 1px solid #294c5d; border-bottom: 1px solid #294c5d; text-align: center; }
.overview-table thead th { color: #bdd4dd; font-size: 10px; text-transform: uppercase; }
.overview-table thead .overview-group-head th { padding: 10px 7px 5px; color: #fff; font-size: 11px; }
.overview-table tr:last-child > * { border-bottom: 0; }
.overview-table tr > *:last-child { border-right: 0; }
.overview-area-name { min-width: 160px; text-align: left !important; text-transform: none; }
.overview-area-name span { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 8px; border: 1px solid #58798d; border-radius: 50%; color: #9ecde0; }
.overview-area-name b { display: inline-block; max-width: 115px; vertical-align: middle; }
.overview-count { display: inline-flex; min-width: 33px; min-height: 27px; align-items: center; justify-content: center; border: 1px solid #426a82; border-radius: 6px; background: #102c39; color: #fff; font-size: 14px; }
.overview-count.main { min-width: 42px; background: linear-gradient(#3f82b9,#174e78); border-color: #62a9dc; font-size: 18px; }
.overview-count.alert { background: linear-gradient(#bd4c2a,#7b2516); border-color: #e6784d; }
.overview-table td small { display: block; max-width: 135px; margin: 4px auto 0; color: #b6c9d1; font-size: 9px; overflow-wrap: anywhere; }
.overview-deadlines { min-width: 235px; }
.overview-deadline-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; }
.overview-deadline { display: block; min-width: 0; padding: 4px 2px; border: 1px solid #587589; border-radius: 5px; background: #17313b; color: #fff; font-size: 9px; font-weight: 900; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-deadline.bba { background: #facc15; color: #111827; }
.overview-deadline.bfa { background: #2563eb; }
.overview-deadline.bbi { background: #22c55e; color: #06210f; }
.print-frame { position: fixed; width: 1px; height: 1px; right: 0; bottom: 0; border: 0; opacity: 0; pointer-events: none; }
.danger-tile { border-color: #a93d4a; background: #35141b; }
.sap-damage-dialog { width: min(1220px, calc(100vw - 22px)); }
.sap-history-dialog { width: min(1220px, calc(100vw - 22px)); }
.sap-history-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 10px; align-items: start; margin-bottom: 10px; }
.sap-history-toolbar .management-search { margin: 0; }
.sap-history-toolbar .side-button { width: auto; min-width: 210px; margin: 0; }
.sap-history-empty { margin: 12px 0 0; padding: 16px; border: 1px solid #35566a; border-radius: 8px; color: #b7ccd5; text-align: center; }
.sap-damage-hint { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #36566a; border-radius: 8px; background: #10242d; color: #c7dce5; font-size: 12px; }
.sap-damage-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.sap-damage-toolbar > div { display: flex; gap: 7px; }
.sap-damage-toolbar strong { color: #dbeaf0; font-size: 13px; }
.sap-damage-table-wrap { max-height: 58vh; overflow: auto; border: 1px solid #35566a; border-radius: 9px; background: #09171d; }
.sap-damage-table { width: 100%; min-width: 1000px; border-collapse: collapse; color: #e8f1f5; font-size: 12px; }
.sap-damage-table th { position: sticky; top: 0; z-index: 1; padding: 8px; border-bottom: 1px solid #426174; background: #17313e; color: #bcd3dd; text-align: left; font-size: 10px; text-transform: uppercase; }
.sap-damage-table td { padding: 8px; border-right: 1px solid #244657; border-bottom: 1px solid #244657; vertical-align: top; }
.sap-damage-table td:first-child { width: 70px; text-align: center; }
.sap-damage-table td:nth-child(2) { width: 80px; }
.sap-damage-table td:nth-child(3) { width: 105px; }
.sap-damage-table td:nth-child(4) { width: 145px; white-space: nowrap; }
.sap-damage-table td:nth-child(5) { width: 75px; font-weight: 900; }
.sap-damage-table td:last-child { max-width: 290px; color: #b9ced7; }
.sap-damage-table td small { display: block; margin-top: 3px; color: #9fb9c4; font-size: 10px; }
.sap-damage-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: #3b82f6; }
.sap-damage-table tr.sap-damage-unmatched { background: rgba(126,34,45,.28); }
.sap-damage-table tr.sap-damage-duplicate { opacity: .58; }
.sap-damage-table tr.sap-damage-closed { background: rgba(74,85,104,.2); color: #b5c5cc; }
.sap-history-table td:first-child { width: 80px; text-align: left; }
.sap-history-table td:nth-child(2) { width: 105px; }
.sap-history-table td:nth-child(3) { width: 145px; white-space: nowrap; }
.sap-history-table td:nth-child(4) { width: 75px; font-weight: 900; }
.sap-history-table td:nth-child(5) { width: auto; }
.sap-history-table td:nth-child(6) { width: 80px; }
.sap-history-table td:nth-child(7) { width: 145px; white-space: nowrap; }
.management-search { width: 100%; margin-bottom: 10px; border-radius: 8px; }
.vehicle-list-toolbar { display: grid; grid-template-columns: auto minmax(240px,1fr); gap: 10px; align-items: start; }
.vehicle-type-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vehicle-filter-divider { width: 1px; height: 24px; margin: 0 3px; background: #426174; opacity: .85; }
.vehicle-type-filters button {
  min-height: 32px; padding: 5px 14px; border: 1px solid #426174; border-radius: 999px;
  background: #10242d; color: #dceaf0; font-weight: 900; cursor: pointer;
}
.vehicle-type-filters button.active { border-color: #55c7ff; background: linear-gradient(#447fb0,#1d4e78); color: #fff; box-shadow: 0 0 0 2px rgba(85,199,255,.18); }
.vehicle-group-list { gap: 12px; }
.vehicle-list-group { display: grid; gap: 6px; }
.vehicle-list-group h3 { margin: 0; padding: 7px 10px; border-radius: 7px; background: linear-gradient(90deg,rgba(35,78,110,.55),rgba(21,92,79,.4)); font-size: 14px; }
.vehicle-list-group h3 span { margin-left: 5px; color: var(--muted); font-size: 11px; }
.vehicle-list-group-rows { display: grid; gap: 6px; }
.vehicle-type-cell { display: grid; justify-items: start; gap: 1px; line-height: 1.05; }
.vehicle-type-cell small { color: #b9d1dc; font-size: 11px; font-weight: 800; }
.data-list { display: grid; gap: 6px; max-height: 65vh; overflow: auto; }
.data-row { display: grid; grid-template-columns: 80px 90px minmax(120px,.8fr) minmax(190px,1.25fr) minmax(170px,1.1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #294d60; border-radius: 8px; background: #09171d; font-size: 13px; }
.data-row button { width: auto; margin: 0; justify-self: end; }
.vehicle-list-deadlines { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); }
.vehicle-list-deadline { display: inline-block; padding: 2px 7px; border: 1px solid #557182; border-radius: 999px; background: #17313b; color: #fff; font-size: 11px; font-weight: 900; white-space: nowrap; }
.vehicle-list-deadline.bba { border-color: #ffe46a; background: #facc15; color: #111827; }
.vehicle-list-deadline.bfa { border-color: #75a7ff; background: #2563eb; color: #fff; }
.vehicle-list-deadline.bbi { border-color: #86efac; background: #22c55e; color: #06210f; }
.timetable-dialog { width: min(1280px, calc(100vw - 18px)); max-height: calc(100vh - 18px); padding: 10px; background: var(--panel); border-color: var(--border); }
body.timetable-window { min-width: 0; overflow: hidden; background: var(--panel); }
body.timetable-window > .topbar,
body.timetable-window > .layout,
body.timetable-window > footer { display: none !important; }
body.timetable-window .timetable-dialog[open] { inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 10px; border: 0; border-radius: 0; }
body.timetable-window .timetable-dialog > form { height: 100%; display: flex; flex-direction: column; min-height: 0; }
body.timetable-window .timetable-panels { flex: 1; min-height: 0; }
body.timetable-window .timetable-panel { min-height: 0; }
body.timetable-window .timetable-dialog::backdrop { background: var(--panel); }
.timetable-header { margin-bottom: 8px; padding: 4px 8px 9px; border-color: var(--border); }
.timetable-header h2 { color: #fff; text-shadow: 0 1px #000; }
.timetable-toolbar { display: grid; grid-template-columns: minmax(320px,1fr) minmax(190px,.34fr) minmax(150px,.25fr) auto; gap: 10px; align-items: end; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: #0b1b23; }
.timetable-toolbar label { display: grid; gap: 4px; color: #b8d4df; font-size: 12px; font-weight: 800; }
.timetable-toolbar select { min-width: 0; height: 35px; border: 1px solid var(--border); border-radius: 18px; padding: 0 12px; background: #09171e; color: #fff; font-weight: 800; }
.timetable-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.timetable-panel { min-width: 0; min-height: 555px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #091820; }
.timetable-panel h3 { margin: 0; padding: 8px 12px; background: linear-gradient(90deg,#20364b,#17332f); border-bottom: 1px solid var(--border); font-size: 14px; }
.timetable-panel h3 small { display: block; margin: 2px 0 0 25px; color: #67d8ce; font-size: 11px; }
.timetable-tools { position: relative; align-self: end; z-index: 5; }
.timetable-tools summary { min-height: 35px; display: flex; align-items: center; padding: 0 15px; border: 1px solid #58738f; border-radius: 9px; background: linear-gradient(#536679,#1a2935); color: #fff; font-weight: 900; cursor: pointer; list-style: none; white-space: nowrap; }
.timetable-tools summary::-webkit-details-marker { display: none; }
.timetable-tools-menu { position: absolute; top: calc(100% + 6px); right: 0; width: 285px; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); box-shadow: 0 14px 35px rgba(0,0,0,.6); }
.timetable-tools-menu button { min-height: 35px; padding: 7px 11px; border: 1px solid #486681; border-radius: 7px; background: linear-gradient(#425564,#182832); color: #fff; text-align: left; font-weight: 800; cursor: pointer; }
.timetable-tools-menu button:hover { border-color: var(--line); background: #143b3b; }
.timetable-tools-divider { height: 1px; margin: 2px 0; background: #45627a; }
.timetable-table-head, .timetable-row { display: grid; grid-template-columns: 105px 90px 80px 80px minmax(90px,1fr) minmax(90px,1fr); }
.timetable-table-head { background: #17362f; color: #fff; font-size: 12px; font-weight: 900; text-align: center; }
.timetable-table-head span { padding: 7px 3px; border-right: 1px solid var(--border); }
.timetable-rows { display: block; flex: 1; overflow: auto; }
.timetable-row { min-height: 29px; }
.timetable-row input { width: 100%; min-width: 0; height: 29px; padding: 3px 6px; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; background: #091820; color: #fff; text-align: center; font-weight: 700; }
.timetable-row input:focus { position: relative; outline: 2px solid var(--line); z-index: 1; }
.timetable-row.vehicle-linked input { background: #0d292b; }
.timetable-row.vehicle-linked input[data-field="track"] { box-shadow: inset 0 0 0 1px #38bdf8; color: #bfefff; }
.timetable-footer { justify-content: flex-end; align-items: center; gap: 10px; }
.timetable-footer > div { display: flex; align-items: center; gap: 8px; }
#timetableOperatingDate { color: #b9d9ff; font-size: 12px; }
.timetable-plans-dialog { width: min(1120px,calc(100vw - 24px)); }
.timetable-area-dialog { width: min(520px,calc(100vw - 24px)); padding: 18px 24px; }
.timetable-area-dialog p { color: #d7e3ea; font-weight: 800; line-height: 1.45; }
.timetable-area-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 18px; }
.timetable-area-buttons button { min-height: 35px; border: 1px solid #7d95ab; border-radius: 9px; background: linear-gradient(#718294,#263746); color: #fff; font-weight: 900; cursor: pointer; }
.timetable-plans-content { max-height: 68vh; overflow: auto; }
.timetable-plans-table { width: 100%; border-collapse: separate; border-spacing: 0 7px; font-size: 12px; }
.timetable-plans-table th { padding: 2px 8px; color: #9fd4d0; text-align: left; white-space: nowrap; }
.timetable-plans-table td { padding: 8px; background: #10252c; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.timetable-plans-table tr.active td { background: #16413f; border-color: #39a99f; }
.timetable-plans-table td:first-child { border-left: 1px solid var(--border); border-radius: 8px 0 0 8px; color: #62e3d8; font-weight: 900; }
.timetable-plans-table td:last-child { border-right: 1px solid var(--border); border-radius: 0 8px 8px 0; white-space: nowrap; }
.timetable-plans-table .file-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-use-button,.plan-delete-button { min-height: 29px; margin-left: 5px; padding: 4px 10px; border: 1px solid #557696; border-radius: 7px; background: #28465d; color: #fff; font-weight: 800; cursor: pointer; }
.plan-delete-button { border-color: #a93d4a; background: #511d29; }
.timetable-print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }

@media (max-width: 900px) {
  body.timetable-window { overflow: auto; }
  body.timetable-window .timetable-dialog[open] { min-width: 640px; overflow: auto; }
  body.timetable-window .timetable-toolbar { grid-template-columns: minmax(300px,1fr) minmax(170px,.45fr); }
  body.timetable-window .timetable-toolbar .timetable-plan-label { grid-column: 1 / -1; }
  body.timetable-window .timetable-panels { grid-template-columns: 1fr; overflow: visible; }
  body.timetable-window .timetable-panel { min-height: 420px; }
}

.vehicle-on-track.timetable-einsetzer { outline: 2px solid #38bdf8; outline-offset: 2px; box-shadow: 0 0 0 3px rgba(2,6,23,.92),0 0 18px rgba(56,189,248,.58),inset 0 1px 0 rgba(255,255,255,.78),inset 0 -10px 16px rgba(0,0,0,.18) !important; }
.timetable-einsetzer-badge { position:absolute; left:7px; bottom:1px; z-index:90; min-width:18px; height:16px; padding:1px 5px 0; border:1px solid rgba(255,255,255,.92); border-radius:999px; background:linear-gradient(180deg,#38bdf8,#0f5fa8); color:#fff; font-size:11px; line-height:14px; font-weight:950; text-align:center; text-shadow:0 1px 1px rgba(0,0,0,.65); box-shadow:0 2px 6px rgba(0,0,0,.42),0 0 10px rgba(56,189,248,.34); pointer-events:auto; }
.management-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.notice { position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translate(-50%,20px); padding: 10px 18px; border-radius: 999px; background: #173746; opacity: 0; pointer-events: none; transition: .2s; }
.notice.show { opacity: 1; transform: translate(-50%,0); }.notice.bad { background: #7f1d2d; }.notice.ok { background: #14532d; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.entry-dialog, .edit-dialog {
  width: min(430px, calc(100vw - 28px)); border: 1px solid var(--border); border-radius: 12px;
  background: #0d1e27; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.65);
}
.entry-dialog, .edit-dialog, .search-dialog { background: #0d1e27; }
.edit-dialog { width: min(580px, calc(100vw - 28px)); }
.entry-dialog::backdrop, .edit-dialog::backdrop { background: rgba(0,7,11,.72); }
.entry-dialog h2, .edit-dialog h2 { margin: 0 0 8px; }
.dialog-hint { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.entry-dialog label, .edit-dialog label { display: grid; gap: 6px; color: #b8d4df; font-size: 12px; font-weight: 700; }
.entry-dialog input, .edit-dialog input, .edit-dialog select, .edit-dialog textarea {
  width: 100%; padding: 10px; border: 1px solid #426174; border-radius: 8px;
  background: #071218; color: #fff; font: inherit;
}
.entry-dialog input { margin-top: 6px; font-size: 22px; font-weight: 900; letter-spacing: .06em; }
.closure-dialog textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #426174; border-radius: 8px; background: #071218; color: #fff; font: inherit; resize: vertical; }
.closure-dialog textarea:disabled { opacity: .45; }
.closure-dialog .closure-switch { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 11px 12px; border: 1px solid #70404a; border-radius: 9px; background: #261219; color: #fff; font-size: 14px; }
.closure-dialog .closure-switch input { width: 20px; height: 20px; margin: 0; padding: 0; accent-color: #ef3340; }
.closure-sections { display: grid; gap: 10px; }
.closure-section-editor { padding: 10px; border: 1px solid #385268; border-radius: 9px; background: #0a1820; }
.closure-section-editor .closure-switch { margin: 0 0 9px; }
.closure-dialog .closure-reason { margin-top: 5px; padding: 8px 9px; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.remove-warning { padding: 9px 10px; border: 1px solid #6f5360; border-radius: 8px; background: #26171d; color: #f1cbd2; font-size: 12px; }
.edit-dialog select { min-height: 39px; }
.edit-dialog textarea { resize: vertical; }
.edit-grid { display: grid; gap: 12px; }
.edit-grid .check-label { display: flex; align-items: center; gap: 8px; }
.edit-grid .check-label input { width: 18px; height: 18px; padding: 0; }
.form-message { min-height: 20px; margin: 8px 0 0; color: #ffadb7; font-size: 12px; font-weight: 700; }
.edit-actions { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 8px; align-items: end; }

/* Fahrzeugbearbeitung */
.edit-dialog {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0;
  overflow: hidden; background: #0d1e27; border-color: #385268;
}
.edit-dialog form { display: grid; grid-template-rows: auto minmax(0,1fr); max-height: calc(100vh - 26px); }
.edit-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid #405268; background: #0d1e27;
}
.edit-header h2 { margin: 0; font-size: 22px; }
.edit-header p { margin: 4px 0 0; color: #c4cfdf; font-size: 13px; font-weight: 700; }
.edit-body { padding: 13px 16px 16px; overflow-y: auto; display: grid; gap: 12px; background: #0d1e27; }
.edit-section {
  padding: 12px; border: 1px solid #35445a; border-radius: 13px;
  background: rgba(5,14,20,.24); display: grid; gap: 10px;
}
.edit-section h3 { margin: 0; font-size: 16px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.section-heading small { color: #9ba9bd; font-weight: 700; }
.status-section { max-width: 710px; }
.status-options { display: flex; flex-wrap: wrap; gap: 7px; }
.edit-dialog .status-options label {
  width: auto; min-width: 122px; min-height: 35px; padding: 7px 9px; display: inline-flex;
  flex-direction: row; justify-content: space-between; align-items: center; gap: 9px;
  border: 1px solid #35445a; border-radius: 9px; background: #101827; color: #e8edf5; cursor: pointer;
}
.edit-dialog .status-options label:nth-child(3) { min-width: 185px; }
.edit-dialog .status-options input[type="radio"] { width: 15px; height: 15px; margin: 0; padding: 0; flex: 0 0 auto; }
.current-action-row { display: grid; grid-template-columns: minmax(190px,1.2fr) auto 30px 90px auto; gap: 9px; align-items: end; }
.action-preview-label { padding-bottom: 10px; color: #b8d4df; font-size: 12px; font-weight: 700; }
.action-swatch { width: 30px; height: 30px; margin-bottom: 4px; border: 1px solid #d5dbe5; border-radius: 7px; background: #64748b; }
.action-vehicle-preview {
  min-width: 88px; height: 28px; margin-bottom: 5px; padding: 5px 10px; border: 1px solid #e4e9ef;
  border-radius: 999px; background: #64748b; color: #fff; text-align: center; font-weight: 900; line-height: 16px;
  text-shadow: 0 1px 2px #000;
}
.editor-list { padding: 8px; min-height: 41px; border: 1px solid #35445a; border-radius: 10px; background: #0c1423; display: grid; gap: 6px; }
.editor-list.empty-list { color: #c4cfdf; font-weight: 700; }
.editor-list-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 5px 7px; border: 1px solid #334157; border-radius: 9px; background: #11192a; }
.editor-list-row.action-row { grid-template-columns: 30px minmax(150px,1fr) auto; }
.editor-list-row input[type="color"] { width: 30px; height: 28px; padding: 1px; }
.editor-list-row input[type="text"] { padding: 7px 8px; }
.list-delete { min-height: 28px; padding: 4px 12px; margin: 0; width: auto; }
.action-add-row { display: grid; grid-template-columns: minmax(170px,1fr) 72px auto; gap: 8px; align-items: center; }
.action-manager { display: grid; gap: 8px; }
.action-manager[hidden] { display: none; }
.current-action-row > button { white-space: nowrap; margin-bottom: 4px; }
.defect-add-row { display: grid; grid-template-columns: minmax(210px,1fr) minmax(170px,1fr) auto; gap: 8px; align-items: center; }
.deadline-add-row { display: grid; grid-template-columns: .65fr .65fr 1fr .8fr auto; gap: 8px; align-items: end; }
.compact-button { width: auto; min-height: 31px; margin: 0; padding: 4px 13px; }
.edit-dialog input[type="color"] { padding: 2px; }
.edit-dialog input[type="date"], .edit-dialog input[type="time"] { color-scheme: dark; }

@media (max-width: 720px) {
  .current-action-row, .defect-add-row, .deadline-add-row { grid-template-columns: 1fr; }
  .action-preview-label { padding: 0; }
  .action-add-row { grid-template-columns: 1fr 60px; }
  .action-add-row button { grid-column: 1 / -1; }
  .edit-actions { grid-template-columns: 1fr 1fr; }
  .edit-actions span { display: none; }
}
@media (max-width: 900px) {
  .topbar { height: auto; align-items: flex-start; }
  .topbar-right { align-items: flex-end; flex-direction: column; gap: 5px; }
  .status-wrap { display: none; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .settings-grid { grid-template-columns: 1fr; }
  .timetable-toolbar, .timetable-panels { grid-template-columns: 1fr; }
  .timetable-panel { min-height: 390px; }
  .vehicle-list-toolbar { grid-template-columns: 1fr; }
}

.panel {
  border: 1px solid var(--border);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18,43,54,.96), rgba(7,19,25,.96));
  overflow: hidden;
}

.panel-title {
  margin: 8px;
  padding: 8px 12px;
  text-align: center;
  font-weight: 800;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(35,78,110,.55), rgba(21,92,79,.4));
  position: relative;
}
.facility-vf_gh_ot .panel-title::before,
.facility-ochsenzoll .panel-title::before { content: "← Bahnsteig"; position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: #8fb5c4; font-size: 10px; font-weight: 700; }
.facility-ochsenzoll .panel-right-top .panel-title::after { content: "Abstellung →"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: #8fb5c4; font-size: 10px; font-weight: 700; }
.panel-summary { min-height: 22px; padding: 2px 10px 7px; color: #9bd1d9; text-align: right; font-size: 11px; font-weight: 900; }

.tracks { padding: 2px 8px 8px; }

.track-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px 42px 1fr 66px;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  transition: background-color .14s ease, box-shadow .14s ease;
}

.track-row:not(.track-closed):hover {
  background: rgba(39, 126, 190, .13);
  box-shadow: inset 0 0 20px rgba(76, 166, 231, .08);
}
.track-row.track-closed:hover {
  background: rgba(138, 32, 49, .1);
}

.signal {
  width: 16px;
  height: 34px;
  border: 1px solid #263f4b;
  border-radius: 10px;
  background: #02070a;
  display: grid;
  place-items: center;
}
.signal::after {
  content: "";
  width: 7px;
  height: 14px;
  border-radius: 999px;
  background: #1fd36b;
  box-shadow: 0 0 7px #1fd36b;
}
.signal.signal-yellow::after { background: #f0d21c; box-shadow: 0 0 7px #f0d21c; }
.signal.signal-red::after { background: #ef3340; box-shadow: 0 0 7px #ef3340; }

.track-id {
  height: 34px;
  border: 1px solid #4e6d80;
  border-radius: 7px;
  background: linear-gradient(#18304a, #0b1623);
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.track-row.track-closed .track-id { border-color: #ff6b78; background: linear-gradient(#6d1f2b,#2d0d14); color: #fff; box-shadow: 0 0 8px rgba(255,72,91,.35); }
.track-row.track-closed .track-line {
  border-color: #c94350;
}
.track-closure-label {
  position: absolute; top: 0; bottom: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 0 8px;
  color: #fff; font-size: 11px; font-weight: 950; letter-spacing: .05em; text-align: center; text-shadow: 0 1px 2px #000;
  background: repeating-linear-gradient(45deg,rgba(173,28,44,.68) 0 9px,rgba(74,8,18,.7) 9px 18px); pointer-events: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.track-section-divider { position: absolute; top: 0; bottom: 0; z-index: 75; width: 3px; transform: translateX(-1.5px); background: #d6b83c; box-shadow: 0 0 4px rgba(214,184,60,.7); pointer-events: none; }
.track-row.track-closed .vehicle-on-track { z-index: 90; opacity: .78; }

.track-line {
  position: relative;
  height: 32px;
  border: 1px solid #2c4d5b;
  border-radius: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 19px, var(--line-soft) 20px 21px),
    linear-gradient(180deg, #051017, #06151b);
  cursor: pointer;
}

.track-line::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--line);
  box-shadow: 0 0 8px rgba(24,229,212,.45);
}

.vehicle-on-track {
  position: absolute;
  top: 5px;
  z-index: 4;
  height: 20px;
  padding: 0 1px;
  overflow: visible;
  border: 1px solid #d9e6ef;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #bbc8d5);
  color: #071118;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vehicle-number { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vehicle-on-track.type-dt46 .vehicle-number { font-weight: 900; }
.vehicle-on-track.type-work { min-width: 30px; background: linear-gradient(180deg,#e0b56b,#8b5b22); color: #111; font-weight: 800; }
.vehicle-on-track.dragging { opacity: .55; }
.vehicle-on-track.couple-target { outline: 3px solid #facc15; outline-offset: 1px; filter: brightness(1.12); }
.track-line.dragover { outline: 3px dashed #55c7ff; outline-offset: 2px; }
.coupling-badge {
  position: absolute; top: -4px; z-index: 7; padding: 0 2px; border: 1px solid #5c4800;
  border-radius: 999px; background: #ffd21f; color: #111; font-size: 6px; line-height: 8px;
  font-weight: 900; text-shadow: none; box-shadow: 0 1px 2px rgba(0,0,0,.45); pointer-events: none;
}
.coupling-badge.left { left: -4px; }
.coupling-badge.right { right: -4px; }
.deadline-badge {
  position: absolute; right: 1px; bottom: -6px; z-index: 8;
  max-width: calc(100% - 5px); padding: 0 5px; border: 1px solid rgba(255,255,255,.82);
  border-radius: 4px; font-size: 9px; line-height: 11px; font-weight: 900; text-shadow: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.deadline-badge.bba { background: #facc15; color: #111827; }
.deadline-badge.bfa { background: #2563eb; color: #fff; }
.deadline-badge.bbi { background: #22c55e; color: #06210f; }
.vehicle-on-track.selected { outline: 2px solid #55c7ff; outline-offset: 1px; }
.vehicle-on-track.status-defekt { background: linear-gradient(#ff8b97, #c92e42); color: #fff; }
.vehicle-on-track.status-graffiti { background: linear-gradient(#d98cff, #8f3db8); color: #fff; }
.vehicle-on-track.status-anforderung { background: linear-gradient(#ffe679, #d5a900); color: #111; }
.vehicle-on-track.status-werkstatt { background: linear-gradient(#79b9ff, #2865a8); color: #fff; }
.vehicle-on-track.status-reserve { background: linear-gradient(#ffb36b, #c46320); color: #fff; }

/* Farbregeln aus dem bisherigen Betriebshof, neu für Betriebshof2 umgesetzt. */
.vehicle-on-track.status-defekt {
  background: linear-gradient(180deg,#ff7a72,#f01717 48%,#9f0909); color:#fff;
}
.vehicle-on-track.status-graffiti {
  background: linear-gradient(180deg,#b772f0,#7b1fa2 50%,#451061); color:#fff;
}
.vehicle-on-track.status-defekt_graffiti,
.vehicle-on-track.status-defekt-graffiti {
  background: linear-gradient(135deg,#dc2626 0%,#dc2626 49.5%,#7c3aed 50.5%,#7c3aed 100%); color:#fff;
}
.vehicle-on-track.status-anforderung {
  background: linear-gradient(180deg,#69a9f7,#1565c0 50%,#0b376f); color:#fff;
}
.vehicle-on-track.status-werkstatt {
  background: linear-gradient(180deg,#ff9af1,#f064dc 52%,#c13db1); color:#fff;
}
.vehicle-on-track.status-reserve {
  background: linear-gradient(180deg,#ffc2c2,#ff8f8f 52%,#e35f5f); color:#3a0505; text-shadow:none;
}
.vehicle-on-track.deadline-today-bba { background:linear-gradient(180deg,#ffe34d,#facc15 48%,#b78300);color:#111827;text-shadow:none; }
.vehicle-on-track.deadline-today-bfa { background:linear-gradient(180deg,#2f7cff,#145ee8 48%,#083f9f);color:#fff; }
.vehicle-on-track.deadline-today-bbi { background:linear-gradient(180deg,#31d76a,#16a34a 48%,#08712f);color:#fff; }
.vehicle-on-track.deadline-soon-bba { background:linear-gradient(180deg,#fffde7,#fef3c7 55%,#fde68a);color:#0f172a;text-shadow:none; }
.vehicle-on-track.deadline-soon-bfa { background:linear-gradient(180deg,#dbeafe,#bfdbfe 55%,#93c5fd);color:#0f172a;text-shadow:none; }
.vehicle-on-track.deadline-soon-bbi { background:linear-gradient(180deg,#dcfce7,#bbf7d0 55%,#86efac);color:#0f172a;text-shadow:none; }

.status-pill.status-pill-list {
  padding:0; border:0; background:transparent; display:flex; justify-content:flex-end; gap:4px; overflow:visible;
}
.status-chip {
  display:inline-flex; align-items:center; justify-content:center; min-width:82px; min-height:20px; max-width:145px;
  padding:2px 7px; border:1px solid rgba(255,255,255,.52); border-radius:999px; color:#000;
  font-size:10px; font-weight:900; line-height:1.05; text-shadow:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 1px 3px rgba(0,0,0,.35);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.status-chip.status-bereit { background:#e8eef4;color:#0b1216;border-color:#fff;text-shadow:none; }
.status-chip.status-defekt { background:linear-gradient(180deg,#ff7a72,#f01717 48%,#9f0909); }
.status-chip.status-graffiti { background:linear-gradient(180deg,#b772f0,#7b1fa2 50%,#451061); }
.status-chip.status-defekt-graffiti { background:linear-gradient(135deg,#dc2626 0%,#dc2626 49.5%,#7c3aed 50.5%,#7c3aed 100%); }
.status-chip.status-anforderung { background:linear-gradient(180deg,#69a9f7,#1565c0 50%,#0b376f); }
.status-chip.status-werkstatt { background:linear-gradient(180deg,#ff9af1,#f064dc 52%,#c13db1); }
.status-chip.status-reserve { background:linear-gradient(180deg,#ffc2c2,#ff8f8f 52%,#e35f5f);color:#3a0505;text-shadow:none; }
.status-chip.deadline-bba { background:linear-gradient(180deg,#fff7a8,#facc15);color:#111827;text-shadow:none; }
.status-chip.deadline-bfa { background:linear-gradient(180deg,#93c5fd,#2563eb); }
.status-chip.deadline-bbi { background:linear-gradient(180deg,#bbf7d0,#22c55e);color:#06210f;text-shadow:none; }

.deadline-list-summary { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.deadline-legend { display: flex; gap: 7px; align-items: center; }
.deadline-legend button {
  display: inline-flex; min-width: 54px; min-height: 24px; align-items: center; justify-content: center;
  padding: 2px 12px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; color: #071118; font-size: 11px; font-weight: 900;
  cursor: pointer; opacity: .72; transition: opacity .12s, box-shadow .12s, transform .12s;
}
.deadline-legend button:hover { opacity: 1; }
.deadline-legend button.active { opacity: 1; box-shadow: 0 0 0 3px rgba(255,255,255,.28); transform: translateY(-1px); }
.deadline-legend .bba { background: #facc15; }
.deadline-legend .bfa { background: #3b82f6; color: #fff; }
.deadline-legend .bbi { background: #22c55e; }
.deadline-filter-empty { margin: 8px 0 0; padding: 14px; border: 1px solid #294d60; border-radius: 8px; color: var(--muted); text-align: center; }
.deadline-table { width: 100%; border-collapse: separate; border-spacing: 0 5px; color: var(--text); font-size: 13px; }
.deadline-table th { padding: 5px 9px; color: #a9c4d0; text-align: left; font-size: 11px; text-transform: uppercase; }
.deadline-table td { padding: 9px; border-top: 1px solid #294d60; border-bottom: 1px solid #294d60; background: #09171d; }
.deadline-table td:first-child { border-left: 5px solid #35515f; border-radius: 7px 0 0 7px; font-weight: 900; }
.deadline-table td:last-child { border-right: 1px solid #294d60; border-radius: 0 7px 7px 0; }
.deadline-table .deadline-row-bba td:first-child { border-left-color: #facc15; }
.deadline-table .deadline-row-bfa td:first-child { border-left-color: #3b82f6; }
.deadline-table .deadline-row-bbi td:first-child { border-left-color: #22c55e; }
.deadline-delete-button {
  min-height: 25px; padding: 3px 10px; border: 1px solid #ab4350; border-radius: 999px;
  background: linear-gradient(#7e3540,#47151d); color: #fff; font-size: 11px; font-weight: 800; cursor: pointer;
}
.import-auto-message {
  position: fixed; left: 50%; top: 82px; z-index: 50000; transform: translateX(-50%);
  width: min(520px, calc(100vw - 32px)); padding: 16px 18px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px; background: #17232b; color: #fff; white-space: pre-line; font-size: 14px; line-height: 1.4;
  box-shadow: 0 18px 48px rgba(0,0,0,.62); opacity: 1; transition: opacity .25s ease;
}
.import-auto-message.bad { border-color: #d15a68; background: #3a1b22; }
.import-auto-message.closing { opacity: 0; }

#vehicleCardNote { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:4px; white-space:normal; overflow:visible; }
.vehicle-card-note-action {
  display:inline-flex; align-items:center; justify-content:center; min-height:20px; max-width:145px;
  padding:3px 7px 4px; border:1px solid rgba(255,255,255,.82); border-radius:999px;
  color:#000; font-size:10px; font-weight:900; line-height:1.1; text-shadow:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 1px 4px rgba(0,0,0,.30);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.vehicle-card-row .status-chip,
.vehicle-card-row .vehicle-card-note-action { color:#000; -webkit-text-fill-color:#000; text-shadow:none; }

.track-row.entry-target .track-id,
.track-row.entry-target .track-line { outline: 2px solid #55c7ff; outline-offset: 1px; }

.walkway {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(45deg, #f0c928 0 7px, #131313 7px 14px);
  border-left: 2px solid #ffe04c;
  border-right: 2px solid #ffe04c;
}
.platform-area {
  position: absolute; z-index: 0; height: 19px; border: 1px solid rgba(185,193,200,.2);
  background-color: #596067;
  background-image: repeating-linear-gradient(0deg,transparent 0 5px,rgba(210,216,222,.18) 5px 6px),repeating-linear-gradient(90deg,transparent 0 7px,rgba(210,216,222,.18) 7px 8px);
  pointer-events: none;
}
.platform-area.above { top: -38px; }.platform-area.below { bottom: -38px; }

body.facility-vf_gh_ot .track-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: stretch; }
body.facility-vf_gh_ot .track-layout .panel-left { grid-column: 1; grid-row: 1; }
body.facility-vf_gh_ot .track-layout .panel-right-top { grid-column: 2; grid-row: 1; }
body.facility-vf_gh_ot .track-layout .panel-right-bottom { grid-column: 1 / span 2; grid-row: 2; border-left-color: #d6d83c; }
body.facility-vf_gh_ot .panel-right-top { border-left-color: #d6b83c; }
body.facility-vf_gh_ot .panel-left .track-row,
body.facility-vf_gh_ot .panel-right-top .track-row { min-height: 98px; }
body.facility-vf_gh_ot .panel-right-bottom .track-row { min-height: 146px; }
body.facility-vf_gh_ot .panel-right-bottom .track-row:nth-child(2) { transform: translateY(-59px); margin-bottom: -59px; }
body.facility-vf_gh_ot .panel-right-bottom .track-line { overflow: visible; }

body.facility-ochsenzoll .track-layout { grid-template-columns: minmax(0,1fr); }
body.facility-ochsenzoll .track-layout .panel-left,
body.facility-ochsenzoll .track-layout .panel-right-top { grid-column: 1; grid-row: auto; }

.length-box {
  height: 36px;
  border: 1px solid #3b6280;
  border-radius: 7px;
  background: #12253a;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

footer {
  margin: 0 10px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}

.error-box {
  margin: 20px;
  padding: 14px;
  border: 1px solid #e65d6a;
  background: rgba(230,93,106,.12);
  border-radius: 8px;
}

@media (max-width: 1450px) {
  .layout { grid-template-columns: minmax(0,1fr) 270px; }
  .track-layout { grid-template-columns: minmax(500px,1.55fr) minmax(340px,1fr); }
}

@media (max-width: 1150px) {
  .layout { grid-template-columns: minmax(0,1fr) 280px; }
  .track-layout { grid-template-columns: 1fr; }
  .track-layout .panel-left, .track-layout .panel-right-top, .track-layout .panel-right-bottom,
  body.facility-vf_gh_ot .track-layout .panel-left, body.facility-vf_gh_ot .track-layout .panel-right-top, body.facility-vf_gh_ot .track-layout .panel-right-bottom { grid-column: 1; grid-row: auto; }
  body.facility-vf_gh_ot .panel-left .track-row, body.facility-vf_gh_ot .panel-right-top .track-row { min-height: 70px; }
}

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .track-layout, .sidebar { grid-column: 1; grid-row: auto; }
  .sidebar { position: static; }
  .overview-summary-cards, .settings-grid { grid-template-columns: 1fr; }
  .overview-header { align-items: flex-start; }
  .overview-header-actions { flex-direction: column; }
  .sap-history-toolbar { grid-template-columns: 1fr; }
  .sap-history-toolbar .side-button { width: 100%; }
  .edit-actions { grid-template-columns: 1fr 1fr; }
  .edit-actions span { display: none; }
}

.vehicle-type-filters button.vehicle-status-filter.active { box-shadow: 0 0 0 2px rgba(255,255,255,.13); }
.vehicle-type-filters button.status-defekt-filter.active { border-color: #ef6b6b; background: linear-gradient(#9c3f45,#65272c); }
.vehicle-type-filters button.status-graffiti-filter.active { border-color: #e2bc58; background: linear-gradient(#8a6d27,#5c4719); }
