/* =====================================================================
   app.css – Plakatierung Bernburg (Saale)
   Design adaptiert von VM-App / CDU-Fraktion Sachsen-Anhalt
   Farbpalette: CDU Corporate Design
   ===================================================================== */

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

:root {
  /* ── CDU-Farbpalette (identisch VM-App) ── */
  --cdu-schwarz:     #1A1A1A;
  --cdu-blau:        #1F2A38;
  --cdu-blau-dunkel: #12181F;
  --cdu-blau-hell:   #34455A;
  --cdu-rot:         #E2001A;
  --cdu-rot-dunkel:  #B8000F;
  --cdu-akzent:      #439DDD;    /* Akzentblau – Navigation, Rahmen, Fokus */
  --cdu-akzent-dunkel: #347AAC;

  /* ── Kompatibilitäts-Aliases (für bestehende Komponenten) ── */
  --blue:       var(--cdu-blau);
  --blue-light: #e9edf0;
  --turkis:     var(--cdu-akzent);
  --turkis-light: #ebf5fb;
  --gold:       #C8A13B;
  --green:      #2E8B57;
  --green-light: #E7F4EC;

  /* ── Oberflächen & Schrift ── */
  --bg:       #F4F5F6;
  --bg-utility: #EDEEEF;
  --card-bg:  #FFFFFF;
  --text:     #1A1A1A;
  --text-muted: #6B7280;
  --border:   #E3E5E8;
  --gruen:    #2E8B57;

  /* ── Geometrie ── */
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 1px 3px rgba(26,26,26,.07), 0 1px 2px rgba(26,26,26,.05);
  --shadow-lg: 0 12px 32px rgba(18,24,31,.16);

  /* ── Layout (Plakatierungsapp-spezifisch) ── */
  --sidebar-w: 280px;
  --navbar-h:  60px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--cdu-blau); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--cdu-blau);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0;
}
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

:focus-visible {
  outline: 2px solid var(--cdu-akzent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Navbar (weißer Header im VM-Stil) ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--navbar-h);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  color: var(--cdu-blau);
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--cdu-blau);
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand img { height: 38px; width: auto; }
.navbar-brand svg { flex-shrink: 0; }
.navbar-right { display: flex; align-items: center; gap: 6px; }
.navbar-user { font-size: 13px; color: var(--text-muted); margin-right: 6px; }

/* Navbar-Buttons: transparent mit CDU-Blau-Rahmen */
.navbar .btn {
  background: transparent;
  color: var(--cdu-blau);
  border-color: var(--border);
  font-weight: 600;
}
.navbar .btn:hover {
  background: var(--bg);
  border-color: var(--cdu-blau);
}

/* Aktiver Nav-Link: Akzentblau-Unterstrich */
.navbar .btn.active,
.navbar a.active {
  color: var(--cdu-blau);
  border-bottom: 2px solid var(--cdu-akzent);
}

/* ── Layout ── */
.layout {
  display: flex;
  margin-top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar-stats { padding: 1rem; border-bottom: 1px solid var(--border); }
.stat-row { display: flex; gap: 8px; margin-bottom: 8px; }
.stat-row-3 .stat-block,
.stat-row-4 .stat-block { flex: 1; }
.stat-block {
  background: var(--bg); border-radius: var(--radius);
  padding: 8px 10px; text-align: center;
  border: 1px solid var(--border);
}
.stat-row-4 .stat-block { padding: 8px 4px; }
.stat-row-4 .stat-val  { font-size: 18px; }
.stat-row-4 .stat-label { font-size: 10px; }
.stat-val   { font-size: 22px; font-weight: 800; color: var(--cdu-blau); }
.stat-label { font-size: 11px; color: var(--text-muted); }
.stat-total .stat-val { font-size: 28px; }
.stat-green { color: var(--green); }
.stat-blue  { color: var(--cdu-blau); }
.stat-gold  { color: #d97706; }
.stat-gray  { color: #9ca3af; }

.progress-wrap  { margin-top: 8px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; color: var(--text-muted); }
.progress-bar   { background: var(--border); border-radius: 99px; height: 6px; overflow: hidden; }
.progress-fill  { background: var(--green); height: 100%; border-radius: 99px; transition: width .3s; }

.sidebar-section { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); margin-bottom: .5rem;
}
.filter-group  { margin-bottom: .5rem; }
.filter-label  { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 3px; }
.filter-checks { display: flex; flex-direction: column; gap: 3px; }
.check-label   { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.dot           { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-blue  { background: var(--cdu-akzent); }
.dot-gold  { background: #d97706; }
.dot-green { background: #22c55e; }
.dot-gray  { background: #9ca3af; }

.sidebar-bereiche { flex: 1; overflow-y: auto; }
.bereich-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; cursor: pointer; border-radius: var(--radius);
  transition: background .1s;
}
.bereich-item:hover { background: var(--turkis-light); margin: 0 -4px; padding: 6px 4px; }
.bereich-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.bereich-name { font-size: 12px; font-weight: 600; color: var(--cdu-blau); }
.bereich-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pill-green { background: var(--green-light); color: #1F6B42; padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.pill-blue  { background: #EBEFF3; color: var(--cdu-blau); padding: 1px 5px; border-radius: 3px; font-size: 11px; }

/* ── Main ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.main-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: white; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.main-title { font-size: 16px; font-weight: 700; color: var(--cdu-blau); }
.toolbar-actions { display: flex; gap: 8px; }

#map { flex: 1; min-height: 0; }

.map-legend {
  display: flex; gap: 16px; padding: .5rem 1rem;
  background: white; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted); flex-shrink: 0;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 6px;
  border: 1px solid transparent;
  background: white; color: var(--text);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  text-decoration: none; white-space: nowrap; font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--cdu-blau); color: white; border-color: var(--cdu-blau); }
.btn-primary:hover { background: var(--cdu-blau-hell); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--cdu-blau); }
.btn-danger { background: white; border-color: #F2C6C6; color: var(--cdu-rot); }
.btn-danger:hover { background: #FCEAEA; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
.btn-lg { font-size: 15px; padding: 11px 24px; }
.btn-full, .btn-block { width: 100%; justify-content: center; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.hidden { display: none !important; }

/* ── Flash-Nachrichten ── */
.flash {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; border-left: 4px solid transparent;
  margin-bottom: 16px;
}
.flash-erfolg { background: #EAF6EF; color: #1F6B42; border-left-color: var(--green); }
.flash-fehler { background: #FCEAEA; color: #A5231F; border-left-color: var(--cdu-rot); }
.flash-warnung { background: #FEF3DD; color: #8A5D0A; border-left-color: #E8A020; }
.flash-info   { background: #EBEFF3; color: var(--cdu-blau); border-left-color: var(--cdu-blau); }
/* Kompatibilität mit bestehenden alert-Klassen */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.alert-error { background: #FCEAEA; color: #A5231F; border: 1px solid #F5BCBC; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--cdu-blau); color: white;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: slideup .2s ease;
}
.toast.err { background: var(--cdu-rot); }
@keyframes slideup { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Formulare ── */
label {
  display: block;
  font-size: 12px; font-weight: 700; color: var(--cdu-blau);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.form-group { margin-bottom: 16px; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 1rem 1.25rem; }

input[type=text], input[type=email], input[type=password],
input[type=date], input[type=datetime-local], input[type=search],
input[type=tel], textarea, select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: white; box-sizing: border-box;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--cdu-blau);
  box-shadow: 0 0 0 3px rgba(31,42,56,.1);
}
textarea { resize: vertical; min-height: 90px; }

/* ── Karten ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }

/* ── Tabellen ── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg); }
tr:hover td { background: #FAFBFC; }
tr:last-child td { border-bottom: none; }
.table-wrap { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }

/* Status-Badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.status-haengt    { background: #E7F4EC; color: #1F6B42; }
.status-vorhanden { background: #EBEFF3; color: var(--cdu-blau); }
.status-geplant   { background: #FEF3DD; color: #8A5D0A; }
.status-entfernt  { background: #EEF0F2; color: var(--text-muted); }
.typ-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: var(--bg); color: var(--cdu-blau); font-weight: 600; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: white; border-radius: var(--radius-lg);
  width: 100%; max-width: 580px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: white; z-index: 1;
  border-top: 4px solid var(--cdu-akzent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2 { font-size: 16px; font-weight: 700; color: var(--cdu-blau); }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal footer, .modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: white;
}
.modal form > *:not(.modal-footer):not(.modal-header) { padding: 0 1.25rem; }

.map-pick-hint {
  margin: 0 1.25rem .75rem;
  padding: 10px 14px; background: #FEF3DD;
  border-left: 4px solid #E8A020;
  border-radius: var(--radius);
  font-size: 12px; color: #8A5D0A;
}

/* ── Login ── */
.gast { background: var(--bg); }
.content-gast {
  max-width: 420px; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; padding: 2rem 1rem;
}
.login-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 38px 34px;
  width: 100%;
  border-top: 5px solid var(--cdu-akzent);
}
.login-brand {
  text-align: center; margin-bottom: 28px;
}
.login-brand .brand-logo {
  width: 100%; height: auto; max-height: 80px; object-fit: contain;
  display: block; margin: 0 auto;
}

/* ── Seiten-Layout ── */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 3px solid var(--cdu-akzent);
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--cdu-blau); }
.page-header p  { color: var(--text-muted); margin: 4px 0 0; font-size: 13px; }
.list-filters { display: flex; gap: 10px; margin-bottom: 1rem; flex-wrap: wrap; }
.list-filters input,
.list-filters select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

/* ── Teams-Sidebar (spezifisch) ── */
.tw-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: white; border-right: 1px solid var(--border);
  overflow-y: auto; display: flex; flex-direction: column;
}
.tw-sec { padding: .875rem 1rem; border-bottom: 1px solid var(--border); }
.tw-hd {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  margin-bottom: .6rem; display: flex; justify-content: space-between; align-items: center;
}
.tw-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tw-lbl { font-size: 12px; color: var(--text); }
.tw-btn-mini {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; color: var(--text); font-weight: 600;
}
.tw-btn-mini:hover { border-color: var(--cdu-blau); color: var(--cdu-blau); }
.tw-btn-mini.danger { border-color: #F2C6C6; color: var(--cdu-rot); }
.tw-btn-mini.danger:hover { background: #FCEAEA; }
.team-card {
  border-radius: 6px; padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.team-card:hover { border-color: var(--cdu-akzent); background: #f8fafb; }
.team-card.active { border-color: var(--cdu-akzent); background: #EBEFF3; }
.team-card-name { font-size: 13px; font-weight: 700; color: var(--cdu-blau); }
.team-card-count { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Toggle-Switches ── */
.tog { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.tog input { opacity: 0; width: 0; height: 0; }
.tog-track {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--border); cursor: pointer;
  transition: background .2s;
}
.tog input:checked + .tog-track { background: var(--cdu-blau); }
.tog-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  cursor: pointer; transition: transform .2s;
}
.tog input:checked ~ .tog-thumb { transform: translateX(16px); }

/* ── Map-Toolbar (Karte oben rechts) ── */
.map-toolbar {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  display: flex; flex-direction: column; gap: 6px;
}
.tw-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 10px 14px;
  font-size: 12px; min-width: 175px;
  box-shadow: var(--shadow);
}
.tw-card-hd {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); margin-bottom: 8px;
}

/* ── Zuweisungs-Formulare ── */
.assign-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.assign-form select {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; background: white; color: var(--text);
}
.assign-form .af-preview { font-size: 11px; color: var(--text-muted); min-height: 14px; line-height: 1.4; }
.assign-form .af-btn {
  width: 100%; background: var(--cdu-blau); color: white;
  border-color: var(--cdu-blau); font-size: 12px; padding: 6px 0;
}
.assign-form .af-btn:hover { background: var(--cdu-blau-hell); }

/* ── Assign-Bar (Mehrfachauswahl) ── */
.assign-bar { display: none; align-items: center; gap: 10px; padding: 10px 1rem; background: #FEF3DD; border-bottom: 1px solid #F5DEA6; font-size: 13px; }
.assign-bar.vis { display: flex; }
.assign-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: white; }

/* ── Optimierungs-Seite ── */
.ot-wrap { max-width: 1100px; margin: 52px auto 0; padding: 1.5rem 1rem; }
.ot-source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 8px; margin-bottom: 1.25rem; }
.ot-source { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.ot-source-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.ot-source-val { font-size: 22px; font-weight: 800; color: var(--cdu-blau); margin: 2px 0; }
.ot-source-sub { font-size: 11px; color: var(--text-muted); }
.ot-weights { background: var(--bg); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 1.25rem; border: 1px solid var(--border); }
.ot-weights-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ot-weights-title { font-size: 13px; font-weight: 700; color: var(--cdu-blau); }
.ot-weights-total { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; transition: background .2s, color .2s; }
.ot-weights-total.ok  { background: #E7F4EC; color: #1F6B42; }
.ot-weights-total.err { background: #FCEAEA; color: #A5231F; }
.ot-weight-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ot-weight-lbl { width: 200px; flex-shrink: 0; font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 5px; }
.ot-weight-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--cdu-blau) 0%, var(--cdu-blau) var(--val,35%), var(--border) var(--val,35%), var(--border) 100%);
}
.ot-weight-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cdu-blau); border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; }
.ot-weight-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--cdu-blau); border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; }
.ot-weight-pct { width: 40px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text); }
.ot-weight-footer { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 10px; gap: 12px; }
.ot-weight-hint { font-size: 11px; color: var(--text-muted); flex: 1; line-height: 1.5; }

/* ── Tooltip ── */
.tip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  font-size: 10px; font-weight: 700; cursor: default; flex-shrink: 0; line-height: 1; user-select: none;
}
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  background: var(--cdu-blau); color: #f9fafb;
  font-size: 11px; font-weight: 400; line-height: 1.5;
  padding: 7px 10px; border-radius: 6px; width: 260px;
  white-space: normal; pointer-events: none; opacity: 0;
  transition: opacity .15s; z-index: 100; box-shadow: var(--shadow-lg);
}
.tip:hover::after { opacity: 1; }

/* ── Kabelbinder-Box ── */
.kabelbinder-box { background: #FEF3DD; border: 1px solid #F5DEA6; border-radius: var(--radius-lg); padding: 12px 16px; margin-top: 1.5rem; display: flex; align-items: center; gap: 16px; }
.kabelbinder-icon { font-size: 24px; flex-shrink: 0; }
.kabelbinder-text { font-size: 13px; color: var(--text); line-height: 1.6; }
.kabelbinder-zahl { font-size: 18px; font-weight: 800; color: #8A5D0A; }

/* ── Street-Tooltip (Leaflet) ── */
.street-tip { background: var(--cdu-blau); color: white; border: none; border-radius: 5px; font-size: 11px; font-weight: 600; padding: 4px 8px; box-shadow: var(--shadow); }

/* ── Print ── */
@media print {
  .navbar, .sidebar, .map-toolbar, .assign-bar, .btn, .flash, .no-print { display: none !important; }
  body { font-size: 12pt; color: #000; background: white; }
  .card { border: none; box-shadow: none; padding: 0; margin: 0 0 16pt; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .navbar { padding: 0 1rem; }
  .sidebar, .tw-sidebar { display: none; }
}
@media (max-width: 440px) {
  .login-card { padding: 24px 20px; }
}


/* ══════════════════════════════════════════════════════
   UX-Patch v2.0.5
   ══════════════════════════════════════════════════════ */

/* ── Patch #1: Responsive Navbar ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; cursor: pointer;
  border: none; background: none; border-radius: 6px; padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--cdu-blau); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none !important;
  position: fixed; top: var(--navbar-h); left: 0; right: 0; bottom: 0;
  background: white; z-index: 999; overflow-y: auto;
  padding: 1rem; border-top: 1px solid var(--border);
  flex-direction: column; gap: 4px;
}
.nav-drawer.open { display: flex !important; animation: drawerIn .2s ease; }
.nav-drawer .btn {
  width: 100%; justify-content: flex-start;
  padding: 13px 16px; font-size: 15px;
  border-radius: 8px; border-color: transparent;
  color: var(--cdu-blau);
}
.nav-drawer .btn:hover { background: var(--bg); border-color: transparent; }
.nav-drawer .nav-divider { height: 1px; background: var(--border); margin: 6px 0; }
@keyframes drawerIn { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }

/* ── Patch #5: Touch Targets ── */
.check-label { min-height: 36px; padding: 4px 0; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; cursor: pointer; }

/* ── Patch #4: Loading State ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, #e9eaeb 50%, var(--bg) 75%);
  background-size: 200% 100%; border-radius: 4px;
  animation: skeletonShimmer 1.4s infinite;
}
@keyframes skeletonShimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }

.loading-overlay {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.75); z-index: 500; border-radius: inherit;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--cdu-blau);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Patch #4: Empty State ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
  color: var(--text-muted);
}
.empty-state svg { opacity: .35; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; max-width: 300px; line-height: 1.6; }

/* ── Patch #3: Aktionen-Dropdown ── */
.action-menu-wrap { position: relative; display: inline-block; }
.action-menu-btn {
  border: 1px solid var(--border); background: white; border-radius: 6px;
  padding: 5px 10px; cursor: pointer; font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  transition: border-color .15s;
}
.action-menu-btn:hover { border-color: var(--cdu-blau); }
.action-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: white; border: 1px solid var(--border); border-radius: 8px;
  min-width: 180px; z-index: 200; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.action-dropdown.open { display: block; animation: drawerIn .15s ease; }
.action-dropdown button, .action-dropdown a {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px; border: none; background: none;
  font-size: 13px; text-align: left; cursor: pointer; color: var(--text);
  text-decoration: none; transition: background .1s;
}
.action-dropdown button:hover, .action-dropdown a:hover { background: var(--bg); }
.action-dropdown .danger { color: var(--cdu-rot); }
.action-dropdown .danger:hover { background: #FCEAEA; }
.action-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Patch #2: Modal-Verbesserung ── */
.modal-field { margin-bottom: 14px; }
.modal-field label { margin-bottom: 6px; }
.pw-strength {
  height: 4px; border-radius: 2px; background: var(--border);
  margin-top: 6px; overflow: hidden; transition: width .3s;
}
.pw-strength-bar {
  height: 100%; border-radius: 2px; transition: width .3s, background .3s;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-right { display: none; }
  .navbar-user { display: none; }
  /* Touch Targets */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; font-size: 13px; padding: 8px 12px; }
  /* Sidebar auf Mobile ausblenden (per Drawer erreichbar) */
  .sidebar { display: none; }
}
