﻿/* =========================================================================
   Taxi Live Tracking - Glassmorphism Dark Theme
   Single stylesheet, mobile-first, kein Framework, keine Praeprozessoren.
   Tokens via :root, Statusfarben als data-attribute.
   ========================================================================= */

/* ---------- 0. Reset & Basis --------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg) fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
img, svg, video, canvas, audio, iframe, embed, object { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:root {
  /* Farbpalette - dunkles Theme */
  --bg-0: #07091a;
  --bg-1: #0b1020;
  --bg-2: #131938;
  --bg-3: #1c2350;
  --text:   #e7ecff;
  --text-2: #aab3d6;
  --text-3: #6f78a3;

  --accent:      #5b8cff;       /* Hauptakzent */
  --accent-soft: rgba(91,140,255,.18);
  --accent-2:    #8a6cff;

  /* Status */
  --free:    #2ee08a;
  --busy:    #ff5c6b;
  --break:   #ffc24b;
  --offline: #6b7390;

  /* Glass */
  --glass-bg:     rgba(255,255,255,.06);
  --glass-bg-2:   rgba(255,255,255,.10);
  --glass-border: rgba(255,255,255,.12);
  --glass-blur:   16px;
  --glass-radius: 16px;
  --glass-shadow: 0 10px 30px rgba(0,0,0,.45);

  /* Spacing & Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 24px;
  --gap-6: 32px;
}

/* ---------- 1. Layout-Hintergrund --------------------------------- */
body {
  background:
    radial-gradient(1200px 600px at 8% -10%,  rgba(91,140,255,.25), transparent 60%),
    radial-gradient(1000px 500px at 110% 0%, rgba(138,108,255,.18), transparent 55%),
    radial-gradient(900px  500px at 50% 110%, rgba(46,224,138,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, var(--bg-2));
  background-attachment: fixed;
}

/* ---------- 2. Glass-Helfer --------------------------------------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: var(--glass-shadow);
}

/* ---------- 3. Utilities ------------------------------------------ */
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 4. Statusfarben --------------------------------------- */
:root {
  --status-free:    #2ee08a;
  --status-busy:    #ff5c6b;
  --status-break:   #ffc24b;
  --status-offline: #6b7390;
}
.status-dot, .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--status-offline);
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  flex-shrink: 0;
}
.status-dot[data-status="free"],    .dot-free    { background: var(--status-free);    box-shadow: 0 0 0 3px rgba(46,224,138,.18); }
.status-dot[data-status="busy"],    .dot-busy    { background: var(--status-busy);    box-shadow: 0 0 0 3px rgba(255,92,107,.18); }
.status-dot[data-status="break"],   .dot-break   { background: var(--status-break);   box-shadow: 0 0 0 3px rgba(255,194,75,.18); }
.status-dot[data-status="offline"], .dot-offline { background: var(--status-offline); }

.status-dot {
  width: 12px; height: 12px;
  position: relative;
}
.status-dot[data-status="free"]::after,
.status-dot[data-status="busy"]::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid currentColor;
  animation: pulse 1.6s ease-out infinite;
  color: var(--status-free);
}
.status-dot[data-status="busy"]::after { color: var(--status-busy); }

@keyframes pulse {
  0%   { transform: scale(.7); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0;  }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot[data-status="free"]::after,
  .status-dot[data-status="busy"]::after { animation: none; }
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}
.badge[data-status="free"]    { color: var(--status-free);    background: rgba(46,224,138,.12); border-color: rgba(46,224,138,.35); }
.badge[data-status="busy"]    { color: var(--status-busy);    background: rgba(255,92,107,.12); border-color: rgba(255,92,107,.35); }
.badge[data-status="break"]   { color: var(--status-break);   background: rgba(255,194,75,.12); border-color: rgba(255,194,75,.35); }
.badge[data-status="offline"] { color: var(--text-2);        background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); }
.badge[data-status="new"]       { color: #7fb0ff; background: rgba(91,140,255,.14); border-color: rgba(91,140,255,.38); }
.badge[data-status="assigned"],
.badge[data-status="confirmed"] { color: var(--status-break); background: rgba(255,194,75,.12); border-color: rgba(255,194,75,.35); }
.badge[data-status="picked_up"],
.badge[data-status="on_route"]  { color: var(--status-busy); background: rgba(255,92,107,.12); border-color: rgba(255,92,107,.35); }
.badge[data-status="completed"] { color: var(--status-free); background: rgba(46,224,138,.12); border-color: rgba(46,224,138,.35); }
.badge[data-status="cancelled"] { color: var(--text-2); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); }

/* ---------- 5. Login-Seite ---------------------------------------- */
.page-login { display: flex; align-items: center; justify-content: center; padding: var(--gap-5); min-height: 100dvh; }
.login-shell { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: var(--gap-4); }
.login-card { padding: 28px; }
.login-head { display: flex; align-items: center; gap: var(--gap-3); margin-bottom: var(--gap-4); }
.brand { display: flex; align-items: center; gap: var(--gap-3); }
.brand-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; box-shadow: 0 6px 20px rgba(91,140,255,.4);
}
.login-card h1 { font-size: 18px; margin: 0 0 2px; }
.login-card .muted { font-size: 13px; margin: 0; }

.tabs { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.04); border-radius: 10px; margin-bottom: var(--gap-4); }
.tab {
  flex: 1; padding: 8px 12px; border: 0; background: transparent;
  color: var(--text-2); border-radius: 8px; font-weight: 600; font-size: 13px;
}
.tab.is-active { background: var(--accent-soft); color: var(--text); }

.field-group { display: flex; flex-direction: column; gap: var(--gap-3); }
.field-group[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .02em; }
.field input,
.order-form input,
.order-form select,
.order-form textarea,
.order-actions select {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 12px 14px; border-radius: 10px; font-size: 15px;
  transition: border-color .15s, background .15s;
}
.field input::placeholder,
.order-form input::placeholder,
.order-form textarea::placeholder { color: var(--text-3); }
.field input:focus,
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus,
.order-actions select:focus { border-color: var(--accent); background: rgba(91,140,255,.08); outline: none; }
.order-form select,
.order-actions select { color-scheme: light; }

.form-actions { margin-top: var(--gap-4); display: flex; gap: var(--gap-2); }
.btn-primary {
  position: relative;
  width: 100%;
  padding: 13px 18px;
  border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 15px; letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(91,140,255,.35);
  transition: transform .08s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .7; filter: saturate(.7); cursor: progress; }
.btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: white; animation: spin .8s linear infinite; margin-left: 8px; }
.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label   { opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
}
.btn-ghost:hover { background: rgba(255,255,255,.10); }

.form-error {
  margin: var(--gap-3) 0 0; color: var(--status-busy); font-size: 13px; min-height: 1em;
}
.form-hint { margin: var(--gap-3) 0 0; color: var(--text-3); font-size: 12px; line-height: 1.5; }
.form-hint code { background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; font-size: 11.5px; }

.login-foot { text-align: center; color: var(--text-3); }

/* ---------- 6. App-Bar (sticky) ---------------------------------- */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-3);
  margin: 12px;
  padding: 10px 14px;
  border-radius: var(--r-lg);
}
.app-bar-l, .app-bar-r { display: flex; align-items: center; gap: var(--gap-3); }
.app-bar-id { display: flex; flex-direction: column; line-height: 1.15; }
.app-bar-id strong { font-size: 14px; }
.app-bar-id small  { font-size: 11.5px; color: var(--text-2); }
.conn { color: var(--text-2); display: inline-flex; align-items: center; }
.conn[data-state="ok"]     { color: var(--status-free); }
.conn[data-state="warn"]   { color: var(--status-break); }
.conn[data-state="off"]    { color: var(--status-busy); }
.legend { display: none; gap: var(--gap-3); align-items: center; font-size: 12px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }

@media (min-width: 880px) {
  .legend { display: inline-flex; }
}

/* ---------- 7. Driver-App ----------------------------------------- */
.page-driver { display: flex; flex-direction: column; min-height: 100dvh; }
.driver-main { flex: 1; display: flex; flex-direction: column; gap: var(--gap-3); padding: 0 12px 96px; }

.map-wrap { position: relative; overflow: hidden; min-height: 360px; flex: 1; }
.map { position: absolute; inset: 0; background: var(--bg-2); }
.map-error {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.4); color: var(--text-2); padding: 20px; text-align: center;
}
.map-error[hidden] { display: none !important; }
.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    var(--bg-2);
  background-size: 36px 36px;
}

.status-panel { padding: 14px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: var(--text); font-size: 13px; font-weight: 600;
  transition: background .12s, border-color .12s, transform .08s;
}
.status-btn:hover { background: rgba(255,255,255,.08); }
.status-btn:active { transform: translateY(1px); }
.status-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,140,255,.10);
}
.status-btn .status-dot { width: 14px; height: 14px; }
#last-send { margin: 10px 2px 0; }

.ride-panel { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ride-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ride-tab {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--text-2);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
}
.ride-tab.is-active { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.ride-list { display: flex; flex-direction: column; gap: 10px; max-height: 42dvh; overflow-y: auto; }
.ride-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 12px;
}
.ride-card header,
.order-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ride-card dl { display: grid; grid-template-columns: 74px 1fr; gap: 5px 10px; margin: 0; font-size: 13px; }
.ride-card dt { color: var(--text-2); }
.ride-card dd { margin: 0; word-break: break-word; }
.ride-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ride-actions .btn-primary,
.ride-actions .btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; }
.ride-actions .btn-primary { grid-column: 1 / -1; }

/* ---------- 8. Admin-Grid ---------------------------------------- */
.page-admin { display: flex; flex-direction: column; min-height: 100dvh; }
.admin-grid {
  flex: 1; display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  gap: 12px;
  padding: 0 12px 12px;
  min-height: 0;
}
.admin-grid .map-wrap { min-height: 320px; }
.sidebar {
  display: flex; flex-direction: column;
  min-height: 280px;
  max-height: 50vh;
  overflow: hidden;
}

.dispatch-panel {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dispatch-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dispatch-widgets span {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dispatch-widgets strong { font-size: 18px; line-height: 1; }
.dispatch-widgets small { color: var(--text-2); font-size: 11px; }
.order-form { display: flex; flex-direction: column; gap: 8px; }
#order-search {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
}
#order-search::placeholder { color: var(--text-3); }
#order-search:focus { border-color: var(--accent); background: rgba(91,140,255,.08); outline: none; }
.import-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.file-picker {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text-2);
  font-size: 12px;
}
.file-picker input { width: 100%; font-size: 12px; color: var(--text-2); }
.import-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(91,140,255,.08);
  border: 1px solid rgba(91,140,255,.22);
  border-radius: 12px;
  padding: 10px;
}
.import-preview[hidden] { display: none !important; }
.import-preview header { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.import-preview header strong { font-size: 13px; }
.import-preview .btn-primary { width: auto; padding: 8px 10px; font-size: 12px; }
.import-table { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.import-table article {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  padding: 8px;
}
.import-table article.is-incomplete { border-color: rgba(255,194,75,.45); }
.import-table strong { font-size: 13px; }
.import-table span,
.import-table small { color: var(--text-2); font-size: 11.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-grid input:nth-child(3),
.form-grid input:nth-child(4) { grid-column: 1 / -1; }
.form-grid input[type="hidden"] { display: none; }
.form-grid input[name="start_address"],
.form-grid input[name="destination_address"] { grid-column: 1 / -1; }
.driver-order-form[hidden] { display: none !important; }
.order-form input,
.order-form select,
.order-form textarea,
.order-actions select { padding: 9px 10px; font-size: 13px; }
.order-form textarea { resize: vertical; min-height: 54px; }
.check-inline { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; }
.check-inline input { width: auto; accent-color: var(--accent); }
.order-list { display: flex; flex-direction: column; gap: 8px; max-height: 36dvh; overflow-y: auto; }
.order-list .empty,
.ride-list .empty { color: var(--text-3); padding: 14px; text-align: center; font-size: 13px; }
.order-item {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 10px;
}
.order-item p { margin: 0 0 5px; color: var(--text); font-size: 13px; word-break: break-word; }
.order-item small { display: block; color: var(--text-2); font-size: 11.5px; }
.order-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin: 9px 0 6px; }
.order-actions .btn-ghost { padding: 7px 9px; }

@media (min-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr 360px;
    grid-template-rows: 1fr;
  }
  .sidebar { max-height: calc(100dvh - 100px); }
}

@media (min-width: 1180px) {
  .admin-grid { grid-template-columns: 1fr 430px; }
}

.map-stats {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(7,9,26,.6);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  padding: 6px 10px; font-size: 12px; color: var(--text-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.map-stats [data-k="free"]    { color: var(--status-free); font-weight: 700; }
.map-stats [data-k="busy"]    { color: var(--status-busy); font-weight: 700; }
.map-stats [data-k="break"]   { color: var(--status-break); font-weight: 700; }
.map-stats [data-k="offline"] { color: var(--text-2); }

/* ---------- 9. Sidebar / Fahrerliste ----------------------------- */
.sidebar-head { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.sidebar-head input[type="search"] {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  padding: 9px 12px; border-radius: 10px; font-size: 14px;
}
.sidebar-head input[type="search"]:focus { border-color: var(--accent); outline: none; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text-2);
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.chip.is-active { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }

.driver-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.driver-list .empty { color: var(--text-3); padding: 16px; text-align: center; font-size: 13px; }
.driver-item {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 10px; border-radius: 10px; cursor: pointer; user-select: none;
  transition: background .12s;
}
.driver-item:hover { background: rgba(255,255,255,.06); }
.driver-item.is-active { background: var(--accent-soft); }
.driver-item .meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.driver-item .meta strong { font-size: 14px; }
.driver-item .meta small  { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-item .when { font-size: 11px; color: var(--text-3); }

.sidebar-foot { padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.08); color: var(--text-3); text-align: right; }

/* ---------- 10. Driver-Popup (Admin) ----------------------------- */
.driver-popup {
  position: fixed; right: 16px; bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  z-index: 50;
  transform: translateY(0); opacity: 1;
  transition: transform .2s, opacity .2s;
}
.driver-popup[hidden] { display: none; }
.driver-popup h3 { margin: 0 0 8px; font-size: 16px; }
.popup-close {
  position: absolute; top: 8px; right: 8px;
  background: transparent; border: 0; color: var(--text-2); font-size: 22px; line-height: 1;
  width: 32px; height: 32px; border-radius: 8px;
}
.popup-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
.popup-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.popup-grid dt { color: var(--text-2); }
.popup-grid dd { margin: 0; word-break: break-word; }

@media (min-width: 980px) {
  .driver-popup { right: 392px; }
}

/* ---------- 11. Toast --------------------------------------------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 16px;
  padding: 10px 14px;
  background: rgba(7,9,26,.85);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  animation: toastIn .2s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 12. Install-Checkliste -------------------------------- */
.check-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 13.5px;
}
.check.is-ok   { border-color: rgba(46,224,138,.35); background: rgba(46,224,138,.08); }
.check.is-fail { border-color: rgba(255,92,107,.35); background: rgba(255,92,107,.08); }
.check-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.10); flex-shrink: 0; }
.check.is-ok   .check-mark { background: rgba(46,224,138,.25); color: var(--status-free); }
.check.is-fail .check-mark { background: rgba(255,92,107,.25); color: var(--status-busy); }

/* ---------- 13. Google Maps Optik-Anpassungen --------------------- */
.gm-style-iw, .gm-style-iw-c, .gm-style-iw-d { background: rgba(15,18,40,.92) !important; color: var(--text) !important; border-radius: 12px !important; }
.gm-style-iw button.gm-ui-hover-effect { background: rgba(255,255,255,.08) !important; }
.gm-style-iw .gm-style-iw-t::after { background: linear-gradient(45deg, rgba(15,18,40,.92) 50%, transparent 50%) !important; }
.gmnoprint, .gm-svpc, .gm-fullscreen-control { filter: invert(1) hue-rotate(180deg) saturate(.6); }

/* ---------- 14. Vollbild-Toggle (Admin) -------------------------- */
:fullscreen .app-bar,
:-webkit-full-screen .app-bar { margin: 8px; }
:fullscreen .map-stats,
:-webkit-full-screen .map-stats { font-size: 14px; padding: 8px 12px; }

/* ---------- 15. Sehr kleine Screens ------------------------------ */
@media (max-width: 360px) {
  .status-grid { grid-template-columns: 1fr 1fr 1fr; }
  .app-bar { padding: 8px 10px; margin: 8px; }
  .app-bar-r .btn-ghost { padding: 6px 8px; font-size: 12px; }
}

/* ---------- 16. Print --------------------------------------------- */
@media print {
  body { background: white; color: black; }
  .glass { background: white; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
  .app-bar, .sidebar, .map-wrap, .toast { display: none !important; }
}

/* ---------- 17. Professioneller Dispatch-Arbeitsplatz ------------ */
.workspace-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.workspace-title small,
.section-label { color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.workspace-title h2 { margin: 2px 0 0; font-size: 16px; line-height: 1.2; }
.workspace-badge {
  padding: 4px 9px; border-radius: 999px; color: var(--status-free);
  background: rgba(46,224,138,.12); border: 1px solid rgba(46,224,138,.3);
  font-size: 11px; font-weight: 800;
}
.fleet-management { display: flex; flex-direction: column; min-height: 240px; flex: 1; overflow: hidden; }
.dispatch-management { min-height: 0; flex: 1.35; overflow: hidden; }
.dispatch-management .order-list { flex: 1; max-height: none; min-height: 160px; }
.order-workspace { overflow-y: auto; min-width: 0; }
.order-workspace .dispatch-panel { border: 0; }
.workspace-help {
  display: flex; flex-direction: column; gap: 5px; margin-top: 4px; padding: 12px;
  border-radius: 12px; background: rgba(91,140,255,.08); border: 1px solid rgba(91,140,255,.18);
}
.workspace-help strong { font-size: 12px; }
.workspace-help span { color: var(--text-2); font-size: 11.5px; line-height: 1.45; }

@media (min-width: 1120px) {
  .page-admin { height: 100dvh; overflow: hidden; }
  .page-admin .app-bar { flex: 0 0 auto; }
  .admin-grid {
    grid-template-columns: minmax(300px, 22vw) minmax(460px, 1fr) minmax(330px, 23vw);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }
  .admin-grid .map-wrap { grid-column: 2; grid-row: 1; min-height: 0; }
  .admin-rail { grid-column: 1; grid-row: 1; max-height: none; min-height: 0; }
  .order-workspace { grid-column: 3; grid-row: 1; max-height: none; min-height: 0; }
  .driver-popup { right: calc(23vw + 28px); }
}

@media (min-width: 1600px) {
  .admin-grid { grid-template-columns: 360px minmax(640px, 1fr) 390px; }
  .driver-popup { right: 418px; }
}

@media (max-width: 1119px) {
  .admin-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(420px, 60dvh) auto; }
  .admin-rail { grid-row: 1; max-height: 70dvh; }
  .admin-grid .map-wrap { grid-row: 2; }
  .order-workspace { grid-row: 3; }
}
/* Modulare Disposition: Navigation, Startseite, Kunden, Serien und Archiv */
.admin-nav{display:flex;gap:.35rem;align-items:center}.admin-nav a{color:#b8c0dd;text-decoration:none;padding:.62rem .8rem;border-radius:.65rem;white-space:nowrap}.admin-nav a:hover,.admin-nav a.is-active{background:#344a80;color:#fff}
.dashboard-grid{display:grid;grid-template-columns:320px minmax(420px,1fr) 380px;gap:12px;height:calc(100vh - 88px);padding:0 12px 12px}.dashboard-fleet,.dashboard-orders{min-height:0;overflow:auto}.dashboard-orders{padding:14px}.dashboard-fleet{display:flex;flex-direction:column}.dashboard-fleet .driver-list{flex:1;min-height:0}.page-dashboard .map-wrap{min-height:0}
.page-orders .admin-grid{grid-template-columns:minmax(420px,1fr) minmax(420px,520px)}.page-orders .map-wrap{display:none}.page-orders .admin-rail{min-width:0}.page-orders .order-workspace{min-width:0}.field-wide{display:grid;gap:.35rem;color:#aeb8d5;font-size:.8rem;margin-bottom:.7rem}.field-wide select,.price-tools select{width:100%}.price-tools{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin:.65rem 0}
.operations-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(340px,1fr) minmax(420px,1.35fr);gap:14px;padding:0 14px 14px;min-height:calc(100vh - 90px)}.operations-panel{padding:18px;overflow:auto}.stack-form{display:grid;gap:10px}.stack-form input,.stack-form select,.stack-form textarea,.archive-filters input,.archive-filters select{width:100%}.record-list{display:grid;gap:8px;margin-top:14px}.record-card{display:grid;gap:4px;text-align:left;width:100%;background:#1b2544;border:1px solid #34405f;border-radius:12px;padding:12px;color:#e8ecff}.record-card:hover{border-color:#668cff}.record-card small,.record-card span{color:#aeb8d5}.weekday-row{display:flex;gap:10px;flex-wrap:wrap;border:1px solid #34405f;border-radius:10px}.weekday-row label{display:flex;gap:4px;align-items:center}.weekday-row input{width:auto}
.archive-main{display:grid;gap:14px;padding:0 14px 14px}.archive-filters{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:9px}.archive-results{display:grid;gap:8px}.archive-row{display:grid;grid-template-columns:1fr .65fr 2fr 1fr .6fr auto;align-items:center;gap:12px;padding:11px;border:1px solid #34405f;border-radius:10px;background:#151e37}.archive-row span{color:#bac3df;font-size:.86rem}
@media(max-width:1250px){.dashboard-grid{grid-template-columns:280px 1fr}.dashboard-orders{grid-column:1/-1;max-height:330px}.operations-grid{grid-template-columns:1fr 1fr}.series-panel{grid-column:1/-1}.archive-filters{grid-template-columns:repeat(3,1fr)}.archive-row{grid-template-columns:1fr 1fr 2fr}.admin-nav a{padding:.5rem;font-size:.82rem}}
@media(max-width:760px){.admin-nav{order:3;width:100%;overflow:auto}.app-bar{height:auto;flex-wrap:wrap}.dashboard-grid,.operations-grid{display:block;height:auto}.dashboard-grid>*{min-height:500px;margin-bottom:10px}.page-orders .admin-grid{display:block}.archive-filters,.archive-row{grid-template-columns:1fr}.operations-panel{margin-bottom:10px}}

/* Bedienfreundliche Formulare im Stil eines lokalen UI-Frameworks.
   Bewusst ohne externes CDN, damit die Zentrale auch bei CDN-Ausfall bedienbar bleibt. */
.page-admin{font-size:16px}.app-bar{gap:18px}.app-bar-r{gap:10px;flex-wrap:wrap}.admin-nav{gap:7px}.admin-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 15px;border:1px solid #52638f;background:#202c50;color:#f5f7ff;font-size:15px;font-weight:700;box-shadow:0 2px 5px rgba(0,0,0,.25)}.admin-nav a:hover{background:#344b82;border-color:#83a2ff;text-decoration:none}.admin-nav a.is-active{background:#4d72d3;border-color:#91adff;color:#fff}
.btn-secondary,.btn-danger-soft{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:9px;border:1px solid #6f87bf;font-weight:750;color:#fff;background:#314672;box-shadow:0 2px 5px rgba(0,0,0,.3)}.btn-secondary:hover{background:#42619c}.btn-danger-soft{background:#762f3b;border-color:#b75162}.btn-danger-soft:hover{background:#913a49}
.page-orders .btn-ghost,.page-orders .order-actions .btn-ghost,.page-orders #btn-calculate-price{min-height:42px;border:1px solid #7185ba;background:#2d3e6a;color:#fff;font-weight:700;box-shadow:0 2px 5px rgba(0,0,0,.28)}.page-orders .btn-ghost:hover,.page-orders .order-actions .btn-ghost:hover{background:#47639f;border-color:#9bb4ff}.page-orders .order-actions [data-action="cancel"]{background:#6b303b;border-color:#a64b5b}.page-orders .order-actions [data-action="assign"]{background:#315f50;border-color:#4d9a7f}
.customer-layout,.series-layout{display:grid;gap:18px;padding:0 18px 18px;min-height:calc(100vh - 92px)}.customer-layout{grid-template-columns:minmax(340px,.85fr) minmax(520px,1.3fr)}.series-layout{grid-template-columns:minmax(560px,1.35fr) minmax(360px,.8fr)}.operations-panel h1{font-size:24px;line-height:1.25;margin:0 0 14px;color:#fff}.form-help{color:#d5dcf2;font-size:16px;margin:-5px 0 18px}.accessible-form{display:grid;gap:16px}.accessible-form>div,.accessible-form .form-columns>div{display:grid;gap:6px}.accessible-form label,.form-label{display:block;color:#f2f5ff;font-weight:700;font-size:16px}.form-control,.form-select,.accessible-form textarea{display:block;width:100%;min-height:48px;padding:11px 13px;border:2px solid #6476a7;border-radius:9px;background:#f8f9fc;color:#12172a;font-size:17px;line-height:1.35}.form-control::placeholder{color:#61697a;opacity:1}.form-control:focus,.form-select:focus,.accessible-form textarea:focus{outline:3px solid rgba(110,151,255,.35);border-color:#5b8cff;box-shadow:0 0 0 2px #182448}.form-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important}.btn-large{min-height:52px;font-size:18px;font-weight:800}.large-check{display:flex!important;align-items:center;gap:12px;padding:13px 15px;border:2px solid #52668f;border-radius:10px;background:#1b2848}.large-check input,.weekday-row input{width:22px!important;height:22px;accent-color:#5b8cff}.weekday-row{padding:13px 15px;gap:16px;background:#18233f}.weekday-row legend{padding:0 7px;color:#fff;font-weight:800;font-size:16px}.weekday-row label{font-size:16px;color:#fff}.record-card{font-size:16px;min-height:72px;border-width:2px}.record-card strong{font-size:17px}.page-series .record-card button{min-height:42px;background:#304878;border:1px solid #7994cf;color:#fff;font-weight:700}
@media(max-width:1450px){.app-bar-r .legend{display:none}.admin-nav a{padding:9px 11px;font-size:14px}.customer-layout,.series-layout{grid-template-columns:1fr 1fr}}
@media(max-width:950px){.customer-layout,.series-layout{display:block}.customer-layout>.operations-panel,.series-layout>.operations-panel{margin-bottom:14px}.form-columns{grid-template-columns:1fr}.admin-nav{width:100%;overflow-x:auto;justify-content:flex-start}.app-bar{height:auto;flex-wrap:wrap}}

/* ---------- Fahrer-Dokumentarchiv -------------------------------- */
.documents-main{display:grid;gap:16px;padding:0 18px 24px}.documents-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;padding:22px}.documents-heading h1{margin:3px 0 5px;font-size:26px;color:#fff}.documents-heading p,.documents-heading small{color:#b6c0dd}.documents-search{display:grid;gap:6px;min-width:min(460px,100%)}.documents-search label{color:#f2f5ff;font-weight:700}.documents-search>div{display:flex;gap:8px}.documents-search input{flex:1;min-width:0;padding:11px 13px;border:2px solid #6476a7;border-radius:9px;background:#f8f9fc;color:#12172a;font-size:16px}.documents-notice,.documents-empty{padding:22px;border:1px solid #86632d;border-radius:12px;background:#3a2b17;color:#ffe0a1}.documents-empty{border-color:#34405f;background:#151e37;color:#bac3df}.document-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(440px,1fr));gap:14px}.document-card{display:grid;grid-template-columns:180px 1fr;min-height:240px;overflow:hidden;border:2px solid #34405f;border-radius:15px;background:#151e37}.document-preview{display:grid;place-items:center;min-height:220px;background:#080d18}.document-preview img{width:100%;height:100%;max-height:300px;object-fit:cover}.document-pdf{display:grid;place-items:center;width:86px;height:112px;border-radius:8px;background:#d84755;color:#fff;font-size:28px;font-weight:900}.document-info{display:grid;align-content:start;gap:9px;padding:16px}.document-title{display:flex;justify-content:space-between;gap:12px}.document-title strong{color:#83a5ff}.document-title span{padding:4px 8px;border-radius:999px;background:#26385f;color:#fff;font-weight:800}.document-info h2{margin:0;color:#fff;font-size:21px}.document-info dl{display:grid;grid-template-columns:auto 1fr;gap:5px 10px;margin:0;color:#c6cee5;font-size:14px}.document-info dt{color:#8f9bbd}.document-info dd{margin:0;overflow-wrap:anywhere}.document-info p{margin:0;padding:9px;border-radius:8px;background:#202c4b;color:#dbe1f3}.document-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.document-actions a{text-decoration:none}.document-actions .btn-primary{width:auto}.page-documents .brand-mark{font-size:12px;font-weight:900}
@media(max-width:760px){.documents-heading{display:grid;align-items:stretch}.documents-search{min-width:0}.document-grid{grid-template-columns:1fr}.document-card{grid-template-columns:1fr}.document-preview{max-height:240px}}

.price-calculator{display:grid!important;grid-template-columns:minmax(240px,1fr) auto;align-items:end;gap:12px!important}.price-actions{display:flex!important;align-items:center;gap:14px!important;flex-wrap:wrap}.price-result{grid-column:1/-1;display:block;min-height:28px;color:#bfffdc;font-size:16px;font-weight:700}
.order-item.preorder-soon{border:3px solid #ffc24b;background:rgba(255,194,75,.13);box-shadow:0 0 0 3px rgba(255,194,75,.1)}.order-item.preorder-urgent{border:3px solid #ff5c6b;background:rgba(255,92,107,.16);box-shadow:0 0 18px rgba(255,92,107,.28)}.preorder-label{margin-top:8px;padding:8px 10px;border-radius:8px;background:#ffc24b;color:#201700;font-size:15px;font-weight:900;text-align:center}.preorder-urgent .preorder-label{background:#ff5c6b;color:#fff}
.preorder-modal{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:rgba(3,5,15,.8);backdrop-filter:blur(6px)}.preorder-modal-card{width:min(620px,100%);padding:30px;border:3px solid #ff6b78;border-radius:18px;background:#17213e;color:#fff;box-shadow:0 20px 80px rgba(0,0,0,.7);text-align:center}.preorder-modal-card h2{margin:8px 0 18px;font-size:30px;color:#fff}.preorder-modal-card p{font-size:18px;line-height:1.5}.preorder-alarm-icon{display:grid;place-items:center;width:64px;height:64px;margin:auto;border-radius:50%;background:#ff5c6b;color:#fff;font-size:42px;font-weight:900}.preorder-modal-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:24px}.preorder-modal-actions .btn-primary,.preorder-modal-actions .btn-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:12px 18px;font-size:17px;text-decoration:none}
@media(max-width:650px){.price-calculator{grid-template-columns:1fr}.price-result{grid-column:auto}.preorder-modal-card{padding:20px}.preorder-modal-card h2{font-size:24px}}

/* Dokumenten-Import 2026-08-19 */
.page-document-import{min-height:100vh;background:#0b1020;color:#eef2ff}.document-import-main{display:grid;gap:18px;max-width:1500px;margin:0 auto;padding:20px}.document-import-hero,.document-import-panel,.document-import-help{border-radius:16px;padding:24px}.document-import-hero{display:flex;align-items:center;justify-content:space-between;gap:28px}.document-import-hero h1{margin:5px 0 8px;color:#fff;font-size:30px}.document-import-hero p{max-width:780px;margin:0;color:#bdc7df;line-height:1.55}.import-flow{display:flex;gap:8px;flex-wrap:wrap}.import-flow span{display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #3d4b70;border-radius:999px;background:#151e37;color:#dce4fa;font-size:13px}.import-flow b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#304878;color:#fff}.document-import-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.document-import-head h2,.document-import-help h2{margin:4px 0 0;color:#fff}.import-info-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.import-info-grid>div{display:grid;gap:5px;padding:14px;border:1px solid #33415f;border-radius:11px;background:#111a31}.import-info-grid strong{color:#fff}.import-info-grid span{color:#b9c3dd;font-size:14px;line-height:1.45}.import-info-grid code{color:#fff}.document-import-form{display:grid;gap:12px}.document-dropzone{display:grid;place-items:center;gap:7px;min-height:190px;padding:26px;border:2px dashed #6076ad;border-radius:14px;background:#0d1529;cursor:pointer;text-align:center;transition:.2s}.document-dropzone:hover{border-color:#8aa6ea;background:#111c35}.document-dropzone input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.document-drop-icon{font-size:40px;color:#9db7ff}.document-dropzone strong{font-size:19px;color:#fff}.document-dropzone small,.document-file-name{color:#aeb9d3}.document-file-name{padding:9px 12px;border-radius:9px;background:#111a31}.document-import-actions,.document-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.document-import-actions{margin-bottom:34px;padding-bottom:10px}.import-home-link{text-decoration:none;white-space:nowrap}.document-import-status{margin-top:15px;padding:13px 15px;border-radius:10px;border:1px solid #3b4a6c;background:#131d36}.document-import-status.is-success{border-color:#39755b;background:#112d24;color:#c9ffe5}.document-import-status.is-error{border-color:#8d4650;background:#35191e;color:#ffd7dc}.document-import-status.is-info{color:#dbe5ff}.document-import-preview{display:grid;gap:14px;margin-top:16px}.document-preview-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.document-preview-summary>div{display:grid;place-items:center;padding:12px;border:1px solid #354563;border-radius:10px;background:#111a31}.document-preview-summary strong{font-size:25px;color:#fff}.document-preview-summary span{font-size:12px;color:#aeb9d3}.document-preview-actions{padding:12px 0}.document-import-table-wrap{overflow:auto;border:1px solid #34405f;border-radius:12px}.document-import-table{width:100%;min-width:1250px;border-collapse:collapse;background:#10182d}.document-import-table th,.document-import-table td{padding:10px;border-bottom:1px solid #293653;text-align:left;vertical-align:top;font-size:13px}.document-import-table th{position:sticky;top:0;background:#1a2644;color:#fff;z-index:1}.document-import-table td{color:#d4dcef}.document-import-table tr.is-incomplete td{background:#2b1d20}.import-row-status{display:inline-block;padding:4px 7px;border-radius:999px;background:#263b31;color:#caffdf;font-weight:700}.is-incomplete .import-row-status{background:#583038;color:#ffd8de}.document-import-help p{color:#bdc7df;line-height:1.6}.document-import-help p:last-child{margin-bottom:0}
@media(max-width:900px){.document-import-hero{display:grid}.import-info-grid{grid-template-columns:1fr}.document-preview-summary{grid-template-columns:1fr}.document-import-main{padding:12px}.document-import-hero,.document-import-panel,.document-import-help{padding:18px}}

.document-server-check{margin:0 0 8px;padding:11px 13px;border:1px solid #3b4a6c;border-radius:10px;background:#111a31;color:#cbd5ec;font-size:13px;line-height:1.5}.document-server-check.is-success{border-color:#39755b;background:#112d24;color:#c9ffe5}.document-server-check.is-warning{border-color:#806a32;background:#302713;color:#ffe8a8}.document-server-check strong{color:inherit}.page-document-import .document-import-panel{margin-bottom:28px}@media(max-width:900px){.document-import-actions{margin-bottom:44px;padding-bottom:14px}.page-document-import .document-import-panel{margin-bottom:38px}}

/* Dokumenten-Import: ausreichend Abstand zum unteren Bildschirmrand/Footer */
.page-document-import .document-import-actions {
  margin-bottom: 42px;
}
.page-document-import .document-import-panel {
  padding-bottom: 56px;
}
@media (max-width: 760px) {
  .page-document-import .document-import-actions {
    margin-bottom: 64px;
    padding-bottom: 12px;
  }
  .page-document-import .document-import-panel {
    padding-bottom: 72px;
  }
}

/* Dispatch v11: vorhandene Fahrer-&-Fahrzeuge-Liste direkt zur Auftragszuweisung nutzen. */
.assignment-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #5da983;
  border-radius: 10px;
  background: rgba(40, 116, 84, .22);
  color: #e8fff5;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}
.assignment-hint[hidden] { display: none !important; }
.assignment-hint .btn-ghost { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; }
.order-item.is-assignment-target {
  border-color: #72d5a8;
  box-shadow: 0 0 0 2px rgba(84, 199, 143, .22);
}
.order-actions .assign-from-fleet { min-width: 0; white-space: normal; line-height: 1.25; }
.driver-item.is-assignable {
  cursor: pointer;
  background: rgba(46, 224, 138, .10);
  box-shadow: inset 3px 0 0 #2ee08a;
}
.driver-item.is-assignable:hover,
.driver-item.is-assignable:focus { background: rgba(46, 224, 138, .20); outline: none; }
.driver-item.is-assignment-unavailable { opacity: .52; }
.order-return-note,
.archive-return-note {
  display: block;
  margin-top: 6px;
  color: #ffd18a;
  font-weight: 700;
  line-height: 1.35;
}
.archive-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .assignment-hint { align-items: stretch; flex-direction: column; }
  .assignment-hint .btn-ghost { width: 100%; }
}


/* Krankenkassenkunden / Fahrtart – 2026-08-22 */
.health-customer-layout{
  display:grid;grid-template-columns:minmax(320px,.9fr) minmax(460px,1.1fr);
  gap:18px;padding:18px;min-height:calc(100vh - 82px);overflow:auto;
}
.page-health-customers{height:auto!important;min-height:100dvh;overflow:auto!important;}
.page-health-customers .app-bar{position:sticky;top:0;z-index:30;}
.health-fieldset{border:1px solid rgba(148,163,184,.25);border-radius:14px;padding:16px;margin:16px 0;}
.health-fieldset legend{padding:0 8px;font-weight:700;}
.health-fieldset-accent{background:rgba(76,99,180,.07);border-color:rgba(99,102,241,.35);}
.health-form-actions,.health-card-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.health-customer-card{display:block;width:100%;text-align:left;}
.health-customer-card span{display:block;margin-top:5px;}
.health-card-actions{margin-top:10px;}
.ride-type-field select{font-weight:700;}
.health-order-info{
  padding:12px 14px;border:1px solid rgba(99,102,241,.35);border-radius:12px;
  background:rgba(79,70,229,.10);display:flex;flex-direction:column;gap:4px;
}
.health-order-info[hidden]{display:none!important;}
.health-order-info a{color:inherit;text-decoration:underline;font-size:.9rem;}
@media(max-width:980px){
  .health-customer-layout{grid-template-columns:1fr;padding:12px;}
}

/* ================================================================
   Erinnerungssystem – 2026-08-22
   ================================================================ */
.page-reminders{height:auto!important;min-height:100dvh;overflow-y:auto!important}
.reminders-workspace{display:grid;grid-template-columns:minmax(320px,440px) minmax(500px,1fr);gap:14px;padding:0 12px 40px;max-width:1500px;margin:0 auto}
.reminder-editor,.reminder-list-panel{padding:18px;min-width:0}
.reminder-editor h1,.reminder-list-panel h2{margin:2px 0 0}
.reminder-form{display:flex;flex-direction:column;gap:13px;margin-top:16px}
.reminder-form textarea,.reminder-form select,.reminder-list-panel select{width:100%;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);color:var(--text);padding:11px 13px;border-radius:10px;color-scheme:dark}
.reminder-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.reminder-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.reminder-quick button,.reminder-admin-actions button,.dashboard-reminder-actions button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:var(--text);border-radius:9px;padding:8px 9px;font-weight:600}
.reminder-quick button:hover,.reminder-admin-actions button:hover,.dashboard-reminder-actions button:hover{background:rgba(255,255,255,.12)}
.reminder-admin-list{display:flex;flex-direction:column;gap:9px;margin-top:14px}
.reminder-admin-item{display:flex;justify-content:space-between;gap:12px;padding:14px;border:1px solid rgba(255,255,255,.10);border-left:4px solid #6b7390;border-radius:12px;background:rgba(255,255,255,.035)}
.reminder-admin-item.priority-important{border-left-color:#ffc24b}.reminder-admin-item.priority-urgent{border-left-color:#ff5c6b}
.reminder-admin-item.is-done{opacity:.55}.reminder-admin-main{min-width:0}.reminder-title-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.reminder-priority{font-size:11px;padding:2px 7px;border-radius:999px;background:rgba(255,255,255,.08)}
.reminder-meta{color:var(--text-2);font-size:12px;margin-top:5px}.reminder-admin-item p{margin:8px 0 4px;white-space:pre-wrap}.reminder-admin-item small{color:var(--text-3)}.reminder-admin-actions{display:flex;gap:6px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
.dashboard-reminder-bar{margin:0 12px 10px;padding:10px 12px;border:1px solid rgba(255,194,75,.45);background:rgba(91,56,11,.55);max-height:230px;overflow:auto}
.dashboard-reminder-bar.has-new{animation:reminderFlash .7s ease 3}.dashboard-reminder-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}.dashboard-reminder-head strong{color:#ffd98a}.dashboard-reminder-head a{color:#fff;font-size:12px}
.dashboard-reminder-list{display:flex;flex-direction:column;gap:7px}.dashboard-reminder-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 10px;border-radius:10px;background:rgba(0,0,0,.23);border-left:4px solid #ffc24b}.dashboard-reminder-item.priority-urgent{border-left-color:#ff5c6b;background:rgba(88,16,25,.35)}.dashboard-reminder-item>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.dashboard-reminder-item small{color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-reminder-actions{display:flex;gap:5px;flex-shrink:0}
.page-dashboard:has(.dashboard-reminder-bar:not([hidden])) .dashboard-grid{height:calc(100vh - 190px)}
@keyframes reminderFlash{50%{box-shadow:0 0 0 3px rgba(255,194,75,.28),0 0 35px rgba(255,194,75,.3)}}
@media(max-width:900px){.reminders-workspace{grid-template-columns:1fr}.reminder-admin-item,.dashboard-reminder-item{flex-direction:column;align-items:stretch}.reminder-admin-actions,.dashboard-reminder-actions{justify-content:flex-start}.page-dashboard:has(.dashboard-reminder-bar:not([hidden])) .dashboard-grid{height:auto}}
@media(max-width:560px){.reminder-form-grid{grid-template-columns:1fr}.reminder-quick{grid-template-columns:1fr 1fr}.dashboard-reminder-head{align-items:flex-start;flex-direction:column}}

/* ===== Caller-ID / eingehende Anrufe ===== */
.incoming-call-panel{margin:12px 16px 0;padding:14px 16px;border-color:rgba(91,140,255,.42);box-shadow:0 12px 34px rgba(0,0,0,.42),0 0 0 1px rgba(91,140,255,.12) inset;position:relative;z-index:8}
.incoming-call-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}.incoming-call-head>div{display:grid;gap:2px}.incoming-call-head strong{font-size:18px}.incoming-call-head small{color:var(--text-2)}
.incoming-call-live{font-size:11px;font-weight:800;letter-spacing:.08em;padding:5px 8px;border-radius:999px;background:rgba(46,224,138,.16);color:var(--free);border:1px solid rgba(46,224,138,.35)}
.incoming-call-list{display:grid;gap:10px}.incoming-call-card{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(260px,1.2fr) auto;gap:14px;align-items:center;padding:12px;border-radius:12px;background:rgba(6,10,28,.42);border:1px solid var(--glass-border)}
.caller-number{display:grid;gap:3px}.caller-number strong{font-size:20px;letter-spacing:.02em}.caller-number small,.caller-found small{color:var(--text-2)}.caller-found{display:grid;gap:3px}.caller-state{width:max-content;font-size:12px;font-weight:700;padding:3px 7px;border-radius:999px}.caller-state.ok{background:rgba(46,224,138,.13);color:var(--free)}.caller-state.warn{background:rgba(255,194,75,.14);color:var(--break)}
.caller-actions{display:flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.caller-match-list{display:grid;gap:5px;margin-top:4px}.caller-match{display:grid;text-align:left;gap:1px;padding:7px 9px;border:1px solid var(--glass-border);background:rgba(255,255,255,.04);border-radius:8px}.caller-match:hover{background:var(--accent-soft)}
.caller-order-context{margin:0 0 12px;padding:11px 12px;border:1px solid rgba(91,140,255,.35);border-radius:10px;background:rgba(91,140,255,.09);display:grid;gap:5px}.caller-order-context strong{color:#dce6ff}.caller-address-choice{margin:8px 0 2px;padding:9px 11px;border-radius:9px;background:rgba(255,255,255,.04);border:1px solid var(--glass-border)}
@media(max-width:1050px){.incoming-call-card{grid-template-columns:1fr}.caller-actions{justify-content:flex-start}}
@media(max-width:640px){.incoming-call-panel{margin:8px;padding:12px}.caller-number strong{font-size:17px}.caller-actions>*{flex:1 1 auto;text-align:center}}
.page-dashboard .incoming-call-panel{max-height:250px;overflow:auto;flex:0 0 auto}
.page-dashboard:has(.incoming-call-panel:not([hidden])) .dashboard-grid{height:calc(100vh - 275px)}
.page-dashboard:has(.incoming-call-panel:not([hidden])):has(.dashboard-reminder-bar:not([hidden])) .dashboard-grid{height:calc(100vh - 375px)}
@media(max-width:900px){.page-dashboard:has(.incoming-call-panel:not([hidden])) .dashboard-grid,.page-dashboard:has(.incoming-call-panel:not([hidden])):has(.dashboard-reminder-bar:not([hidden])) .dashboard-grid{height:auto}.page-dashboard{overflow:auto}}

/* ===== Zentrale Unternehmenskonfiguration ===== */
.page-company-setup{min-height:100dvh;height:auto!important;overflow-y:auto!important;background:radial-gradient(circle at top,#17213e 0,#0a0f20 46%,#060914 100%);color:var(--text)}
.company-setup-shell{width:min(1180px,calc(100% - 24px));margin:0 auto;padding:34px 0 70px}
.company-setup-hero{margin-bottom:18px}.company-setup-hero h1{font-size:clamp(26px,4vw,44px);margin:7px 0 8px}.company-setup-hero p{max-width:850px;color:var(--text-2);line-height:1.6}.setup-step{display:inline-flex;padding:5px 9px;border-radius:999px;background:rgba(91,140,255,.14);border:1px solid rgba(91,140,255,.35);font-size:11px;font-weight:800;letter-spacing:.08em;color:#cbd8ff}
.company-form{padding:22px}.company-form fieldset{border:1px solid var(--glass-border);border-radius:14px;padding:16px;margin:0 0 16px;background:rgba(255,255,255,.025)}.company-form legend{padding:0 8px;font-weight:800}.company-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.company-form label{display:grid;gap:7px;font-weight:700;color:var(--text-2)}.company-form input,.company-form select{width:100%;box-sizing:border-box;border:1px solid var(--glass-border);border-radius:10px;background:rgba(5,9,25,.72);color:var(--text);padding:11px 12px;min-height:44px}.company-check{display:flex!important;align-items:center;grid-template-columns:auto 1fr!important;margin-bottom:12px}.company-check input{width:auto!important;min-height:auto!important}.company-actions{display:flex;justify-content:flex-end;padding-top:4px}.company-alert{padding:12px 14px;border-radius:10px;margin:0 0 14px}.company-alert.error{background:rgba(255,70,88,.12);border:1px solid rgba(255,70,88,.35);color:#ffd8dd}.company-header-logo{width:42px;height:42px;object-fit:contain;border-radius:9px;background:#fff;padding:3px;box-sizing:border-box}
@media(max-width:900px){.company-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.company-grid{grid-template-columns:1fr}.company-form{padding:14px}.company-setup-shell{padding-top:18px}}


/* v4.6 – Auswahlfelder auf Desktop und Mobilgeräten immer lesbar.
   Einige Browser/Android-WebViews hatten helle Optionsschrift auf hellem Popup. */
select { color-scheme: light; }
select option,
select optgroup {
  background: #ffffff !important;
  color: #111827 !important;
}
.order-form select option,
.order-actions select option,
.form-control option,
.form-select option,
.accessible-form select option,
.company-form select option,
.reminder-form select option,
.reminder-list-panel select option {
  background: #ffffff !important;
  color: #111827 !important;
}
