/* portal.css - Design-System-Kern (#9) = ARMSTARK-CI (dunkel + rote Akzente).
   EINE Quelle der Wahrheit: css/armstark.css wurde 2026-06-11 hier ZUSAMMENGEFUEHRT
   (Teil 1 = CI-Tokens/-Basis/-Komponenten 1:1; Teil 2 = Board-Komponenten auf Tokens).
   Aenderungen hier -> assets/tools/publish-css.sh -> Generator-Lauf zieht neuen Hash.
   Hinweis: Spalten-/Datenfarb-Familien der Boards (sec-/hdr-/tot-*) sind SEMANTIK,
   keine CI - sie bleiben bewusst farbig (eigene bg+fg-Paare, lesbar auf dunkel). */

/* ===== Teil 1: Armstark-CI (ehem. css/armstark.css, unveraendert) =================== */
@charset "UTF-8";
:root {
  --ar-red: #BC2222;
  --ar-red-bright: #d62f2f;
  --ar-grey: #575756;
  --ar-grey-light: #DADAD9;
  --ar-white: #FFFFFF;
  --ar-on-accent: #FFFFFF;
  --ar-bg: #181818;
  --ar-header-bg: #111111;
  --ar-surface: #242424;
  --ar-surface-2: #2f2f2f;
  --ar-line: #3a3a3a;
  --ar-line-strong:#4a4a4a;
  --ar-text: #f2f2f2;
  --ar-text-muted: #a8a8a8;
  --ar-ink: #f2f2f2;
  --ar-ink-muted: #a8a8a8;
  --ar-ok: #4caf50;
  --ar-warn: #e8842b;
  --ar-danger: #e05545;
  --ar-info: #4a90d9;
  --ar-font: Helvetica Neue, Helvetica, Arial, sans-serif;
  --ar-font-mono: Consolas, Courier New, monospace;
  --ar-radius: 8px;
  --ar-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

/* ===== Light/Dark-Theming (werterhaltend: Dark == bisherige Hardcodes) =========== */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ar-bg:#F2F2F2; --ar-surface:#FFFFFF; --ar-surface-2:#E4E4E3;
    --ar-header-bg:#FFFFFF; --ar-line:#DADAD9; --ar-line-strong:#C4C4C3;
    --ar-text:#181818; --ar-text-muted:#575756; --ar-ink:#181818; --ar-ink-muted:#575756;
    --ar-red-bright:#A91D1D; --ar-shadow:0 2px 8px rgba(0,0,0,0.15);
  }
}
[data-theme="light"] {
  --ar-bg:#F2F2F2; --ar-surface:#FFFFFF; --ar-surface-2:#E4E4E3;
  --ar-header-bg:#FFFFFF; --ar-line:#DADAD9; --ar-line-strong:#C4C4C3;
  --ar-text:#181818; --ar-text-muted:#575756; --ar-ink:#181818; --ar-ink-muted:#575756;
  --ar-red-bright:#A91D1D; --ar-shadow:0 2px 8px rgba(0,0,0,0.15);
}
[data-theme="dark"] {
  --ar-bg:#181818; --ar-surface:#242424; --ar-surface-2:#2f2f2f;
  --ar-header-bg:#111111; --ar-line:#3a3a3a; --ar-line-strong:#4a4a4a;
  --ar-text:#f2f2f2; --ar-text-muted:#a8a8a8; --ar-ink:#f2f2f2; --ar-ink-muted:#a8a8a8;
  --ar-red-bright:#d62f2f; --ar-shadow:0 2px 8px rgba(0,0,0,0.55);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ar-text);
  background: var(--ar-bg);
}

body.is-app {
  overflow: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ar-text);
  line-height: 1.25;
}

h1 {
  font-size: 18px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

a {
  color: var(--ar-red);
  text-decoration: none;
}

a:hover {
  color: var(--ar-red-bright);
  text-decoration: underline;
}

p {
  margin: 0 0 12px;
}

small, .text-sm {
  font-size: 12px;
}

.text-muted {
  color: var(--ar-text-muted);
}

.text-num, td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--ar-line-strong);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgb(104.6, 104.6, 104.6);
}

.header,
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--ar-header-bg);
  color: var(--ar-text);
  border-bottom: 3px solid var(--ar-red);
  box-shadow: var(--ar-shadow);
  position: relative;
  z-index: 1000;
}
.header h1,
.app-header h1 {
  color: var(--ar-red);
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.02em;
}
.header .title,
.app-header .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ar-red);
}
.header .sub, .header .meta,
.app-header .sub,
.app-header .meta {
  font-size: 12px;
  color: var(--ar-text-muted);
}
.header .stamp,
.app-header .stamp {
  font-size: 12px;
  color: var(--ar-text-muted);
  text-align: right;
  line-height: 1.4;
}

.main, .app-main {
  display: flex;
  height: calc(100vh - 56px);
}

.map, #map {
  flex: 1;
  min-width: 0;
}

.panel, .sidebar {
  width: 360px;
  background: var(--ar-surface);
  border-left: 1px solid var(--ar-line);
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.panel h2, .sidebar h2 {
  font-size: 14px;
  color: var(--ar-text);
  border-bottom: 2px solid var(--ar-red);
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.panel .section, .sidebar .section {
  margin-bottom: 16px;
}

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ar-text-muted);
  font-weight: 600;
  margin: 24px 0 12px;
}

.launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.launcher__card {
  display: block;
  background: var(--ar-surface);
  border: 1px solid var(--ar-line);
  border-radius: 14px;
  padding: 16px;
  color: var(--ar-text);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.launcher__card:hover {
  background: var(--ar-surface-2);
  border-color: var(--ar-red);
  transform: translateY(-2px);
  box-shadow: var(--ar-shadow);
  text-decoration: none;
}
.launcher__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ar-text);
  margin-bottom: 4px;
}
.launcher__path {
  font-size: 12px;
  color: var(--ar-text-muted);
  font-family: "Consolas", "Courier New", monospace;
  word-break: break-all;
}

.nav-link,
.plz-list-link {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ar-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover,
.plz-list-link:hover {
  background: var(--ar-red);
  color: var(--ar-on-accent);
  text-decoration: none;
}

.nav-link--block {
  border-radius: 4px;
  padding: 8px 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  border: 1px solid var(--ar-line-strong);
  border-radius: 4px;
  background: var(--ar-surface-2);
  color: var(--ar-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover {
  background: rgb(62.3, 62.3, 62.3);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 34, 34, 0.45);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--ar-red);
  border-color: var(--ar-red);
  color: var(--ar-on-accent);
}
.btn--primary:hover {
  background: var(--ar-red-bright);
  border-color: var(--ar-red-bright);
}

.btn--grey {
  background: var(--ar-grey);
  border-color: var(--ar-grey);
  color: var(--ar-on-accent);
}
.btn--grey:hover {
  background: rgb(107.5179190751, 107.5179190751, 106.2820809249);
}

.btn--ghost {
  background: transparent;
  border-color: var(--ar-red);
  color: var(--ar-red);
}
.btn--ghost:hover {
  background: rgba(188, 34, 34, 0.16);
  color: var(--ar-red-bright);
}

.btn--sm {
  padding: 4px 8px;
  font-size: 11px;
}

.filter-bar, .filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ar-line);
  margin-bottom: 8px;
}
.filter-bar button, .filterbar button {
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--ar-line-strong);
  border-radius: 4px;
  background: var(--ar-surface-2);
  color: var(--ar-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filter-bar button:hover, .filterbar button:hover {
  background: rgb(62.3, 62.3, 62.3);
}
.filter-bar button.active, .filterbar button.active {
  background: var(--ar-red);
  border-color: var(--ar-red);
  color: var(--ar-on-accent);
}

.data-table,
.tech-list table,
#stats table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ar-text);
}
.data-table th, .data-table td,
.tech-list table th,
.tech-list table td,
#stats table th,
#stats table td {
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid var(--ar-line);
  vertical-align: middle;
}
.data-table th,
.tech-list table th,
#stats table th {
  background: var(--ar-grey);
  color: var(--ar-on-accent);
  font-weight: 700;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover,
.tech-list table th:hover,
#stats table th:hover {
  background: rgb(107.5179190751, 107.5179190751, 106.2820809249);
}
.data-table td.num,
.tech-list table td.num,
#stats table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr:hover,
.tech-list table tbody tr:hover,
#stats table tbody tr:hover {
  background: rgba(188, 34, 34, 0.16);
  cursor: pointer;
}
.data-table tr.active,
.tech-list table tr.active,
#stats table tr.active {
  background: rgba(232, 132, 43, 0.18);
}
.data-table tr.neu, .data-table tr.is-new,
.tech-list table tr.neu,
.tech-list table tr.is-new,
#stats table tr.neu,
#stats table tr.is-new {
  background: rgba(232, 132, 43, 0.18);
}
.data-table tr.neu td:first-child::before,
.data-table tr.is-new td:first-child::before,
.tech-list table tr.neu td:first-child::before,
.tech-list table tr.is-new td:first-child::before,
#stats table tr.neu td:first-child::before,
#stats table tr.is-new td:first-child::before {
  content: "NEU ";
  color: var(--ar-warn);
  font-weight: 700;
  font-size: 10px;
}

.tech-list, .table-wrap {
  max-height: 360px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ar-line);
  border-radius: 4px;
}

.card {
  background: var(--ar-surface);
  border: 1px solid var(--ar-line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  margin-bottom: 12px;
}
.card h2 {
  margin-top: 0;
}
.card.hidden {
  display: none;
}

.stats, .stat-card, .summary {
  background: var(--ar-surface-2);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.stats .num, .stat-card .num, .summary .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--ar-red);
}
.stats b, .stat-card b, .summary b {
  color: var(--ar-text);
}

.kpi {
  background: var(--ar-surface);
  border: 1px solid var(--ar-line);
  border-radius: 14px;
  padding: 12px 16px;
}
.kpi__value, .kpi .v {
  display: block;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ar-text);
}
.kpi__label, .kpi .l {
  display: block;
  font-size: 12px;
  color: var(--ar-text-muted);
  margin-top: 4px;
}
.kpi--accent .v, .kpi.accent .v {
  color: var(--ar-red);
}
.kpi--ok .v, .kpi.green .v {
  color: var(--ar-ok);
}
.kpi--warn .v, .kpi.amber .v {
  color: var(--ar-warn);
}
.kpi--danger .v, .kpi.red .v {
  color: var(--ar-danger);
}

input, select, textarea {
  font: inherit;
}

.search-box, .plz-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.search-box input, .plz-search-box input {
  width: 230px;
  padding: 4px 12px;
  border: 1px solid var(--ar-line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ar-text);
  background: var(--ar-surface-2);
}
.search-box input::placeholder, .plz-search-box input::placeholder {
  color: #7d7d7d;
}
.search-box input:focus, .plz-search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 34, 34, 0.45);
  border-color: var(--ar-red);
}

.search-results, .plz-results {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  background: var(--ar-surface);
  color: var(--ar-text);
  border: 1px solid var(--ar-line);
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.65);
  max-height: 60vh;
  min-width: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  z-index: 1100;
}
.search-results.open, .plz-results.open {
  display: block;
}
.search-results .pr-item, .search-results .res-item, .plz-results .pr-item, .plz-results .res-item {
  padding: 4px 12px;
  border-bottom: 1px solid var(--ar-line);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}
.search-results .pr-item:hover, .search-results .pr-item.active, .search-results .res-item:hover, .search-results .res-item.active, .plz-results .pr-item:hover, .plz-results .pr-item.active, .plz-results .res-item:hover, .plz-results .res-item.active {
  background: rgba(188, 34, 34, 0.16);
}
.search-results .pr-loc, .search-results .name, .plz-results .pr-loc, .plz-results .name {
  color: var(--ar-text);
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ar-text-muted);
}
.field input, .field select, .field textarea {
  padding: 8px 12px;
  border: 1px solid var(--ar-line-strong);
  border-radius: 4px;
  font-size: 13px;
  background: var(--ar-surface-2);
  color: var(--ar-text);
}
.field input::placeholder, .field select::placeholder, .field textarea::placeholder {
  color: #7d7d7d;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 34, 34, 0.45);
  border-color: var(--ar-red);
}

.badge, .tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ar-on-accent);
  background: var(--ar-grey);
}

.badge--red {
  background: var(--ar-red);
}

.badge--ok {
  background: var(--ar-ok);
}

.badge--warn {
  background: var(--ar-warn);
}

.legend {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ar-text);
}
.legend__item, .legend .legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot, .col-dot, .legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.note, .legend-info {
  font-size: 12px;
  color: var(--ar-text-muted);
  line-height: 1.5;
  padding: 8px 0;
}

.note--tip {
  background: rgba(188, 34, 34, 0.16);
  border-left: 4px solid var(--ar-red);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
}

.callout {
  border-left: 5px solid;
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ar-text);
}

.callout--tip {
  background: rgba(232, 132, 43, 0.14);
  border-color: var(--ar-warn);
}
.callout--tip::before {
  content: "💡 Tipp: ";
  font-weight: 700;
  color: rgb(236.9914893617, 158.6936170213, 89.0085106383);
}

.callout--warn {
  background: rgba(188, 34, 34, 0.16);
  border-color: var(--ar-red);
}
.callout--warn::before {
  content: "⚠ Wichtig: ";
  font-weight: 700;
  color: var(--ar-red-bright);
}

.callout--info {
  background: var(--ar-surface-2);
  border-color: var(--ar-grey);
}
.callout--info b {
  color: var(--ar-text);
}

kbd {
  background: var(--ar-surface-2);
  border: 1px solid var(--ar-line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 7px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  color: var(--ar-text);
}

.klick {
  display: inline-block;
  background: var(--ar-red);
  color: var(--ar-on-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.marker {
  color: var(--ar-on-accent);
  font-weight: 700;
  text-align: center;
  border: 3px solid var(--ar-on-accent);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.marker--tech, .tech-marker {
  background: var(--ar-ok);
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 11px;
  border-radius: 50%;
}

.marker--new, .tech-marker.neu {
  background: var(--ar-warn);
  width: 34px;
  height: 34px;
  line-height: 28px;
  font-size: 12px;
}

.marker--site, .nl-marker {
  background: var(--ar-grey);
  width: 24px;
  height: 24px;
  line-height: 22px;
  font-size: 13px;
  border-radius: 4px;
  border-width: 2px;
}

.nl-marker.infopoint {
  background: rgb(125.4710982659, 125.4710982659, 124.0289017341);
}

.marker--search, .suche-marker {
  background: var(--ar-red);
  width: 24px;
  height: 24px;
  line-height: 20px;
  font-size: 15px;
  box-shadow: 0 0 0 2px var(--ar-red), 0 2px 6px rgba(0, 0, 0, 0.65);
  animation: ar-pulse 1.8s ease-out infinite;
}

.heim-marker {
  background: var(--ar-surface);
  border: 3px solid;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  color: var(--ar-text);
}

@keyframes ar-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(188, 34, 34, 0.55), 0 2px 6px rgba(0, 0, 0, 0.65);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(188, 34, 34, 0), 0 2px 6px rgba(0, 0, 0, 0.65);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(188, 34, 34, 0), 0 2px 6px rgba(0, 0, 0, 0.65);
  }
}
.suche-label {
  background: var(--ar-red);
  color: var(--ar-on-accent);
  border: none;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.suche-label::before {
  display: none !important;
}

.leaflet-popup-content {
  font-size: 12px;
  line-height: 1.5;
  color: #222;
}
.leaflet-popup-content .title {
  font-weight: 700;
  font-size: 13px;
  color: var(--ar-red);
  margin-bottom: 4px;
}
.leaflet-popup-content .row {
  display: flex;
  gap: 4px;
  padding: 2px 0;
}
.leaflet-popup-content .lbl {
  color: #777;
  min-width: 70px;
}

.u-flex {
  display: flex;
}

.u-between {
  justify-content: space-between;
}

.u-center {
  align-items: center;
}

.u-gap-1 {
  gap: 4px;
}

.u-gap-2 {
  gap: 8px;
}

.u-mt-2 {
  margin-top: 8px;
}

.u-mb-2 {
  margin-bottom: 8px;
}

.u-hidden {
  display: none !important;
}

.u-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Teil 2: Board-Komponenten (ehem. blaues portal.css), auf CI-Tokens gehoben ====== */
/* Globaler Zero-Reset: die Boards (Techniker/Ops/Ticket-Workflow) sind dagegen gebaut. */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* .header kommt aus Teil 1 (CI, dunkel + roter Bord); Boards erwarten sticky: */
.header { position: sticky; top: 0; z-index: 100; }
.header .nav-link { background: rgba(255,255,255,0.12); color: var(--ar-text); text-decoration:none; padding:8px 14px; border-radius:4px; font-size:13px; font-weight:bold; white-space:nowrap; transition:background .15s; }
.header .nav-link:hover { background: rgba(255,255,255,0.24); }
/* Kunden-Suche im Header */
.search-box { position: relative; flex: 0 1 320px; min-width: 240px; }
.search-box input { width: 100%; padding: 7px 32px 7px 12px; border: 1px solid var(--ar-line-strong); background: var(--ar-surface-2); color: var(--ar-text); border-radius: 18px; font-size: 13px; outline: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.search-box .clr { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ar-text-muted); font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: var(--ar-surface-2); color: var(--ar-text); border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.55); max-height: 70vh; overflow-y: auto; display: none; z-index: 200; }
.search-results.open { display: block; }
.search-results .res-item { padding: 8px 12px; border-bottom: 1px solid var(--ar-line); cursor: pointer; font-size: 12px; }
.search-results .res-item:hover, .search-results .res-item.active { background: rgba(188,34,34,.16); }
.search-results .res-item .name { font-weight: bold; font-size: 13px; color: var(--ar-red-bright); }
.search-results .res-item .meta { color: var(--ar-text-muted); margin-top: 2px; }
.search-results .res-item .meta .label { display: inline-block; padding: 1px 6px; border-radius: 3px; background: var(--ar-surface); color: var(--ar-red-bright); font-size: 10px; font-weight: bold; margin-right: 4px; }
.search-results .res-item .meta .label.t { background: #FFF3CD; color: #806000; }
.search-results .res-item .meta .label.c { background: #C6EFCE; color: #375623; }
.search-results .empty { padding: 12px; color: var(--ar-text-muted); text-align: center; }
/* Detail-Modal */
#search-modal { display:none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); z-index: 300; align-items: flex-start; justify-content: center; padding-top: 80px; }
#search-modal.open { display: flex; }
#search-modal .box { background: var(--ar-surface); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.6); width: 540px; max-width: 92%; }
#search-modal .hdr { background: var(--ar-header-bg); color: var(--ar-text); border-bottom: 2px solid var(--ar-red); padding: 10px 16px; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; }
#search-modal .hdr h3 { font-size: 15px; font-weight: bold; margin: 0; }
#search-modal .close { background: transparent; border: 0; color: var(--ar-text); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
#search-modal .body { padding: 14px 18px; font-size: 13px; line-height: 1.6; color: var(--ar-text); }
#search-modal .body .row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--ar-line); }
#search-modal .body .row:last-child { border-bottom: 0; }
#search-modal .body .lbl { width: 130px; color: var(--ar-text-muted); flex-shrink: 0; }
#search-modal .body .val { font-weight: 500; }
#search-modal .body .val.big { font-size: 15px; color: var(--ar-red-bright); font-weight: bold; }
#search-modal .body .val.termin { color: var(--ar-warn); font-weight: bold; font-size: 15px; }
.container { padding: 0; }
table { width: 100%; border-collapse: collapse; background: var(--ar-surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
th, td { padding: 2px 3px; text-align: left; border-bottom: 1px solid var(--ar-line); white-space: nowrap; font-size: 13px; }
th { font-size: 11px; font-weight: bold; border-bottom: none; position:sticky; z-index:50; }
td.num { text-align: center; }
td.bold { font-weight: bold; }
.col-name { padding-left: 6px; padding-right: 8px; font-weight: 500; white-space: nowrap; }
/* --- Spalten-/Datenfarb-Familien (SEMANTIK, bewusst nicht CI): --------------------- */
.sec-base  { background: #375623; color: #fff; text-align: center; white-space: nowrap; padding: 4px 3px; }
.sec-pw    { background: #2E75B6; color: #fff; text-align: center; padding: 4px 3px; }
.sec-cw    { background: #C55A11; color: #fff; text-align: center; padding: 4px 3px; }
.sec-nw    { background: #7030A0; color: #fff; text-align: center; padding: 4px 3px; }
.sec-wait  { background: #7B7B7B; color: #fff; text-align: center; padding: 4px 3px; }
.hdr-wait  { background: #D9D9D9; color: #333;   text-align: center; padding: 4px 3px; min-width: 76px; }
.sec-open  { background: #C00000; color: #fff; text-align: center; padding: 4px 3px; }
.sec-label { background: var(--ar-grey); color: #fff; padding: 4px 6px; }
.hdr-base  { background: #70AD47; color: #fff; text-align: center; white-space: nowrap; padding: 4px 3px; }
.hdr-pw    { background: #BDD7EE; color: #1F4E79; text-align: center; white-space: nowrap; padding: 4px 3px; }
.pw-cell   { white-space: nowrap; }
.pw-sep    { color: var(--ar-text-muted); margin: 0 1px; font-weight: normal; }
.hdr-cw    { background: #ED7D31; color: #fff; text-align: center; padding: 4px 3px; }
.hdr-cw2   { background: #FCE4D6; color: #C55A11; text-align: center; padding: 4px 3px; }
.hdr-besuch{ background: #F4B183; color: #7B3A0A; text-align: center; padding: 4px 3px; }
.hdr-nw    { background: #C9A3DD; color: #3D1754; text-align: center; padding: 4px 3px; min-width: 76px; }
.hdr-nnw   { background: #E2D0F0; color: #7030A0; text-align: center; padding: 4px 3px; min-width: 76px; }
.hdr-later { background: #F0E4F7; color: #7030A0; text-align: center; padding: 4px 3px; min-width: 76px; }
.hdr-sofort{ background: #F4C7C7; color: #8B0000; text-align: center; padding: 4px 3px; }
.hdr-teile { background: #E89090; color: #5C0000; text-align: center; padding: 4px 3px; }
.hdr-nicht { background: #C00000; color: #fff;    text-align: center; padding: 4px 3px; }
.hdr-total { background: #8B0000; color: #fff;    text-align: center; padding: 4px 3px; }
.hdr-rest  { background: #BF8F00; color: #fff;    text-align: center; padding: 4px 3px; }
.block-sep td { border-top: none !important; border-bottom: none !important; }
.map-link { cursor: pointer; text-decoration: none; color: var(--ar-red-bright); }
.map-link:hover { background: #f2d4d4 !important; }
#map-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:2000; }
#map-box { position:absolute; top:3%; left:4%; width:92%; height:92%; background:#fff; border-radius:10px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,.4); }
#map-hdr { background:var(--ar-header-bg); border-bottom:2px solid var(--ar-red); color:#fff; padding:10px 16px; font-weight:bold; font-size:15px; display:flex; justify-content:space-between; align-items:center; flex-shrink:0; }
#map-body { flex:1; min-height:0; display:flex; }
#map-el  { flex:1; min-height:0; position:relative; }
/* Karten-/Routen-Panels bleiben HELL (Esri-Karten sind hell) - nur Chrome auf CI: */
#teile-panel { display:none; width:420px; min-width:320px; border-left:1px solid #ddd; background:#fafafa; overflow:hidden; flex-direction:column; }
#teile-panel-hdr { padding:8px 12px; background:#f0f0f0; font-weight:bold; font-size:13px; color:var(--ar-red); border-bottom:1px solid #ddd; flex-shrink:0; }
#teile-panel-body { flex:1; overflow-y:auto; padding:0; }
#teile-panel table { width:100%; border-collapse:collapse; font-size:12px; background:#fff; }
#teile-panel th { position:sticky; top:0; background:var(--ar-header-bg); color:#fff; font-weight:bold; padding:6px 8px; text-align:left; font-size:11px; letter-spacing:.3px; z-index:2; }
#teile-panel th.num, #teile-panel td.num { text-align:right; }
#teile-panel td { padding:5px 8px; border-bottom:1px solid #eee; vertical-align:top; color:#222; }
#teile-panel tr:nth-child(even) { background:#fff; }
#teile-panel tr:nth-child(odd)  { background:#f6f6f6; }
#teile-panel tr:hover { background:#f7eaea; }
#teile-panel .et-code { font-family:'Consolas',monospace; color:#555; white-space:nowrap; }
#teile-panel .et-bez { color:#222; }
#teile-panel .et-calls { font-weight:bold; color:#C55A11; }
#map-loading { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); background:rgba(17,17,17,.85); color:#fff; padding:6px 16px; border-radius:20px; font-size:12px; display:none; z-index:500; }
#route-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:3000; }
#route-box { position:absolute; top:2%; left:3%; width:94%; height:95%; background:#fff; border-radius:10px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,.4); }
#route-hdr { background:var(--ar-header-bg); border-bottom:2px solid var(--ar-red); color:#fff; padding:8px 16px; font-weight:bold; font-size:15px; display:flex; justify-content:space-between; align-items:center; flex-shrink:0; }
#route-tabs { display:flex; gap:4px; padding:6px 10px; background:#f0f0f0; flex-shrink:0; flex-wrap:wrap; }
.route-tab { padding:5px 14px; border:none; border-radius:20px; cursor:pointer; font-size:13px; font-weight:bold; color:#fff; opacity:0.85; transition:opacity .2s,box-shadow .2s; }
.route-tab.active { opacity:1; box-shadow:0 2px 8px rgba(0,0,0,.3); transform:scale(1.05); }
.route-tab:hover { opacity:1; }
.route-tab-alle { padding:5px 14px; border:none; border-radius:20px; cursor:pointer; font-size:13px; font-weight:bold; color:#333; background:#fff !important; border:2px solid var(--ar-red); opacity:0.9; transition:opacity .2s; }
.route-tab-alle.active { opacity:1; box-shadow:0 2px 8px rgba(0,0,0,.3); background:var(--ar-red) !important; color:#fff; }
.sofort-toggle { padding:4px 12px; border:2px solid #FFC107; border-radius:18px; background:#fff; color:#6D4C00; cursor:pointer; font-size:12px; font-weight:bold; margin-right:10px; transition:all .2s; }
.sofort-toggle.active { background:#FFC107; color:#333; box-shadow:0 2px 6px rgba(255,193,7,.4); }
.sofort-toggle:hover { background:#FFE082; }
#route-map { flex:1; min-height:0; }
#route-cal { display:none; background:#fff; border-top:1px solid #ddd; border-bottom:1px solid #ddd; padding:8px 16px; font-size:12px; line-height:1.4; max-height:140px; overflow-y:auto; flex-shrink:0; color:#333; }
#route-cal.open { display:block; }
#route-cal .cal-head { font-weight:bold; color:var(--ar-red); margin-bottom:6px; font-size:12px; }
#route-cal .cal-list { display:flex; flex-wrap:wrap; gap:6px; }
#route-cal .cal-entry { background:#f8f9fa; border-left:3px solid #999; padding:4px 10px; border-radius:3px; min-width:180px; }
#route-cal .cal-entry.urlaub { border-left-color:#C00000; background:#FFEBEB; }
#route-cal .cal-entry.krank  { border-left-color:#9C27B0; background:#F3E5F5; }
#route-cal .cal-entry.ueb    { border-left-color:#F57C00; background:#FFF3E0; }
#route-cal .cal-entry.mittag { border-left-color:#1976D2; background:#E3F2FD; }
#route-cal .cal-entry .cal-sub  { font-weight:bold; color:var(--ar-red); }
#route-cal .cal-entry .cal-meta { color:#666; font-size:11px; }
#route-cal .cal-entry .cal-notes{ color:#555; font-style:italic; font-size:11px; }
#route-cal .cal-empty { color:#888; font-style:italic; }
#route-cal .day-flow { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; font-size:12px; color:#333; margin:2px 0 8px 0; padding:4px 0 8px 0; border-bottom:1px dashed #d8dde3; }
#route-cal .day-flow .day-head { font-weight:bold; color:var(--ar-red); margin-right:4px; }
#route-cal .day-flow .day-total { font-weight:normal; color:#666; }
#route-cal .day-flow .day-seg { white-space:nowrap; padding:1px 6px; border-radius:10px; background:#f3f3f3; border:1px solid #ddd; }
#route-cal .day-flow .day-seg.t-kunde { background:#E8F5E9; border-color:#A5D6A7; color:#1B5E20; }
#route-cal .day-flow .day-seg.t-reise { background:#FFF3E0; border-color:#FFCC80; color:#6D3C00; }
#route-cal .day-flow .day-seg.t-pause { background:#E3F2FD; border-color:#90CAF9; color:#0D47A1; }
#route-cal .day-flow .day-seg.t-buero { background:#F5F5F5; border-color:#D0D0D0; color:#37474F; }
#route-cal .day-flow .day-seg.t-off   { background:#FFEBEE; border-color:#EF9A9A; color:#B71C1C; }
#route-cal .day-flow .day-arr { color:#999; font-weight:bold; }
#route-legend { display:flex; gap:12px; padding:6px 12px; background:#f8f8f8; font-size:12px; flex-shrink:0; flex-wrap:wrap; color:#333; }
.route-leg-item { display:flex; align-items:center; gap:5px; }
tbody tr:nth-child(even) { background: var(--ar-surface-2); }
tbody tr:hover { background: rgba(188,34,34,.14); }
.total-row td { font-weight: bold; color: #fff; border: none; position:sticky; z-index:40; }
.tot-label  { background: var(--ar-grey) !important; }
.tot-base   { background: #70AD47 !important; }
.tot-pw     { background: #BDD7EE !important; color: #1F4E79 !important; }
.tot-besuch { background: #F4B183 !important; color: #7B3A0A !important; }
.tot-cw2    { background: #FCE4D6 !important; color: #C55A11 !important; }
.tot-cw     { background: #ED7D31 !important; }
.tot-nw     { background: #C9A3DD !important; color: #3D1754 !important; }
.tot-nnw    { background: #E2D0F0 !important; color: #7030A0 !important; }
.tot-later  { background: #F0E4F7 !important; color: #7030A0 !important; }
.tot-sofort { background: #F4C7C7 !important; color: #8B0000 !important; }
.tot-teile  { background: #E89090 !important; color: #5C0000 !important; }
.tot-nicht  { background: #C00000 !important; }
.tot-total  { background: #8B0000 !important; }
.note { font-size: 10px; color: #6D4C00; margin: 8px 0 4px; padding: 6px 10px; background:#FFF8DC; border-left: 4px solid #BF8F00; }
.legend { display:flex; gap:16px; margin: 10px 0; flex-wrap:wrap; }
.legend-item { display:flex; align-items:center; gap:5px; font-size:11px; }
.legend-dot { width:12px; height:12px; border-radius:2px; }
