@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bk-bg: #1f1f1e;
  --bk-bg-elevated: #2a2a28;
  --bk-bg-input: #333330;
  --bk-gold: #d4922a;
  --bk-gold-hover: #e8a33d;
  --bk-gold-soft: rgba(212, 146, 42, 0.1);
  --bk-text: #eceae4;
  --bk-text-muted: #9e9b92;
  --bk-border: #3d3c38;
  --bk-border-strong: #4a4945;
  --bk-danger: #c9574e;
  --bk-success: #5fa97c;
  --bk-success-dark: #2f6b47;
  --bk-info: #4a90d9;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 24px -12px rgba(0, 0, 0, 0.45);

  accent-color: var(--bk-gold);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bk-bg);
  color: var(--bk-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2 {
  color: var(--bk-gold);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bk-text-muted);
  margin: var(--space-6) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--bk-border);
}
h3:first-child { margin-top: 0; }

a { color: var(--bk-gold); }

.bk-shell { display: flex; min-height: 100vh; }

.bk-sidebar {
  width: 230px;
  background: var(--bk-bg-elevated);
  border-right: 1px solid var(--bk-border);
  padding: var(--space-5) var(--space-4);
  flex-shrink: 0;
}

.bk-sidebar-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--space-6);
}

.bk-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-1); }

.bk-nav a {
  display: block;
  padding: 0.55rem var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--bk-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}

.bk-nav a:hover { background: var(--bk-bg); color: var(--bk-gold); }

.bk-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--bk-gold);
  color: #211f1d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.bk-nav .bk-disabled {
  color: var(--bk-text-muted);
  padding: 0.55rem var(--space-3);
  cursor: default;
  font-size: 0.92rem;
  opacity: 0.6;
}

.bk-main { flex: 1; min-width: 0; padding: var(--space-6); }

.bk-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  color: var(--bk-text-muted);
  font-size: 0.9rem;
}

/* Mobile Shell: Sidebar wird unter dem Breakpoint zum Off-Canvas-Menue
   (per Hamburger-Button ein-/ausklappbar), da sie sonst fix 230px vom
   ohnehin knappen Platz auf einem Handy-Screen wegnimmt. */
.bk-hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--bk-border-strong);
  background: transparent;
  color: var(--bk-text);
  cursor: pointer;
}
.bk-hamburger-btn svg { width: 20px; height: 20px; }
.bk-hamburger-btn:hover { border-color: var(--bk-gold); color: var(--bk-gold); }

.bk-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
}

@media (max-width: 760px) {
  .bk-hamburger-btn { display: inline-flex; }
  .bk-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: 230px;
    max-width: 80vw;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .bk-sidebar.open { transform: translateX(0); }
  .bk-sidebar-backdrop.open { display: block; }
  .bk-main { padding: var(--space-4); }
  .bk-topbar { justify-content: space-between; }
}

.bk-pill-btn {
  background: var(--bk-gold);
  color: #211f1d;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.15s, transform 0.1s;
}

.bk-pill-btn:hover { background: var(--bk-gold-hover); }
.bk-pill-btn:active { transform: scale(0.98); }

.bk-pill-btn.secondary {
  background: transparent;
  border: 1.5px solid var(--bk-border-strong);
  color: var(--bk-text);
}
.bk-pill-btn.secondary:hover { background: transparent; border-color: var(--bk-gold); color: var(--bk-gold); }

.bk-card {
  background: var(--bk-bg-elevated);
  border: 1px solid var(--bk-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

/* Buchungsdetail: kartenloses Sektionslayout - Abschnitte trennen sich durch
   Ueberschrift (h3, s.o.) und Weissraum statt durch Kasten/Rahmen. */
.bk-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--bk-border);
}
.bk-detail-header h1 { margin: 0; font-size: 1.5rem; color: var(--bk-text); }

.bk-detail-facts { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.bk-detail-fact { display: flex; flex-direction: column; gap: 0.3rem; min-width: 90px; }
.bk-detail-fact-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bk-text-muted); }
.bk-detail-fact-value { font-size: 0.95rem; font-weight: 600; }
.bk-detail-fact select,
.bk-detail-fact .bk-check-label { font-size: 0.9rem; }

.bk-section { margin-bottom: var(--space-6); }
.bk-section:last-child { margin-bottom: 0; }

.bk-collapsible { border-bottom: 1px solid var(--bk-border); margin-bottom: var(--space-5); }
.bk-collapsible summary {
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bk-text-muted);
  padding: var(--space-3) 0;
  list-style: none;
}
.bk-collapsible summary::-webkit-details-marker { display: none; }
.bk-collapsible summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--bk-gold); }
.bk-collapsible[open] summary::before { content: '▾'; }
.bk-collapsible summary:hover { color: var(--bk-text); }
.bk-collapsible-body { padding: 0 0 var(--space-4); }

.bk-savebar {
  position: fixed;
  left: 230px;
  right: 0;
  bottom: 0;
  background: var(--bk-bg-elevated);
  border-top: 1px solid var(--bk-border);
  padding: var(--space-3) var(--space-6);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-3);
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.bk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 100;
}

.bk-modal {
  background: var(--bk-bg-elevated);
  border: 1px solid var(--bk-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.bk-modal-wide { max-width: 860px; }

.bk-richtext { border: 1.5px solid var(--bk-border); border-radius: var(--radius-sm); overflow: hidden; }
.bk-richtext-toolbar { display: flex; gap: var(--space-1); padding: var(--space-2); background: var(--bk-bg-input); border-bottom: 1px solid var(--bk-border); }
.bk-richtext-btn {
  background: transparent;
  border: 1px solid var(--bk-border-strong);
  color: var(--bk-text);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}
.bk-richtext-btn:hover { border-color: var(--bk-gold); color: var(--bk-gold); }
.bk-richtext-btn.active { background: var(--bk-gold); color: #211f1d; border-color: var(--bk-gold); }

/* Klickbarer Platzhalter-Chip (z.B. {{vorname}}) - fuegt sich per Klick in
   den zuletzt fokussierten bzw. zugeordneten Editor ein, statt dass man ihn
   von Hand abtippen/kopieren muss. */
.bk-placeholder-chip {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.78rem;
  background: var(--bk-bg-input);
  border: 1px solid var(--bk-border-strong);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  color: var(--bk-text);
  cursor: pointer;
  transition: all 0.15s;
}
.bk-placeholder-chip:hover { border-color: var(--bk-gold); color: var(--bk-gold); }
.bk-richtext-source {
  display: block;
  width: 100%;
  min-height: 200px;
  max-height: 50vh;
  padding: 0.75rem 0.9rem;
  background: var(--bk-bg-input);
  color: var(--bk-text);
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  border: none;
  resize: vertical;
}
.bk-richtext-source:focus { outline: none; }
.bk-richtext-editor {
  min-height: 320px;
  max-height: 60vh;
  overflow: auto;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 0.9rem;
  line-height: 1.5;
}
.bk-richtext-editor:focus { outline: none; }
.bk-richtext-editor ul { margin: 0.4rem 0; padding-left: 1.4rem; }
.bk-richtext-editor img { max-width: 100%; height: auto; }
/* Alte Inhalte koennen noch dunkle Inline-Hintergrundfarben aus der
   frueheren Dark-Mode-Editor-Version tragen - hier hart auf transparent
   erzwingen, damit ueberall der weisse Editorhintergrund durchscheint.
   Textfarben bleiben unangetastet (Signaturen duerfen farbig sein). */
.bk-richtext-editor * { background-color: transparent !important; }
.bk-richtext-editor table { max-width: 100%; }
.bk-richtext-editor a { color: #b5761e; }

.bk-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.bk-login-card { width: 100%; max-width: 360px; }

.bk-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.bk-field.span-2 { grid-column: span 2; }
.bk-field.span-full { grid-column: 1 / -1; }

/* Systemweites Breiten-System: genau zwei Seiten-Container, jede Seite
   bekommt genau einen davon statt einer eigenen Sonderbreite.
   - .bk-page--form: Formular-/Detailseiten (Settings, Buchungsdetail,
     Login-artige Formulare) - begrenzte Lesebreite, da breite Eingabefelder
     unangenehm sind.
   - .bk-page--wide: Tabellen-/Listenseiten (Buchungen, Wochenplan, Equipment
     & Preise, ...) - nutzt die verfuegbare Breite, aber mit grosszuegigem
     Maximum statt komplett ungebremst (.bk-main selbst hat keine Grenze). */
.bk-page--form { max-width: 1040px; }
.bk-page--wide { max-width: 1600px; }
/* Wie .bk-page--wide, aber ohne Maximum - fuer Tabellen mit vielen
   inhaltsreichen Spalten (z.B. Wochenplan), die bei 1600px trotzdem
   horizontal scrollen wuerden. Nutzt die volle Breite von .bk-main
   (dessen Padding weiterhin den Seitenrand liefert). */
.bk-page--full { max-width: none; }

/* Wochenplan mobil: Kartenansicht statt der breiten Desktop-Tabelle unter
   dem Breakpoint. Beide Renderings stehen im DOM, CSS blendet je nach
   Breite eines davon aus - Daten/Reihenfolge bleiben exakt gleich. */
.bk-week-mobile { display: none; }

.bk-week-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0.2rem;
  margin-top: var(--space-5);
  border-bottom: 1px solid var(--bk-border);
  color: var(--bk-gold);
  font-size: 0.85rem;
}
.bk-week-day-header:first-child { margin-top: 0; }
.bk-week-day-header a { font-size: 0.78rem; }

.bk-week-card {
  background: var(--bk-bg-elevated);
  border: 1px solid var(--bk-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  cursor: pointer;
}

.bk-week-card-top { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 0.4rem; }
.bk-week-card-name { font-size: 1.1rem; font-weight: 700; color: var(--bk-text); line-height: 1.3; }

.bk-week-card-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0;
  margin-bottom: 0.4rem;
}
.bk-week-card-location svg { flex-shrink: 0; }
a.bk-week-card-location { color: var(--bk-gold); }
div.bk-week-card-location { color: var(--bk-text-muted); font-weight: 400; }

.bk-week-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding-top: 0.5rem;
  margin-top: 0.2rem;
  border-top: 1px solid var(--bk-border);
}
.bk-week-card-details > div { color: var(--bk-text); }
.bk-week-card-label { color: var(--bk-text-muted); font-weight: 600; margin-right: 0.3rem; }

.bk-week-card-tel {
  color: var(--bk-gold);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  margin: -0.3rem -0.5rem;
  display: inline-block;
}

.bk-week-card-sonstiges {
  margin-top: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--bk-gold-soft);
  border-radius: var(--radius-sm);
  color: var(--bk-gold);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  .bk-week-desktop { display: none; }
  .bk-week-mobile { display: block; }
  .bk-week-nav { flex-direction: column; align-items: stretch; }
  .bk-week-nav .bk-pill-btn { text-align: center; }
}

/* Feste zweispaltige Variante fuer Settings-Formulare (statt des variablen
   auto-fit von .bk-form-grid, das bei ~1000px sonst 4+ Spalten packen
   wuerde). Nutzt dieselben .bk-field.span-2/.span-full Markierungen -
   bei genau zwei Spalten ist "span 2" ohnehin gleichbedeutend mit voller
   Breite. */
.bk-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-5);
}
@media (max-width: 640px) {
  .bk-settings-grid { grid-template-columns: 1fr; }
}

/* Zurueck-Button, zentral im Header-Partial gerendert (nur auf Unterseiten,
   die eine backUrl mitgeben - Hauptnavigationspunkte haben keinen). */
.bk-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: var(--space-4);
  font-size: 0.85rem;
  color: var(--bk-text-muted);
  text-decoration: none;
}
.bk-back-link:hover { color: var(--bk-gold); }

/* Spacer-Spalte fuer schmale Tabellen (z.B. Equipment & Preise): schluckt
   den ungenutzten Rest der Tabellenbreite, statt dass ihn table-layout:fixed
   gleichmaessig auf alle Spalten verteilt und Inhalts-Spalten auseinanderzieht. */
.bk-table-spacer { width: auto; }

.bk-field { margin-bottom: var(--space-4); }
.bk-field:last-child { margin-bottom: 0; }

.bk-field label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--bk-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.bk-field input,
.bk-field select,
.bk-field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--bk-border);
  background: var(--bk-bg-input);
  color: var(--bk-text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bk-field input:hover,
.bk-field select:hover,
.bk-field textarea:hover { border-color: var(--bk-border-strong); }

.bk-field input:focus,
.bk-field select:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--bk-gold);
  box-shadow: 0 0 0 3px rgba(212, 146, 42, 0.22);
}

.bk-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23a49d92' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  cursor: pointer;
}

.bk-field textarea { resize: vertical; min-height: 4rem; }

.bk-check-label {
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
  font-weight: normal;
  color: var(--bk-text);
  font-size: 0.9rem;
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin: 0;
  border: 1.5px solid var(--bk-border-strong);
  background: var(--bk-bg-input);
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
}
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }

input[type="checkbox"]:hover,
input[type="radio"]:hover { border-color: var(--bk-gold); }

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--bk-gold);
  border-color: var(--bk-gold);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 19 19' fill='none'%3E%3Cpath d='M4.5 9.5L7.5 12.5L14.5 5.5' stroke='%23211f1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #211f1d;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 146, 42, 0.3);
}

.bk-error {
  color: var(--bk-danger);
  background: rgba(224, 112, 95, 0.12);
  border: 1px solid rgba(224, 112, 95, 0.4);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  font-size: 0.9rem;
}

.bk-detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 0 0 var(--space-4); font-size: 0.9rem; }
.bk-detail-grid dt { color: var(--bk-text-muted); font-size: 0.78rem; }
.bk-detail-grid dd { margin: 0; }

.bk-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.bk-tab {
  background: transparent;
  border: 1.5px solid var(--bk-border-strong);
  color: var(--bk-text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
}
.bk-tab:hover { border-color: var(--bk-gold); }
.bk-tab.active { background: var(--bk-gold); color: #211f1d; border-color: var(--bk-gold); }

.bk-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.bk-dialog {
  background: var(--bk-bg-elevated);
  color: var(--bk-text);
  border: 1px solid var(--bk-border);
  border-radius: var(--radius-md, 12px);
  padding: 1.5rem;
  max-width: 480px;
  width: 90vw;
}
.bk-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.bk-dialog h3 { margin-top: 0; }

.bk-table th, .bk-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--bk-border);
  white-space: nowrap;
}

.bk-table th {
  color: var(--bk-text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bk-table tbody tr:hover { background: #34332f; }
.bk-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--bk-gold); }
.bk-table tbody tr:hover .bk-status-dot {
  filter: brightness(1.35);
  box-shadow: 0 0 5px 1px rgba(255, 255, 255, 0.35);
}

.bk-td-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Farbiger Status-Punkt am Zeilenanfang - Farbe wird per Inline-Style
   passend zum jeweiligen Status gesetzt (gold=gebucht, gruen=abgeschlossen,
   rot=storniert), diese Klasse liefert nur Form/Groesse. */
.bk-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.bk-row-clickable { cursor: pointer; }

.bk-row-unpaid { background: rgba(224, 112, 95, 0.14); }
.bk-row-done { background: rgba(95, 160, 108, 0.14); }
.bk-row-past { background: rgba(82, 77, 71, 0.4); color: var(--bk-text-muted); }
.bk-row-storniert { text-decoration: line-through; color: var(--bk-text-muted); }

.bk-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bk-bg-input);
  border: 1px solid var(--bk-border);
  color: var(--bk-text-muted);
}

.bk-route-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--bk-border);
  cursor: grab;
}
.bk-route-row:last-child { border-bottom: none; }
.bk-route-row.dragging { opacity: 0.4; }

.bk-route-order {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bk-bg-input);
  border: 1px solid var(--bk-border-strong);
  color: var(--bk-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-route-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  flex-wrap: wrap;
}

.bk-route-form input {
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--bk-border);
  background: var(--bk-bg-input);
  color: var(--bk-text);
  font-size: 0.85rem;
  font-family: inherit;
}
.bk-route-form input:focus { outline: none; border-color: var(--bk-gold); }

.bk-route-ort { flex: 0 1 220px; min-width: 140px; }
.bk-route-ort[readonly] { color: var(--bk-text-muted); border-color: transparent; background: transparent; }
.bk-route-km { width: 70px; }
.bk-route-notiz { flex: 1; min-width: 120px; }

.bk-route-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.bk-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--bk-border-strong);
  color: var(--bk-text);
  cursor: pointer;
  transition: all 0.15s;
}
.bk-icon-btn svg { width: 16px; height: 16px; }
.bk-icon-btn:hover { border-color: var(--bk-gold); color: var(--bk-gold); }
.bk-icon-btn:disabled { opacity: 0.5; cursor: default; }
.bk-icon-btn.danger:hover { border-color: var(--bk-danger); color: var(--bk-danger); }

.bk-save-indicator {
  font-size: 0.72rem;
  color: var(--bk-gold);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.bk-save-indicator.show { opacity: 1; }

/* Kompakte Stammlocations-Liste (Zeile statt aufgeklappter Karte, Details im
   Modal) - eine Zeile pro Location innerhalb einer gemeinsamen .bk-card. */
.bk-loc-list-card { padding: 0; }
.bk-loc-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--bk-border);
  cursor: pointer;
}
.bk-loc-row:last-child { border-bottom: none; }
.bk-loc-row.dragging { opacity: 0.4; }
.bk-loc-row-inactive { opacity: 0.55; }
.bk-loc-drag-handle { flex-shrink: 0; color: var(--bk-text-muted); cursor: grab; }
.bk-loc-row-sort-locked .bk-loc-drag-handle { opacity: 0.3; cursor: default; }
.bk-loc-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.bk-loc-row-name { font-weight: 700; }
.bk-loc-row-sub { color: var(--bk-text-muted); font-size: 0.85rem; }
.bk-loc-row-status { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.bk-loc-row-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.bk-loc-row-actions .bk-icon-btn { width: 1.75rem; height: 1.75rem; }
.bk-loc-row-actions .bk-icon-btn svg { width: 14px; height: 14px; }

.bk-inline-input {
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--bk-text);
  font-size: 0.85rem;
  font-family: inherit;
  min-width: 90px;
  max-width: 140px;
}
.bk-inline-input.bk-inline-input-wide { max-width: 190px; }
.bk-inline-input:hover { border-color: var(--bk-border); background: var(--bk-bg-input); }
.bk-inline-input:focus {
  outline: none;
  border-color: var(--bk-gold);
  background: var(--bk-bg-input);
  box-shadow: 0 0 0 3px rgba(212, 146, 42, 0.22);
}

select.bk-inline-input option { background: var(--bk-bg-elevated); color: var(--bk-text); }

select.bk-inline-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23a49d92' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.3rem center;
}
