/* =====================================================
   GRUNDLAYOUT – RESET
===================================================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden; /* nur horizontales Scrollen verhindern */
  overflow-y: auto; /* vertikales Scrollen erlauben */
}

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  font-size: 13px;
  color: #222;
}


/* =====================================================
   ICON SIDEBAR
===================================================== */

.icon-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 50px;
  height: 100vh;
  background: #1e1e1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

.icon-sidebar .icon {
  width: 100%;
  padding: 12px 0;
  text-align: center;
  color: #bbb;
  font-size: 16px;
  transition: background .2s;
}

.icon-sidebar .icon:hover {
  background: #333;
}

.icon-sidebar .icon.active {
  background: #333;
}

.icon-sidebar .icon i {
  color: #fff;
}

.icon-sidebar .icon.active i {
  color: #00a11b;
}

/* Logout Button am Ende der Sidebar */
.icon-sidebar .logout-btn {
  margin-top: auto;
  margin-bottom: 19px;
  width: 100%;
  padding: 12px 0;
  text-align: center;
  color: #ff6b6b;
  font-size: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-sidebar .logout-btn:hover {
  background: #2c1010;
  color: #ff4444;
}

/* =====================================================
   TOP TOOLBAR
===================================================== */

.top-toolbar {
  position: fixed;
  top: 0;
  left: 50px;
  width: calc(100% - 50px);
  height: 35px;
  background: #dad8d8;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 900;
}

.toolbar-group {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: center;
}

.space-between {
  flex: 1;
}

.top-toolbar button {
  background: none;
  border: 1px solid transparent;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.top-toolbar button:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

/* =====================================================
   MAP PINS (Leaflet DivIcon)
===================================================== */
.map-pin-wrapper { /* optional wrapper for targeting */ }

.map-pin {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  border: 2px solid #fff;
}
.map-pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 7px;
  top: 7px;
  background: #fff;
  border-radius: 50%;
}
.map-pin--orange { background: #ff9800; }
.map-pin--green  { background: #2e7d32; }

/* =====================================================
   STATUS FARBEN
===================================================== */
.status-akzeptiert_unternehmer { background-color: #4CAF50; color: white; }
.status-beladestelle { background-color: #2196F3; color: white; }
.status-wareneingang { background-color: #FF9800; color: white; }
.status-warenausgang { background-color: #FFC107; color: #333; }
.status-lieferbestaetigung { background-color: #009688; color: white; }
.status-storniert { background-color: #F44336; color: white; }
.status-problem { background-color: #FF5722; color: white; }

.status-cell {
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  display: inline-block;
  min-width: 80px;
  font-size: 12px;
}

/* =====================================================
   DROPDOWN-MENÜ
===================================================== */

.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  z-index: 1001;
}

.dropdown-menu.hidden {
  display: none;
}

.dropdown-menu button {
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}

.dropdown-menu button:first-child {
  border-radius: 4px 4px 0 0;
}

.dropdown-menu button:last-child {
  border-radius: 0 0 4px 4px;
}

.dropdown-menu button:hover {
  background: #f0f0f0;
  border-color: transparent;
}

/* =====================================================
   CONTENT – FINAL & SAUBER
===================================================== */

.content {
  margin-left: 50px;          /* Sidebar */
  padding: 60px 20px 20px;    /* Toolbar + Abstand */
  width: auto;                /* ❗ KEIN calc */
  min-width: 0;               /* ❗ extrem wichtig */
  overflow-y: auto;           /* vertikales Scrollen erlauben */
  overflow-x: hidden;         /* horizontales Scrollen verhindern */
}

.main-content {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =====================================================
   HEADER
===================================================== */
.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
}

.header-logo {
  margin-left: auto;
}

.header-logo img {
  height: 34px;
}

/* =====================================================
   CARD & TABELLEN
===================================================== */

.card {
  background: #fff;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #d0d0d0;
  margin-bottom: 6px;
  width: 100%;
  scrollbar-gutter: stable;
  max-height: 85vh;
  overflow-y: auto;
}

.table-standard,
.erp-table,
.sendungen-table {
  width: 100%;
  max-width: 100%;
}


/* =====================================================
   STANDARD-TABELLE (GLOBAL – ALLES EINHEITLICH)
===================================================== */
.table-standard {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #e9e9e9;
  table-layout: fixed;
}

.table-standard th {
  background: #d1d1d1;
  padding: 6px;
  border: 1px solid #ccc;
  font-weight: bold;
  text-align: left;
  white-space: nowrap;
}

.table-standard td {
  padding: 4px;
  border: 1px solid #ccc;
  vertical-align: middle;
}



/* Icon-Spalte mit Buttons - rechts fixiert */
.table-standard td.icon-col {
  text-align: center;
  padding: 2px;
  width: 26px;
  flex-shrink: 0; /* nicht schrumpfen */
}

.table-standard tbody tr:hover {
  background: #a7a7a7;
}

.table-standard input,
.table-standard select {
  width: 100%;
  padding: 4px;
  font-size: 12px;
  border: 1px solid #bbb;
  border-radius: 3px;
  height: 26px; /* einheitliche Feldhöhe */
}

.table-standard input[readonly] {
  background: #f5f5f5;
}

/* Schmale Icon-Spalten (letzte Spalte) für Aktions-Buttons */
.absender-table th:last-child,
.absender-table td.icon-col,
.empfaenger-table th:last-child,
.empfaenger-table td.icon-col,
.gut-table th:last-child,
.gut-table td.icon-col,
.leistungen-table th:last-child,
.leistungen-table td.icon-col,
.zuschlag-table th:last-child,
.zuschlag-table td.icon-col {
  width: 60px;
  text-align: center;
  padding: 2px 4px;
  white-space: nowrap;
}

/* =====================================================
   TABELLEN SCROLL
===================================================== */

.table-wrap,
.erp-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Vertikales Scrollen innerhalb von Tabellen-Containern, damit Cards nicht wachsen */
.table-wrap.vscroll-y {
  max-height: 260px; /* einheitliche sichtbare Höhe */
  overflow-y: auto;
}

/* ❌ KEIN overflow-x auf body, content, layout */


/* =====================
   KUNDE – EINGABE (oben)
===================== */

.kunden-table {
  table-layout: fixed;
}

/* Spalte 1 – Kunde */
.kunden-table th:nth-child(1),
.kunden-table td:nth-child(1) {
  width: 263px;
}

/* Spalte 2 – Referenz */
.kunden-table th:nth-child(2),
.kunden-table td:nth-child(2) {
  width: 100px;
}

/* Spalte 3 – Internreferenz */
.kunden-table th:nth-child(3),
.kunden-table td:nth-child(3) {
  width: 100px;
}

/* Tabellenzelle darf Dropdown anzeigen */
.kunden-table td {
  overflow: visible;
}

/* =====================
   Absender – EINGABE 
===================== */

/* Spalte 1 – Adresse */
.absender-table th:nth-child(1),
.absender-table td:nth-child(1) {
  width: 414px;
}

/* Spalte 2 – Leer / Zusatz */
.absender-table th:nth-child(2),
.absender-table td:nth-child(2) {
  width: 40px;
}

/* Spalte 3 – Nummer */
.absender-table th:nth-child(3),
.absender-table td:nth-child(3) {
  width: 140px;
}

/* Spalte 4 – Datum */
.absender-table th:nth-child(4),
.absender-table td:nth-child(4) {
  width: 80px;
}

/* Spalte 5 – Von */
.absender-table th:nth-child(5),
.absender-table td:nth-child(5) {
  width: 50px;
}

/* Spalte 6 – Bis */
.absender-table th:nth-child(6),
.absender-table td:nth-child(6) {
  width: 50px;
}

/* Spalte 7 – Aktion (fixiert rechts) */
.absender-table th:nth-child(7),
.absender-table td:nth-child(7) {
  width: 26px;
  flex-shrink: 0;
}

/* Bezeichnung (gleich groß wie Artikelnummer) */
.gut-table th:nth-child(1),
.gut-table td:nth-child(1) {
  width: 150px;
}

/* Artikelnummer */
.gut-table th:nth-child(2),
.gut-table td:nth-child(2) {
  width: 150px;
}

/* Einheit */
.gut-table th:nth-child(3),
.gut-table td:nth-child(3) {
  width: 100px;
}

/* Anzahl */
.gut-table th:nth-child(4),
.gut-table td:nth-child(4) {
  width: 50px;
  text-align: right;
}

/* Gewicht */
.gut-table th:nth-child(5),
.gut-table td:nth-child(5) {
  width: 50px;
  text-align: right;
}

/* Länge */
.gut-table th:nth-child(6),
.gut-table td:nth-child(6) {
  width: 40px;
}

/* Breite */
.gut-table th:nth-child(7),
.gut-table td:nth-child(7) {
  width: 40px;
}

/* Höhe */
.gut-table th:nth-child(8),
.gut-table td:nth-child(8) {
  width: 40px;
}

/* LDM */
.gut-table th:nth-child(9),
.gut-table td:nth-child(9) {
  width: 50px;
}

/* Absender Auswahl */
.gut-table th:nth-child(10),
.gut-table td:nth-child(10) {
  width: 160px;
}

/* Empfänger Auswahl */
.gut-table th:nth-child(11),
.gut-table td:nth-child(11) {
  width: 160px;
}

/* Aktion (fixiert rechts) */
.gut-table th:nth-child(12),
.gut-table td:nth-child(12) {
  width: 26px;
  flex-shrink: 0;
}


/* =====================
   LEISTUNGEN – SPALTEN
===================== */


.leistungen-table {
  table-layout: fixed;
  width: 100%;
}

/* 1. Leistung */
.leistungen-table th:nth-child(1),
.leistungen-table td:nth-child(1) {
  width: 90px;
}

/* 2. Beschreibung */
.leistungen-table th:nth-child(2),
.leistungen-table td:nth-child(2) {
  width: 150px;
}

/* 3. Subunternehmen */
.leistungen-table th:nth-child(3),
.leistungen-table td:nth-child(3) {
  width: 200px;
}

/* 4. Fahrer */
.leistungen-table th:nth-child(4),
.leistungen-table td:nth-child(4) {
  width: 120px;
}

/* 5. Fahrzeug */
.leistungen-table th:nth-child(5),
.leistungen-table td:nth-child(5) {
  width: 100px;
}

/* 6. Menge */
.leistungen-table th:nth-child(6),
.leistungen-table td:nth-child(6) {
  width: 50px;
  text-align: right;
}

/* 7. Betrag */
.leistungen-table th:nth-child(7),
.leistungen-table td:nth-child(7) {
  width: 80px;
  text-align: right;
}

/* 8. Kosten */
.leistungen-table th:nth-child(8),
.leistungen-table td:nth-child(8) {
  width: 80px;
  text-align: right;
}

/* 9. Aktion (fixiert rechts) */
.leistungen-table th:nth-child(9),
.leistungen-table td:nth-child(9) {
  width: 26px;
  flex-shrink: 0;
}


/* =====================
   ZUSCHLÄGE – TABELLE
===================== */

.zuschlag-table {
  table-layout: fixed;
  width: 100%;
}

/* 1. Zuschlag (Such-Dropdown) */
.zuschlag-table th:nth-child(1),
.zuschlag-table td:nth-child(1) {
  width: 270px;
}

/* 2. Beschreibung */
.zuschlag-table th:nth-child(2),
.zuschlag-table td:nth-child(2) {
  width: 270px;
}

/* 3. Pauschal */
.zuschlag-table th:nth-child(3),
.zuschlag-table td:nth-child(3) {
  width: 60px;
  text-align: right;
}

/* 4. Prozent */
.zuschlag-table th:nth-child(4),
.zuschlag-table td:nth-child(4) {
  width: 60px;
  text-align: right;
}

/* 5. Betrag */
.zuschlag-table th:nth-child(5),
.zuschlag-table td:nth-child(5) {
  width: 60px;
  text-align: right;
}

/* 6. Aktion (fixiert rechts) */
.zuschlag-table th:nth-child(6),
.zuschlag-table td:nth-child(6) {
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}




/* =====================================================
   ICON-SPALTE & BUTTONS
===================================================== */
.icon-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  line-height: 1;

  border: 1px solid #bbb;
  background: #f6f6f6;
  border-radius: 3px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #e1e1e1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 8px;
  margin: 0 4px;
  border-radius: 4px;
}


.delete-btn:hover {
  background: #ffe5e5;
}

.action-cell {
  white-space: nowrap;
}

/* =====================================================
   SUCH-DROPDOWN (GLOBAL)
===================================================== */
.search-select {
  position: relative;
  width: 100%;
}

.search-select-input {
  width: 100%;
  padding: 7px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.search-select-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  z-index: 14000; /* vor nachfolgenden Blöcken, unter Modals */
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.search-select-dropdown.hidden {
  display: none;
}

.search-filter {
  width: 100%;
  padding: 5px;
  font-size: 12px;
  border: none;
  border-bottom: 1px solid #ddd;
}

.search-results div {
  padding: 6px;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
}

.search-results div:hover {
  background: #e9e9e9;
}



/* =====================================================
   UTIL
===================================================== */
.num {
  text-align: right;
}

/* Betrag und Kosten mit € Symbol */
.leistung-betrag,
.leistung-kosten {
  position: relative;
}

.leistung-betrag::after,
.leistung-kosten::after {
  content: "€";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
  font-weight: bold;
  font-size: 12px;
}

.leistung-betrag {
  padding-right: 24px;
}

.leistung-betrag input,
.leistung-kosten input {
  padding-right: 20px;
}

/* Zuschläge: Suffix € / % hinter das Feld setzen */
.zuschlag-euro,
.zuschlag-percent {
  position: relative;
}

.zuschlag-euro::after {
  content: "€";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
  font-weight: bold;
  font-size: 12px;
}

.zuschlag-percent::after {
  content: "%";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
  font-weight: bold;
  font-size: 12px;
}

.zuschlag-euro input,
.zuschlag-percent input {
  padding-right: 22px;
}

/* Verstecke Spin-Buttons bei Number-Inputs (L, B, H, Betrag, Kosten, Menge) */
.leistung-betrag input[type="number"]::-webkit-outer-spin-button,
.leistung-betrag input[type="number"]::-webkit-inner-spin-button,
.leistung-kosten input[type="number"]::-webkit-outer-spin-button,
.leistung-kosten input[type="number"]::-webkit-inner-spin-button,
.waren-lbh input[type="number"]::-webkit-outer-spin-button,
.waren-lbh input[type="number"]::-webkit-inner-spin-button,
input.num[type="number"]::-webkit-outer-spin-button,
input.num[type="number"]::-webkit-inner-spin-button,
input.gut-menge[type="number"]::-webkit-outer-spin-button,
input.gut-menge[type="number"]::-webkit-inner-spin-button,
input.gut-laenge[type="number"]::-webkit-outer-spin-button,
input.gut-laenge[type="number"]::-webkit-inner-spin-button,
input.gut-breite[type="number"]::-webkit-outer-spin-button,
input.gut-breite[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.leistung-betrag input[type="number"],
.leistung-kosten input[type="number"],
.waren-lbh input[type="number"],
input.num[type="number"],
input.gut-menge[type="number"],
input.gut-laenge[type="number"],
input.gut-breite[type="number"] {
  -moz-appearance: textfield;
}

/* =====================================================
   FIX: Such-Dropdown + Buttons IMMER nebeneinander
===================================================== */

.kunden-input-group,
.absender-input-group,
.empfaenger-input-group,
.leistung-input-group,
.unternehmer-input-group,
.einheit-input-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;        /* 🔴 VERHINDERT Umbruch */
  width: 100%;
}

/* Suchfeld flexibel */
.kunden-input-group .search-select,
.absender-input-group .search-select,
.empfaenger-input-group .search-select,
.leistung-input-group .search-select,
.unternehmer-input-group .search-select,
.einheit-input-group .search-select {
  flex: 1 1 auto;
  min-width: 0;            /* 🔴 extrem wichtig */
}

/* Buttons FIX breit */
.kunden-input-group .icon-btn,
.absender-input-group .icon-btn,
.empfaenger-input-group .icon-btn,
.leistung-input-group .icon-btn,
.unternehmer-input-group .icon-btn,
.einheit-input-group .icon-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
}

/* Buttons in Tabellen-Spalten (Plus/Trash zum Clonen/Löschen) */
.icon-col .icon-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
}

/* Kleine Delete-Buttons (X) in Blocks/Rows */
.delete-gut,
.delete-absender,
.delete-empfaenger,
.gutRow .icon-btn[onclick*="removeGutRow"],
.leistungRow .icon-btn[onclick*="removeLeistungRow"],
.zuschlagRow .icon-btn[onclick*="removeZuschlagRow"],
.absenderBlock .icon-btn[onclick*="removeAbsenderBlockModal"],
.empfaengerBlock .icon-btn[onclick*="removeEmpfaengerBlockModal"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  padding: 0 !important;
  font-size: 9px !important;
  line-height: 1 !important;
  border-radius: 2px !important;
}

/* Dropdown überlagert – nimmt keinen Platz */
.search-select-dropdown {
  position: absolute;
}


/* =====================================================
   EINHEITLICHE ACTION-SPALTE (➕ 🗑 ✏️)
===================================================== */




/* =====================================================
   MODAL – FIX & IMMER OBEN
===================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* 🔴 höher als Sidebar & Tabellen */
  overflow-y: auto;
  padding: 20px;
}

.modal.hidden {
  display: none !important;
}

/* Adress-Modal muss über Sendung-Modal sein */
#adresseModal {
  z-index: 10000;
}

/* Kunden-Modal muss über Sendung-Modal sein */
#kundeModal {
  z-index: 10000;
}

/* Öffnungszeiten-Modal muss über Adress-Modal sein */
#oeffnungszeitenModal {
  z-index: 10001;
}

/* Karten-Modal muss ebenfalls über Sendung-Modal sein */
#mapModal {
  z-index: 10000;
}

#unternehmerModal {
  z-index: 10000;
}

#sendungModal {
  z-index: 9999;
}

/* Einheitliche Input-Höhen im Sendung-Modal */
#sendungModal input,
#sendungModal select,
#sendungModal textarea {
  height: 31px !important;
  padding: 5px 8px !important;
  font-size: 14px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
}

/* Ausnahmen für Checkboxen und Radio-Buttons */
#sendungModal input[type="checkbox"],
#sendungModal input[type="radio"] {
  height: auto !important;
  width: auto !important;
}


/* =====================================================
   MODAL – PROFESSIONELLES FENSTERLAYOUT
===================================================== */

/* Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Fenster */
.modal-content {
  background: #ffffff;
  width: 520px;
  max-width: 95vw;
  padding: 22px 24px;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Titel */
.modal-content h2,
.modal-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

/* Formular */
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Label links, Input darunter */
.modal-content > label,
.modal-content label:not([style*="inline-flex"]) {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  gap: 3px;
}

/* Labels mit inline-flex (Checkboxen) sollten horizontal bleiben */
.modal-content label[style*="inline-flex"] {
  flex-direction: row !important;
}

/* Checkbox-Styling: Weißer Hintergrund, schwarzer Haken */
.modal-content input[type="checkbox"] {
  accent-color: #000000;
  background-color: white;
}

/* Inputs */
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #bbb;
  border-radius: 4px;
}

/* Checkbox-Zeilen */
.modal-content label input[type="checkbox"] {
  width: auto;
}

/* Button-Leiste */
.modal-actions,
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Buttons */
.modal-content button {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.modal-content .primary {
  background: #00a11b;
  color: #fff;
  border: none;
}

.modal-content .secondary {
  background: #f0f0f0;
  border: 1px solid #ccc;
}

/* Close-X (falls vorhanden) */
.modal .close,
.modal-close {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 16px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal .close:hover,
.modal-close:hover {
  color: #333;
  background: #e0e0e0;
  border-color: #bbb;
}

.modal-header {
  position: relative;
  padding-right: 35px;
}

/* Tooltip nur für Kunden-Auswahl (WRAPPER, nicht das Input) */
.kundeSelect {
  position: relative;
}

/* Tooltip für Kunde / Absender / Empfänger / Subunternehmer */
.kundeSelect,
.absenderSelect,
.empfaengerSelect,
.subunternehmerSelect {
  position: relative;
}

.kundeSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
.absenderSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
.empfaengerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
.subunternehmerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background: #f8f9fa;
  color: #222;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  border-radius: 6px;
  min-width: 300px;
  max-width: 400px;
  z-index: 12000;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  border: 1px solid #ddd;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.kundeSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
.absenderSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
.empfaengerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
.subunternehmerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 100%;
  border: 6px solid transparent;
  border-bottom-color: #f8f9fa;
  z-index: 12001;
}

/* =========================
   EINHEITLICHER TOOLTIP
========================= */

.search-select {
  position: relative;
}
/* Wenn Dropdown offen: Container ganz nach vorn */
.search-select.dropdown-open { z-index: 15000; }

/* Sicherstellen, dass Tooltip/Dropsdowns über Nachbarfeldern liegen */
.search-select:hover,
.search-select:focus-within {
  z-index: 13000;
}

/* Tooltip anzeigen NUR wenn:
   - nicht dropdown-open
   - data-tooltip gesetzt */
.search-select:not(.dropdown-open):not([data-tooltip=""]):hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);

  background: #f8f9fa;
  color: #222;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;

  border-radius: 6px;
  min-width: 300px;
  max-width: 400px;
  border: 1px solid #ddd;

  z-index: 12000;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  pointer-events: none;
}

/* Pfeil */
.search-select:not(.dropdown-open):not([data-tooltip=""]):hover::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 100%;
  border: 6px solid transparent;
  border-bottom-color: #f8f9fa;
  z-index: 12001;
}
.search-select {
  position: relative;
}

/* Portal-Tooltips: Pseudo-Elemente deaktivieren, wenn aktiv */
body.portal-tooltips .search-select:not(.dropdown-open):not([data-tooltip=""]):hover::after,
body.portal-tooltips .search-select:not(.dropdown-open):not([data-tooltip=""]):hover::before,
body.portal-tooltips .kundeSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
body.portal-tooltips .absenderSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
body.portal-tooltips .empfaengerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
body.portal-tooltips .subunternehmerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::after,
body.portal-tooltips .kundeSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
body.portal-tooltips .absenderSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
body.portal-tooltips .empfaengerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before,
body.portal-tooltips .subunternehmerSelect:not(.dropdown-open):not([data-tooltip=""]):hover::before { display: none !important; }




/* =====================
   SCROLL-CONTAINER
===================== */
.content-fullwidth .table-wrap {
  width: 100%;
  overflow-x: auto;
}


/* Absender: thead nur im ersten Block anzeigen */
.absenderBlock:not(:first-child) thead {
  display: none;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-y: visible; /* Tooltips dürfen über den Tabellen-Wrapper hinausragen */
}


.sendungen-table {
  width: 100%;
  max-width: 100%;      
  table-layout: fixed; 
  border-collapse: collapse;
}

.sendungen-table th,
.sendungen-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th[data-col="gewicht"].hidden,
td[data-col="gewicht"].hidden {
  display: none;
}


/* =========================
   ERP STANDARD TABLE
========================= */

.erp-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  white-space: nowrap;
  table-layout: fixed;
}

/* Kopf */
.erp-table thead th {
  background: #f0f0f0;
  border-bottom: 2px solid #bbb;
  border-right: 1px solid #bbb;
  padding: 3px 5px;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
  user-select: none;
}

.erp-table thead th[data-col] {
  cursor: pointer;
  position: relative;
  padding-right: 20px;
}

.erp-table thead th[data-col]:hover {
  background: #e5e5e5;
}

.erp-table thead th.sort-asc::after,
.erp-table thead th.sort-desc::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.erp-table thead th.sort-asc::after {
  border-bottom: 6px solid #333;
}

.erp-table thead th.sort-desc::after {
  border-top: 6px solid #333;
}

.erp-table thead th:last-child {
  border-right: none;
}

/* Zellen */
.erp-table td {
  padding: 3px 4px 2px 4px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 22px !important;
  line-height: 1.1;
  font-size: 11.5px;
  text-align: left;
  vertical-align: middle;
}

.erp-table td:last-child {
  border-right: none;
}

/* Checkboxen in Tabellen */
.erp-table input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
  width: 14px;
  height: 14px;
}

/* Zebra */
.erp-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Hover */
.erp-table tbody tr:hover {
  background: #eefae0;
  cursor: pointer;
}

.erp-table tbody tr {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  height: 25px !important;
}

/* Selektiert - Einzelauswahl (aktive Sendung im Drawer) */
.erp-table tr.selected {
  background: #e0fcae !important;
  border-left: 3px solid #28a745;
}

/* Mehrfachauswahl (mit Ctrl/Shift) */
.erp-table tr.multi-selected {
  background: #e0fcae !important;
  border-left: 3px solid #28a745;
}

/* Wenn beides (selected + multi-selected) - zeige selected-Stil */
.erp-table tr.selected.multi-selected {
  background: #e0fcae !important;
  border-left: 3px solid #28a745;
}

/* =====================================================
   DISPOSITION BOARD
===================================================== */
.dispo-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.dispo-lane {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.dispo-lane-header {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dispo-drop {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}

.dispo-drop.is-over {
  background: #f3f9ff;
  border: 1px dashed #1e88e5;
}

.dispo-card {
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dispo-card.dragging {
  opacity: 0.6;
}

.erp-table tr.dragging {
  opacity: 0.6;
}

/* Tour-Planung */
.tour-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tour-plan-grid label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

.tour-dropzone {
  border: 2px dashed #9e9e9e;
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
  background: #fafafa;
}

.tour-dropzone.is-over {
  border-color: #1e88e5;
  background: #f3f9ff;
}

.tour-drop-hint {
  color: #777;
  margin-bottom: 8px;
}

#tourSelectionList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#tourSelectionList li {
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #d0defc;
  border-radius: 6px;
  font-size: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

#tourSelectionList li .row-line {
  display: grid;
  grid-template-columns: 60px 1.1fr 1.2fr 0.9fr 1fr 1fr;
  gap: 4px;
  align-items: center;
}

#tourSelectionList li .badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  font-size: 11px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* Dispo Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 16px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar input[type="text"],
.topbar select,
.topbar button {
  height: 34px;
}

.topbar button.danger {
  background: #f44336;
  color: #fff;
}

.dispo-card .dispo-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
}

.dispo-card .dispo-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
  display: inline-block;
  min-width: 100px;
  text-align: center;
}



/* =========================
   SPALTENBREITEN
========================= */

#adressenTabelle th:nth-child(1),
#adressenTabelle td:nth-child(1) { width: 70px; }

#adressenTabelle th:nth-child(2),
#adressenTabelle td:nth-child(2) { width: 220px; }

#adressenTabelle th:nth-child(3),
#adressenTabelle td:nth-child(3) { width: 200px; }

#adressenTabelle th:nth-child(4),
#adressenTabelle td:nth-child(4) { width: 60px; }

#adressenTabelle th:nth-child(5),
#adressenTabelle td:nth-child(5) { width: 80px; }

#adressenTabelle th:nth-child(6),
#adressenTabelle td:nth-child(6) { width: 140px; }

#adressenTabelle th:nth-child(7),
#adressenTabelle td:nth-child(7) { width: 160px; }

#adressenTabelle th:nth-child(8),
#adressenTabelle td:nth-child(8) { width: 120px; }

#adressenTabelle th:nth-child(9),
#adressenTabelle td:nth-child(9) { width: 200px; }

#adressenTabelle th:nth-child(10),
#adressenTabelle td:nth-child(10) { width: 160px; }

#adressenTabelle th:nth-child(11),
#adressenTabelle td:nth-child(11) { width: 160px; }

#adressenTabelle th:nth-child(12),
#adressenTabelle td:nth-child(12) { width: 160px; }


/* Text kürzen mit … */
#adressenTabelle td {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scrollbar dezenter */
.table-wrapper::-webkit-scrollbar {
  height: 8px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

/* Overlay-Scrollbar für Sendungsliste (nimmt keinen Platz ein) */
#selectedSendungenDisplay::-webkit-scrollbar {
  width: 8px;
}
#selectedSendungenDisplay::-webkit-scrollbar-track {
  background: transparent;
}
#selectedSendungenDisplay::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}
#selectedSendungenDisplay::-webkit-scrollbar-thumb:hover {
  background: #888;
}


/* =====================
   SUCHFELD
===================== */
.suche-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1px;
  padding: 1px 0;
}

.suche-container label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  min-width: 60px;
}

.suche-container input[type="text"] {
  flex: 1;
  max-width: 250px;
  padding: 7px 14px;
  font-size: 13px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.suche-container input[type="text"]:focus {
  outline: none;
  border-color: #00a11b;
  box-shadow: 0 0 0 3px rgba(0, 161, 27, 0.1);
}

.suche-container input[type="text"]::placeholder {
  color: #999;
}


/* =====================
   READONLY: DISABLED BUTTONS
===================== */
#sendungFormCard button:disabled,
.kunden-input-group button:disabled,
.absender-input-group button:disabled,
.empfaenger-input-group button:disabled,
.icon-col .icon-btn:disabled,
.table-standard .icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =====================================================
   TABLE DRAWER – EXPANDABLE PANEL
===================================================== */
.table-drawer {
  position: fixed;
  bottom: 0;
  left: 80px;
  right: 20px;
  background: #fff;
  border-top: 2px solid #d0d0d0;
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  z-index: 800;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  transition: height 0.3s ease;
  height: 33.33vh;
  max-height: 33.33vh;
}

.table-drawer.expanded {
  height: calc(100vh - 100px) !important;
  max-height: calc(100vh - 100px);
}

.table-drawer-header {
  padding: 12px 15px;
  background: transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  position: relative;
}

#toggleTableDrawer {
  font-size: 16px;
  color: #666;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#toggleTableDrawer:hover {
  color: #333;
  background: #e0e0e0;
}

.table-drawer.expanded #toggleTableDrawer i {
  transform: rotate(180deg);
}

/* =====================================================
   GLOBALER LOADER / SPINNER
===================================================== */

#globalLoader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#globalLoader.active {
  display: flex;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  color: white;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================================================
   TOURENTAG-SYSTEM - FAHRER DRAG & DROP
===================================================== */

.fahrer-auswahl-liste {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
}

.fahrer-checkbox {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.fahrer-checkbox:hover {
  background: #f0f7ff;
  border-color: #2196F3;
}

.fahrer-checkbox input[type="checkbox"] {
  margin-right: 12px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.fahrer-info {
  flex: 1;
}

.fahrer-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.fahrer-details {
  font-size: 12px;
  color: #666;
}

.fahrer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.fahrer-kolonne {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.fahrer-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fahrer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.sendung-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.fahrer-dropzone {
  flex: 1;
  padding: 15px;
  min-height: 300px;
  background: white;
  transition: background 0.2s;
}

.fahrer-dropzone.drag-over {
  background: #e3f2fd;
  border: 2px dashed #2196F3;
}

.empty-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
}

.sendung-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 12px;
  cursor: move;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sendung-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.sendung-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.sendung-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sendung-teil {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.sendung-nummer {
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.sendung-status {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.sendung-body {
  font-size: 12px;
  line-height: 1.5;
  color: #555;
}

.sendung-body strong {
  color: #333;
}

.sendung-body small {
  color: #888;
  font-size: 11px;
}

/* Dispo Row Dragging */
.dispo-row {
  cursor: move;
  transition: opacity 0.2s, background 0.2s;
  user-select: none;
}

.dispo-row.dragging {
  opacity: 0.4;
}

.dispo-row:hover {
  background: #f5f5f5;
}

.dispo-row.selected {
  background: #e3f2fd !important;
  border-left: 3px solid #2196F3;
}

/* =====================================================
   TIMELINE ANSICHT
===================================================== */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}

.timeline-row {
  display: flex;
  flex-direction: column;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fafafa;
  min-height: 80px;
  flex-shrink: 0;
}

.timeline-row-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: #f0f0f0;
  border-bottom: 1px solid #d0d0d0;
  font-weight: 600;
  gap: 10px;
  flex-shrink: 0;
}

.timeline-row-content {
  padding: 0;
  min-height: 60px;
  overflow-x: auto;
  width: 100%;
}

.sendung-block {
  display: inline-flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 10px;
  min-width: 200px;
  max-width: 250px;
  cursor: move;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
}

.sendung-block-remove {
  transition: all 0.2s;
  z-index: 10;
}

.sendung-block-remove:hover {
  opacity: 1;
  transform: scale(1.1);
}

.sendung-block:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-color: #2196F3;
}

.sendung-block.selected {
  border: 2px solid #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
  background: #e3f2fd;
}

.sendung-block.dragging {
  opacity: 0.5;
}

.sendung-block.drop-target-left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2196F3;
  border-radius: 2px;
  animation: pulse 0.6s infinite;
  pointer-events: none;
  z-index: 10;
}

.sendung-block.drop-target-right::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2196F3;
  border-radius: 2px;
  animation: pulse 0.6s infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sendung-block-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding-right: 20px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.sendung-block-body {
  font-size: 11px;
  line-height: 1.4;
  color: #666;
}

.sendung-block-body div {
  margin-bottom: 3px;
}

.sendung-block-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eee;
  font-size: 11px;
  color: #888;
  font-weight: 600;
}

.timeline-empty {
  color: #999;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* =====================================================
   TOUR SENDUNGEN TABELLE
===================================================== */

.tour-sendungen-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 4px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.tour-sendungen-table thead {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.tour-sendungen-table th {
  padding: 4px 6px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #dee2e6;
}

.tour-sendungen-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s;
}

.tour-sendungen-table tbody tr:hover {
  background: #f8f9fa;
}

.tour-sendungen-table tbody tr.selected {
  background: #e3f2fd;
  border-left: 3px solid #2196F3;
}

.tour-sendungen-table tbody tr.dragging {
  opacity: 0.5;
  background: #f0f0f0;
}

.tour-sendungen-table tbody tr.drop-target-top {
  border-top: 3px solid #2196F3;
  background: rgba(33, 150, 243, 0.1);
}

.tour-sendungen-table tbody tr.drop-target-bottom {
  border-bottom: 3px solid #2196F3;
  background: rgba(33, 150, 243, 0.1);
}

.tour-sendungen-table td {
  padding: 5px 6px;
  font-size: 11.5px;
  color: #333;
  vertical-align: middle;
  line-height: 1.3;
}

.tour-sendung-row {
  cursor: move;
}

.tour-stop-row {
  background: #fff8e1;
}

.tour-stop-row:hover {
  background: #fff3cd !important;
}

/* Action Buttons */
.tour-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin: 0 1px;
  border-radius: 2px;
  font-size: 10px;
  transition: all 0.2s;
}

.tour-action-btn:hover {
  transform: scale(1.1);
}

.tour-info-btn {
  color: #2196f3;
}

.tour-info-btn:hover {
  background: #e3f2fd;
}

.tour-remove-btn {
  color: #dc3545;
}

.tour-remove-btn:hover {
  background: #ffebee;
}

