/* ============================================================
   Hero Schedule — Vanilla-Port of Claude Design "Hero Schedule"
   Pixel-perfect with the original. Uses Inter + Trailo tokens.
   ============================================================ */

/* ─── Scoped reset (only inside .hero-schedule) ─── */
.hero-schedule * { box-sizing: border-box; }
.hero-schedule button { font: inherit; cursor: pointer; }

/* ─── Outer section ─── */
.hero-schedule {
  --hs-accent: #4f72e3;
  --hs-accent-hover: #3d5fc5;
  --hs-accent-tint: rgba(79,114,227,.10);
  --hs-accent-tint-2: rgba(79,114,227,.06);
  --hs-green: #059669;
  --hs-green-tint: rgba(5,150,105,.10);
  --hs-red: #dc2626;
  --hs-amber: #d97706;
  --hs-amber-tint: rgba(217,119,6,.10);
  --hs-text: #1e293b;
  --hs-text2: #475569;
  --hs-text3: #94a3b8;
  --hs-surface: #ffffff;
  --hs-surface2: #f8fafc;
  --hs-surface3: #f1f5f9;
  --hs-border: #e2e8f0;
  --hs-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.02);
  --hs-shadow-accent: 0 6px 20px rgba(79,114,227,.25);

  position: relative;
  width: 100%;
  padding: clamp(24px, 4vw, 60px) clamp(16px, 3vw, 32px) clamp(48px, 6vw, 96px);
  background: radial-gradient(ellipse at 50% 30%, rgba(79,114,227,.08), transparent 60%), var(--hs-surface2);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--hs-text);
  /* No overflow:hidden — modal must be allowed to hang outside the stage */
}

/* Inner constrained wrapper — max-width here, gradient bleeds full-width on section */
.hs-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.45fr);
  gap: clamp(20px, 3vw, 56px);
  align-items: center;
}

/* ─── Copy column (text LEFT of stage) — verkleinert für bessere Balance ─── */
.hs-copy {
  text-align: left;
  max-width: 520px;
}
.hs-copy .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--hs-accent-tint);
  color: var(--hs-accent);
  font-size: 12px; font-weight: 600;
  margin-bottom: 16px;
}
.hs-copy .badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--hs-accent);
  box-shadow: 0 0 0 2.5px rgba(79,114,227,.18);
}
.hs-copy h1 {
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--hs-text);
  margin: 0 0 14px;
  text-wrap: balance;
}
.hs-copy h1 .accent { color: var(--hs-accent); }
.hs-copy .lead {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.55;
  color: var(--hs-text2);
  margin: 0 0 14px;
  text-wrap: balance;
}
/* AEO-Kategorie-Zeile: explizit für LLMs/Assistenten, was Trailo IST.
   Auf Mobile (<600px) ausgeblendet, damit der Hero nicht zu voll wird. */
.hs-copy .categories {
  font-size: 13px;
  line-height: 1.5;
  color: var(--hs-text2);
  margin: 0 0 18px;
}
.hs-copy .categories b {
  color: var(--hs-text);
  font-weight: 700;
}
.hs-copy .ctas {
  display: inline-flex; flex-wrap: wrap; justify-content: flex-start;
  gap: 10px;
}
.hs-copy .ctas .btn-primary,
.hs-copy .ctas .btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.hs-copy .ctas .btn-primary {
  background: var(--hs-accent); color: #fff;
  box-shadow: var(--hs-shadow-accent);
}
.hs-copy .ctas .btn-primary:hover { background: var(--hs-accent-hover); transform: translateY(-1px); }
.hs-copy .ctas .btn-ghost {
  background: #fff; color: var(--hs-text);
  border-color: var(--hs-border);
}
.hs-copy .ctas .btn-ghost:hover { background: var(--hs-surface2); }
.hs-copy .trust {
  margin: 18px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-start;
}
.hs-copy .trust li {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hs-border);
  font-size: 11px; font-weight: 500; color: var(--hs-text2);
}
.hs-copy .trust .check { color: var(--hs-green); font-weight: 700; }

/* ─── Stage (auto-fit container) ─── */
/* Width + height are set inline by JS (hero-schedule.js) so they exactly match
   the visually-scaled canvas (designW × scale, designH × scale). */
.hs-stage {
  --hs-scale: 0.73;
  position: relative;
  width: 100%;
  margin: 0 auto;
  min-height: 320px;
}
.hs-canvas {
  position: absolute; top: 0; left: 0;
  width: 900px; height: 620px;
  transform: scale(var(--hs-scale));
  transform-origin: 0 0;
}

/* ─── Outer frame holder (allows modal to hang outside) ─── */
.hs-frame-wrap {
  position: relative;
  width: 900px;
  height: 620px;
  margin: 0;
}

/* ─── Product window — Original-Maße (1100×540) ─── */
.hs-frame {
  height: 540px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--hs-border);
  box-shadow: 0 32px 80px rgba(15,23,42,.18), 0 12px 24px rgba(15,23,42,.08);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.hs-body {
  flex: 1; display: flex; min-height: 0; position: relative;
}

/* (4) Topbar entfernt — Map-Stats-Pill (oben links auf der Karte) übernimmt diese Rolle. */
.hs-topbar { display: none; }

/* ============================================================
   TOPBAR
   ============================================================ */
.hs-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--hs-border);
  min-height: 58px;
  flex-shrink: 0;
}
.hs-stats-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--hs-surface2);
  border: 1px solid var(--hs-border);
  flex-shrink: 0;
}
.hs-stats-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hs-green); flex-shrink: 0;
}
.hs-stats-pill .lines { display: flex; flex-direction: column; line-height: 1.1; }
.hs-stats-pill .l1 {
  font-size: 12px; font-weight: 700; color: var(--hs-text); white-space: nowrap;
}
.hs-stats-pill .l2 {
  font-size: 10px; font-weight: 500; color: var(--hs-text3);
  white-space: nowrap; margin-top: 1px;
}
.hs-topbar .spacer { flex: 1; }
.hs-icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--hs-border); background: #fff;
  color: var(--hs-text2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hs-new-task-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 9px;
  background: var(--hs-accent); color: #fff; border: none;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--hs-shadow-accent);
  white-space: nowrap; flex-shrink: 0;
}
.hs-new-task-btn .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,.18); color: #fff;
}
.hs-todo-btn {
  border: 1px solid var(--hs-border); background: #fff;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--hs-text2);
  display: inline-flex; align-items: center; gap: 7px;
  flex-shrink: 0; white-space: nowrap;
}
.hs-todo-btn .badge {
  padding: 0 7px; border-radius: 999px;
  background: var(--hs-accent-tint); color: var(--hs-accent);
  font-size: 11px; font-weight: 700;
}

/* ============================================================
   PANEL (left side)
   ============================================================ */
.hs-panel {
  width: 300px; flex-shrink: 0; height: 100%;
  display: flex; flex-direction: column;
  background: var(--hs-surface2);
  border-right: 1px solid var(--hs-border);
  overflow: hidden;
}
.hs-panel-date {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--hs-border);
}
.hs-nav-btn {
  width: 28px; height: 28px; border-radius: 7px;
  background: transparent; border: 1px solid var(--hs-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--hs-text2);
}
.hs-nav-btn.wide { width: auto; padding: 4px 10px; font-size: 11px; font-weight: 600; }
.hs-panel-date .center { flex: 1; text-align: center; }
.hs-panel-date .label { font-size: 12px; font-weight: 700; color: var(--hs-text); }
.hs-panel-date .week  { font-size: 10px; color: var(--hs-text3); }

.hs-day-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  padding: 8px 10px; background: #fff;
  border-bottom: 1px solid var(--hs-border);
}
.hs-day {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0; border-radius: 8px;
  color: var(--hs-text2);
}
.hs-day .d { font-size: 9px; font-weight: 600; opacity: .7; }
.hs-day .n { font-size: 13px; font-weight: 700; margin-top: 1px; }
.hs-day.active { background: var(--hs-accent); color: #fff; }
.hs-day.active .d { opacity: .85; }

.hs-panel-stats {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; background: #fff;
  border-bottom: 1px solid var(--hs-border);
}
.hs-stat { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.hs-stat .v {
  font-size: 13px; font-weight: 700; color: var(--hs-text);
  line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
}
.hs-stat .l {
  font-size: 9px; font-weight: 600; color: var(--hs-text3);
  text-transform: uppercase; letter-spacing: .05em;
}
.hs-panel-stats .filler { flex: 1; min-width: 4px; }
.hs-ready-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 999px;
  background: var(--hs-green-tint); color: var(--hs-green);
  font-size: 9px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}

.hs-city-label {
  padding: 8px 14px 6px;
  font-size: 10px; font-weight: 600;
  color: var(--hs-text3);
  text-transform: uppercase; letter-spacing: .05em;
}
/* (3) Kein Scrollen im linken Panel — Überlauf wird abgeschnitten. */
.hs-driver-list {
  flex: 1; overflow: hidden; padding: 0 10px 12px;
}

.hs-driver {
  background: #fff;
  border: 1px solid var(--hs-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.hs-driver-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
}
.hs-driver-head .info { flex: 1; min-width: 0; }
.hs-driver-head .veh-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.hs-driver-head .vehicle {
  font-size: 13px; font-weight: 700; color: var(--hs-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-driver-head .plate {
  font-size: 10px; color: var(--hs-text3); font-weight: 500; white-space: nowrap;
}
.hs-driver-head .shift-line { font-size: 10px; color: var(--hs-text3); margin-top: 1px; }
.hs-driver-head .count {
  font-size: 11px; font-weight: 700; color: var(--hs-text2);
  padding: 2px 7px; border-radius: 999px;
  background: var(--hs-surface3);
  margin-right: 4px;
}
.hs-driver-head .chev {
  color: var(--hs-text3); transition: transform .25s;
}
.hs-driver.collapsed .chev { transform: rotate(-90deg); }

.hs-shift-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--hs-border);
  background: var(--hs-surface2);
}
.hs-shift-row .time {
  font-size: 11px; font-weight: 600; color: var(--hs-text2);
  font-variant-numeric: tabular-nums;
}
.hs-driver-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 3px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hs-border);
  font-size: 10px; font-weight: 600;
}
.hs-driver-pill .av {
  width: 16px; height: 16px; border-radius: 50%;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
}
.hs-shift-row .actions {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hs-text3);
}

.hs-edge-row {
  padding: 6px 10px;
  font-size: 10px; color: var(--hs-text3);
  border-top: 1px solid var(--hs-border);
  display: flex; justify-content: space-between;
  background: #fff;
}
.hs-edge-row .dot-start { color: var(--hs-accent); }
.hs-edge-row .dot-end   { color: var(--hs-accent); }
.hs-edge-row .t { font-weight: 600; color: var(--hs-text2); }

.hs-travel-row {
  padding: 4px 10px 4px 38px;
  font-size: 10px; color: var(--hs-text3);
  background: var(--hs-surface2);
  border-top: 1px solid var(--hs-border);
}

.hs-stop-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 7px; align-items: start;
  padding: 8px 10px;
  border-top: 1px solid var(--hs-border);
  background: #fff;
}
.hs-stop-row .grip { color: var(--hs-text3); margin-top: 4px; opacity: .55; cursor: grab; }
.hs-stop-row .num {
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  margin-top: 1px; flex-shrink: 0;
}
.hs-stop-row .meta { min-width: 0; }
.hs-stop-row .meta .name {
  font-size: 11px; font-weight: 600; color: var(--hs-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-stop-row .meta .addr {
  font-size: 10px; color: var(--hs-text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.hs-stop-row .meta .tags {
  display: flex; gap: 6px; align-items: center; margin-top: 4px;
}
.hs-type-badge {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
}
.hs-type-badge.t-service    { background: rgba(5,150,105,.10);  color: var(--hs-green); }
.hs-type-badge.t-inspektion { background: rgba(124,58,237,.10); color: #7c3aed; }
.hs-type-badge.t-lieferung  { background: rgba(217,119,6,.10);  color: #b45309; }
.hs-stop-row .duration {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--hs-text3);
}
.hs-stop-row .time {
  font-size: 11px; color: var(--hs-text2); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Lifted "drag in progress" card */
.hs-lifted {
  position: relative;
  margin: 0 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border-width: 1.5px; border-style: solid;
  transform: rotate(-1.2deg);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 7px; align-items: center;
  z-index: 5;
}
.hs-lifted .grip { opacity: 1; }
.hs-lifted .num {
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.hs-lifted .meta { min-width: 0; }
.hs-lifted .meta .name {
  font-size: 11px; font-weight: 700; color: var(--hs-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-lifted .meta .addr {
  font-size: 10px; color: var(--hs-text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hs-lifted .drag-tag {
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
}

.hs-dropzone {
  margin: 4px 10px;
  padding: 8px;
  border-width: 1.5px; border-style: dashed;
  border-radius: 8px;
  font-size: 10px; font-weight: 600;
  text-align: center;
  letter-spacing: .02em;
}

/* ============================================================
   MAP AREA (right side)
   ============================================================ */
.hs-map-area {
  flex: 1; position: relative;
  background: #f5f1e8;
  overflow: hidden;
}
.hs-map {
  position: absolute; inset: 0;
  background: #f5f1e8;
}
.hs-map-stats-pill {
  position: absolute; top: 16px; left: 16px; z-index: 700;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--hs-border);
  box-shadow: var(--hs-shadow-sm);
}
.hs-map-stats-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hs-green); flex-shrink: 0;
}
.hs-map-stats-pill .lines { display: flex; flex-direction: column; line-height: 1.15; }
.hs-map-stats-pill .l1 {
  font-size: 12px; font-weight: 700; color: var(--hs-text); white-space: nowrap;
}
.hs-map-stats-pill .l2 {
  font-size: 10px; color: var(--hs-text3); font-weight: 500;
  white-space: nowrap; margin-top: 1px;
}

/* Bottom buttons — wieder zentriert, da die Karte rechts gekürzt wurde
   und die Routen jetzt natürlicher mittig sitzen. */
.hs-bottom-buttons {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 7px; z-index: 1000;
}
.hs-bb-ai, .hs-bb-plan {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 8px;
  border: none; font-size: 11px; font-weight: 600;
  color: #fff;
}
.hs-bb-ai svg, .hs-bb-plan svg { width: 12px; height: 12px; }
.hs-bb-ai {
  background: #0f172a;
  box-shadow: 0 4px 14px rgba(15,23,42,.20);
  transition: box-shadow .4s ease;
}
.hero-schedule[data-phase="chaotic"] .hs-bb-ai {
  box-shadow: 0 6px 20px rgba(15,23,42,.35), 0 0 0 4px rgba(79,114,227,.22);
}
.hs-bb-plan {
  background: var(--hs-accent);
  box-shadow: var(--hs-shadow-accent);
}

/* ============================================================
   OPTIMIZING OVERLAY
   ============================================================ */
.hs-opt-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 800;
  opacity: 0;
  transition: opacity .35s ease;
}
.hero-schedule[data-phase="optimizing"] .hs-opt-overlay { opacity: 1; }

.hs-opt-tint {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(79,114,227,.18) 0%, rgba(79,114,227,.05) 50%, transparent 80%);
}

.hs-opt-beam {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 50%;
  background: linear-gradient(90deg,
    transparent 0%, rgba(79,114,227,0) 25%, rgba(79,114,227,0.16) 50%,
    rgba(79,114,227,0) 75%, transparent 100%);
  pointer-events: none;
  opacity: 0;
}
.hero-schedule[data-phase="optimizing"] .hs-opt-beam {
  animation: hs-beam-sweep 1.9s ease-in-out;
}
@keyframes hs-beam-sweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(220%); opacity: 0; }
}

.hs-opt-sparkles { position: absolute; inset: 0; pointer-events: none; }
.hs-opt-spark {
  position: absolute;
  font-size: 12px;
  color: var(--hs-accent);
  opacity: 0;
  text-shadow: 0 0 8px rgba(79,114,227,.6);
}
.hero-schedule[data-phase="optimizing"] .hs-opt-spark {
  animation: hs-spark-float 1.5s ease-in-out infinite;
}
@keyframes hs-spark-float {
  0%, 100% { opacity: 0; transform: translateY(6px) scale(0.4); }
  30%      { opacity: 0.9; transform: translateY(0) scale(1); }
  70%      { opacity: 0.6; transform: translateY(-4px) scale(0.85); }
}
.hs-opt-spark.s0  { left: 14%; top: 22%; animation-delay: 0.0s; }
.hs-opt-spark.s1  { left: 36%; top: 12%; animation-delay: 0.2s; }
.hs-opt-spark.s2  { left: 62%; top: 28%; animation-delay: 0.4s; }
.hs-opt-spark.s3  { left: 82%; top: 18%; animation-delay: 0.6s; }
.hs-opt-spark.s4  { left: 22%; top: 48%; animation-delay: 0.1s; }
.hs-opt-spark.s5  { left: 48%; top: 68%; animation-delay: 0.3s; }
.hs-opt-spark.s6  { left: 74%; top: 58%; animation-delay: 0.5s; }
.hs-opt-spark.s7  { left: 88%; top: 78%; animation-delay: 0.7s; }
.hs-opt-spark.s8  { left: 12%; top: 78%; animation-delay: 0.4s; }
.hs-opt-spark.s9  { left: 34%; top: 88%; animation-delay: 0.9s; }
.hs-opt-spark.s10 { left: 56%; top: 38%; animation-delay: 1.1s; }
.hs-opt-spark.s11 { left: 68%; top: 82%; animation-delay: 1.3s; }

.hs-opt-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity .35s ease, transform .35s cubic-bezier(.16,1,.3,1);
  display: flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--hs-border);
  box-shadow: 0 12px 40px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.08), 0 0 0 3px rgba(79,114,227,.08);
  line-height: 1.15;
}
.hero-schedule[data-phase="optimizing"] .hs-opt-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hs-opt-orb {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.hs-opt-orb svg { width: 15px; height: 15px; }
.hs-opt-orb-glow {
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hs-accent) 0%, transparent 65%);
  opacity: 0.5;
  z-index: 1;
}
.hero-schedule[data-phase="optimizing"] .hs-opt-orb-glow {
  animation: hs-orb-pulse 1.4s ease-in-out infinite;
}
@keyframes hs-orb-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.35); }
}
.hs-opt-orb svg { position: relative; z-index: 2; }

.hs-opt-title {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700;
  background: linear-gradient(90deg,
    var(--hs-accent) 0%, var(--hs-text) 40%, var(--hs-accent) 60%, var(--hs-accent) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-schedule[data-phase="optimizing"] .hs-opt-title {
  animation: hs-text-shimmer 1.8s linear infinite;
}
@keyframes hs-text-shimmer {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
.hs-opt-dots {
  display: inline-flex; gap: 3px;
  margin-left: 5px; align-items: center;
  height: 12px;
}
.hs-opt-dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--hs-accent);
}
.hero-schedule[data-phase="optimizing"] .hs-opt-dots span {
  animation: hs-dot-bounce 1.1s ease-in-out infinite;
}
.hs-opt-dots span:nth-child(2) { animation-delay: .15s; }
.hs-opt-dots span:nth-child(3) { animation-delay: .30s; }
@keyframes hs-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40%           { transform: translateY(-3px); opacity: 1; }
}
.hs-opt-sub {
  font-size: 10px; color: var(--hs-text3); font-weight: 500; margin-top: 1px; line-height: 1.2;
}

/* ============================================================
   TASK MODAL (floats outside frame, bottom-right)
   ============================================================ */
/* Modal — Original-Scale 0.85 (war im Claude-Design 0.9). Sitzt am bottom-right
   des 1100×540 Frames mit dezentem Pop-Out nach rechts & unten. Da das ganze
   Canvas per AutoFit gemeinsam runterskaliert wird, bleibt das Modal proportional
   zum Panel und zur Karte. */
.hs-modal-wrap {
  position: absolute;
  right: -100px;
  bottom: 0px;
  z-index: 1000;
  transform: scale(0.85);
  transform-origin: 100% 100%;
}
/* Auf sehr breiten Viewports darf das Modal etwas mehr nach außen hängen */
@media (min-width: 1500px) {
  .hs-modal-wrap {
    right: -160px;
    bottom: -30px;
  }
}
@media (max-width: 900px) {
  .hs-modal-wrap { display: none; }
}
.hs-modal {
  width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 32px 64px rgba(15,23,42,.22), 0 12px 24px rgba(15,23,42,.10);
  border: 1px solid var(--hs-border);
  overflow: hidden;
}
.hs-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 12px;
}
.hs-modal-head .ic-wrap {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--hs-accent-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--hs-accent);
  flex-shrink: 0;
}
.hs-modal-head .title { flex: 1; font-size: 17px; font-weight: 700; color: var(--hs-text); }
.hs-modal-head .close { color: var(--hs-text3); cursor: pointer; }

.hs-modal-body {
  padding: 0 18px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.hs-modal-label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--hs-text2); margin-bottom: 6px;
}

.hs-cust-card {
  border: 1px solid var(--hs-border); border-radius: 10px; padding: 12px;
  background: #fff;
}
.hs-cust-card .row { display: flex; align-items: flex-start; gap: 10px; }
.hs-cust-card .av {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--hs-accent-tint); color: var(--hs-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.hs-cust-card .name {
  font-size: 13px; font-weight: 700; color: var(--hs-text); line-height: 1.3;
}
.hs-cust-card .loc {
  font-size: 11px; color: var(--hs-text3); margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}
.hs-cust-card .loc .pin { color: var(--hs-red); }
.hs-cust-card .change {
  font-size: 11px; color: var(--hs-accent); font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.hs-next-visit {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: var(--hs-accent-tint-2);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--hs-text2);
}
.hs-next-visit .ic { color: var(--hs-accent); flex-shrink: 0; }
.hs-next-visit .l1 { font-weight: 600; color: var(--hs-text2); }
.hs-next-visit .l1 b { font-weight: 500; }
.hs-next-visit .l2 { color: var(--hs-text3); margin-top: 1px; font-size: 10px; }

.hs-slots-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px;
}
.hs-manual-pill {
  font-size: 11px; color: var(--hs-text2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--hs-border);
  background: #fff;
}
.hs-slots {
  border: 1.5px solid var(--hs-accent);
  border-radius: 11px; padding: 8px;
  background: rgba(79,114,227,.04);
  display: flex; flex-direction: column; gap: 7px;
  min-height: 80px;
  position: relative;
}

.hs-slot {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  background: #fff;
  border: 1px solid var(--hs-border);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
}
.hs-modal.revealed .hs-slot { opacity: 1; transform: translateY(0); }
.hs-slot.selected {
  border: 1.5px solid var(--hs-accent);
  box-shadow: 0 0 0 3px rgba(79,114,227,.12);
}
.hs-slot .radio {
  margin-top: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--hs-border);
  display: flex; align-items: center; justify-content: center;
}
.hs-slot.selected .radio {
  background: var(--hs-accent); border-color: var(--hs-accent);
}
.hs-slot.selected .radio::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff;
}
.hs-slot .ic { margin-top: 1px; flex-shrink: 0; }
.hs-slot .meta { flex: 1; min-width: 0; }
.hs-slot .meta .t { font-size: 12px; font-weight: 700; color: var(--hs-text); }
.hs-slot .meta .s { font-size: 11px; color: var(--hs-text3); margin-top: 1px; }
.hs-slot .meta .extra {
  font-size: 10px; color: var(--hs-green); margin-top: 2px;
  display: inline-flex; align-items: center; gap: 3px;
}
.hs-slot .tag {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  flex-shrink: 0; white-space: nowrap; margin-top: 1px;
}
.hs-slot .tag.accent { background: var(--hs-accent-tint); color: var(--hs-accent); }
.hs-slot .tag.green  { background: var(--hs-green-tint);  color: var(--hs-green); }
.hs-slot .tag.amber  { background: var(--hs-amber-tint);  color: var(--hs-amber); }
.hs-slot .tag.muted  { background: var(--hs-surface3);    color: var(--hs-text3); }

.hs-modal-foot-ts {
  font-size: 11px; color: var(--hs-text3); text-align: center;
  opacity: 0; transition: opacity .4s;
}
.hs-modal.revealed .hs-modal-foot-ts { opacity: 1; }

.hs-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--hs-border);
  background: #fff;
  display: flex; align-items: center; gap: 10px;
}
.hs-modal-foot .cancel {
  padding: 10px 18px; border-radius: 9px;
  background: #fff; border: 1px solid var(--hs-border);
  font-size: 13px; font-weight: 600; color: var(--hs-text2);
}
.hs-modal-foot .submit {
  flex: 1;
  padding: 10px 18px; border-radius: 9px;
  background: var(--hs-accent); border: none;
  font-size: 13px; font-weight: 700; color: #fff;
  box-shadow: var(--hs-shadow-accent);
  opacity: 0.5;
  transition: opacity .4s;
}
.hs-modal.revealed .hs-modal-foot .submit { opacity: 1; }

/* AI-Searching state inside slot box */
.hs-ai-search {
  display: flex; flex-direction: column; gap: 7px;
  position: relative;
}
.hs-modal.revealed .hs-ai-search { display: none; }

.hs-modal:not(.revealed) .hs-slot { display: none; }
.hs-modal:not(.revealed) .hs-modal-foot-ts { display: none; }

.hs-ai-head {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 6px 4px;
  font-size: 12px; font-weight: 600;
  color: var(--hs-accent);
}
.hs-ai-orb {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.hs-ai-orb svg { position: relative; z-index: 2; }
.hs-ai-orb-glow {
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hs-accent) 0%, transparent 65%);
  opacity: 0.45;
  animation: hs-orb-pulse 1.5s ease-in-out infinite;
  z-index: 1;
}
.hs-ai-text {
  background: linear-gradient(90deg,
    var(--hs-accent) 0%, var(--hs-text) 40%, var(--hs-accent) 60%, var(--hs-accent) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hs-text-shimmer 2s linear infinite;
  font-weight: 700;
}
.hs-ai-dots { display: inline-flex; gap: 3px; margin-left: 1px; }
.hs-ai-dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--hs-accent);
  animation: hs-dot-bounce 1.1s ease-in-out infinite;
}
.hs-ai-dots span:nth-child(2) { animation-delay: .15s; }
.hs-ai-dots span:nth-child(3) { animation-delay: .30s; }

.hs-ai-scan {
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  overflow: hidden; border-radius: 9px;
  padding: 1px;
}
.hs-ai-skel-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  background: #fff; border: 1px solid var(--hs-border);
  opacity: 0;
  animation: hs-ai-skel-in 0.4s ease-out forwards;
}
.hs-ai-skel-row:nth-child(1) { animation-delay: 0s;    }
.hs-ai-skel-row:nth-child(2) { animation-delay: 0.12s; }
.hs-ai-skel-row:nth-child(3) { animation-delay: 0.24s; }
.hs-ai-skel-row:nth-child(4) { animation-delay: 0.36s; }
@keyframes hs-ai-skel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hs-ai-skel-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--hs-surface3); flex-shrink: 0;
}
.hs-ai-skel-col { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.hs-shimmer {
  background: linear-gradient(90deg,
    var(--hs-surface3) 0%, var(--hs-surface2) 50%, var(--hs-surface3) 100%);
  background-size: 200% 100%;
  animation: hs-shimmer-bg 1.3s linear infinite;
  border-radius: 5px;
  flex-shrink: 0;
}
@keyframes hs-shimmer-bg {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.hs-ai-beam {
  position: absolute; top: 0; bottom: 0;
  left: -25%; width: 35%;
  background: linear-gradient(90deg,
    transparent 0%, rgba(79,114,227,0) 30%, rgba(79,114,227,0.18) 50%,
    rgba(79,114,227,0) 70%, transparent 100%);
  pointer-events: none;
  animation: hs-ai-beam-sweep 1.8s ease-in-out infinite;
  z-index: 3;
}
@keyframes hs-ai-beam-sweep {
  0%   { transform: translateX(0); }
  100% { transform: translateX(370%); }
}

/* ============================================================
   LEAFLET marker tweaks
   ============================================================ */
.hs-map .leaflet-control-attribution {
  font-size: 8px;
  line-height: 1.2;
  padding: 1px 5px;
  background: rgba(255,255,255,.45);
  color: var(--hs-text3);
  border-top-left-radius: 4px;
}
.hs-map .leaflet-control-attribution a {
  color: var(--hs-text3);
  text-decoration: none;
}
.hs-map .leaflet-control-attribution a:hover { text-decoration: underline; }
.hs-depot-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: #0f172a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.25);
}
.hs-stop-icon {
  width: 22px; height: 22px; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 11px 'Inter', system-ui, sans-serif;
  box-shadow: 0 0 0 2.5px #fff, 0 2px 6px rgba(0,0,0,.25);
}
.hs-driver-pill-map {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 3px; border-radius: 999px;
  background: #fff;
  font: 600 10px 'Inter', system-ui, sans-serif;
  color: #1e293b; white-space: nowrap;
}
.hs-driver-pill-map .av {
  width: 16px; height: 16px; border-radius: 50%;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
}

/* ============================================================
   RESPONSIVE — Mobile fallback (hide modal, simplify panel)
   ============================================================ */
/* ============================================================
   RESPONSIVE (Tablet ≤999, Mobile ≤599)
   ============================================================ */

/* ─── Tablet (≤999px) ─── stacked layout, panel becomes horizontal
   stats strip above the map, modal + bottom-buttons hidden, map
   animation continues to run ─────────────────────────────────── */
@media (max-width: 999px) {
  .hs-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hs-copy {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
  }
  .hs-copy .ctas { justify-content: center; }
  .hs-copy .trust { justify-content: center; }

  /* Stage uses native sizing, no transform */
  .hs-stage {
    width: 100% !important;
    max-width: 680px;
    height: auto !important;
    margin: 0 auto;
    min-height: 0;
  }
  .hs-canvas {
    position: relative;
    width: 100%;
    height: auto;
    transform: none !important;
  }
  .hs-frame-wrap {
    width: 100%;
    height: auto;
  }
  .hs-frame {
    height: auto;
    border-radius: 14px;
  }

  /* Body stacks vertically — panel strip ABOVE map */
  .hs-body { flex-direction: column; }

  /* Panel collapses to a single horizontal stats strip */
  .hs-panel {
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--hs-border);
  }
  .hs-panel-date,
  .hs-day-strip,
  .hs-city-label,
  .hs-driver-list { display: none; }
  .hs-panel-stats {
    width: 100%;
    border-bottom: none;
    padding: 10px 14px;
    gap: 14px;
  }

  /* Map area takes full width below the strip */
  .hs-map-area {
    height: 340px;
    flex: none;
  }

  /* Pop-out elements off on smaller screens */
  .hs-modal-wrap { display: none; }
  .hs-bottom-buttons { display: none; }

  /* Optimizing-Pille etwas schlanker auf Tablet */
  .hs-opt-badge { padding: 6px 13px 6px 9px; gap: 8px; }
  .hs-opt-orb { width: 16px; height: 16px; }
  .hs-opt-orb svg { width: 13px; height: 13px; }
  .hs-opt-title { font-size: 11px; }
  .hs-opt-sub { font-size: 9px; }
}

/* ─── Mobile (≤599px) ─── kompakter: nur Animated Map, kein Stats-Strip ── */
@media (max-width: 599px) {
  .hero-schedule { padding: 24px 16px 32px; }
  .hs-copy { padding: 0; }
  .hs-copy .categories { display: none; }
  .hs-panel { display: none; }
  .hs-frame {
    border-radius: 14px;
    border-left: 1px solid var(--hs-border);
    border-right: 1px solid var(--hs-border);
  }
  .hs-map-area { height: 260px; }
  .hs-map-stats-pill { padding: 5px 10px 5px 8px; gap: 7px; }
  .hs-map-stats-pill .l2 { display: none; }

  /* Optimizing-Pille: kompakt + ohne Sub-Zeile auf Mobile */
  .hs-opt-badge {
    padding: 5px 12px 5px 8px;
    gap: 7px;
  }
  .hs-opt-orb { width: 15px; height: 15px; }
  .hs-opt-orb svg { width: 12px; height: 12px; }
  .hs-opt-title { font-size: 11px; }
  .hs-opt-sub { display: none; }
  .hs-opt-dots { margin-left: 4px; height: 11px; }
}
