/* =========================================================
   La.Se. Consegne Platform — v0.5.4
   Stile: industrial/utilitarian — sidebar scura, accent arancione
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --c-bg:          #F5F4F1;
  --c-surface:     #FFFFFF;
  --c-border:      #E2DFD8;
  --c-border-soft: #EDEBE6;
  --c-text:        #1A1714;
  --c-text-mid:    #5C554D;
  --c-text-muted:  #9C9287;
  --c-orange:      #E8571A;
  --c-orange-dark: #C44510;
  --c-orange-pale: #FFF0E9;
  --c-orange-mid:  #FDDFD0;
  --c-sidebar:     #1C1917;
  --c-sidebar-mid: #292524;
  --c-sidebar-hover:#312F2D;
  --c-sidebar-text: #D6D3D1;
  --c-sidebar-muted:#78716C;
  --c-green:       #16A34A;
  --c-green-pale:  #DCFCE7;
  --c-red:         #DC2626;
  --c-red-pale:    #FEE2E2;
  --c-amber:       #D97706;
  --c-amber-pale:  #FEF3C7;
  --c-blue:        #2563EB;
  --c-blue-pale:   #DBEAFE;
  --font:          'DM Sans', system-ui, sans-serif;
  --font-mono:     'DM Mono', 'Courier New', monospace;
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 28px rgba(0,0,0,.14);
  --sidebar-w:     220px;
  --topbar-h:      64px;
  --transition:    180ms ease;
}

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

body.lase-standalone-body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.lase-standalone-body *:focus-visible {
  outline: 2px solid var(--c-orange);
  outline-offset: 2px;
}

/* ── LOGIN ──────────────────────────────────────────────── */
.lase-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(232,87,26,.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 10%, rgba(232,87,26,.06) 0%, transparent 60%),
    var(--c-bg);
}
.lase-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.lase-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.lase-logo {
  width: 52px; height: 52px;
  background: var(--c-orange);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 17px; font-weight: 500;
  color: #fff; letter-spacing: -.02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232,87,26,.35);
}
.lase-brand h1 {
  font-size: 20px; font-weight: 600;
  color: var(--c-text); letter-spacing: -.02em; line-height: 1.2;
}
.lase-brand p { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }

/* ── Form ───────────────────────────────────────────────── */
.lase-form { display: flex; flex-direction: column; gap: 16px; }
.lase-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--c-text-mid);
  letter-spacing: .03em; text-transform: uppercase;
}
.lase-form input,
.lase-form select,
.lase-form textarea {
  font-family: var(--font); font-size: 14px; color: var(--c-text);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 10px 12px; width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none; -webkit-appearance: none;
}
.lase-form input:hover, .lase-form select:hover, .lase-form textarea:hover { border-color: var(--c-text-muted); }
.lase-form input:focus, .lase-form select:focus, .lase-form textarea:focus {
  outline: none; border-color: var(--c-orange);
  background: var(--c-surface); box-shadow: 0 0 0 3px rgba(232,87,26,.12);
}
.lase-form textarea { resize: vertical; min-height: 80px; }
.lase-form button[type="submit"] {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: #fff; background: var(--c-orange); border: none;
  border-radius: var(--radius); padding: 12px 20px; cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  letter-spacing: -.01em; margin-top: 4px;
}
.lase-form button[type="submit"]:hover { background: var(--c-orange-dark); box-shadow: 0 4px 12px rgba(232,87,26,.3); }
.lase-form button[type="submit"]:active { transform: translateY(1px); }
.lase-form button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; }

/* ── Messages ───────────────────────────────────────────── */
.lase-message {
  font-size: 13px; border-radius: var(--radius);
  padding: 0; overflow: hidden; max-height: 0;
  transition: padding var(--transition), max-height var(--transition);
}
.lase-message.show { padding: 10px 14px; max-height: 120px; }
.lase-message.ok  { background: var(--c-green-pale); color: var(--c-green); }
.lase-message.err { background: var(--c-red-pale); color: var(--c-red); }
.lase-message.info{ background: var(--c-blue-pale); color: var(--c-blue); }
.lase-small { font-size: 12px; color: var(--c-text-muted); text-align: center; margin-top: 8px; }
.lase-muted { font-size: 13px; color: var(--c-text-muted); line-height: 1.6; margin-bottom: 16px; }

/* ── APP LAYOUT ─────────────────────────────────────────── */
.lase-app { display: flex; min-height: 100vh; background: var(--c-bg); }

/* ── Sidebar ────────────────────────────────────────────── */
.lase-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--c-sidebar);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 100;
  border-right: 1px solid rgba(255,255,255,.04);
}
.lase-side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 8px;
}
.lase-side-brand-dot {
  width: 8px; height: 8px;
  background: var(--c-orange); border-radius: 50%; flex-shrink: 0;
}
.lase-side-brand strong {
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.03em;
}
.lase-side-brand span {
  font-size: 11px; color: var(--c-sidebar-muted);
  font-weight: 400; letter-spacing: .04em; text-transform: uppercase;
}
.lase-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 1px 8px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--c-sidebar-text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.lase-nav-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c-sidebar-muted); flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.lase-nav:hover { background: var(--c-sidebar-hover); color: #fff; }
.lase-nav:hover .lase-nav-dot { background: var(--c-orange); transform: scale(1.4); }
.lase-nav.active { background: rgba(232,87,26,.18); color: #fff; }
.lase-nav.active .lase-nav-dot {
  background: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(232,87,26,.25);
  transform: scale(1.2);
}
.lase-logout {
  margin: auto 8px 16px;
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 16px); padding: 10px 16px;
  background: transparent; border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); font-family: var(--font);
  font-size: 13px; font-weight: 500; color: var(--c-sidebar-muted);
  cursor: pointer; transition: all var(--transition); text-align: left;
}
.lase-logout:hover {
  background: rgba(220,38,38,.15);
  border-color: rgba(220,38,38,.3); color: #FCA5A5;
}

/* ── Main ───────────────────────────────────────────────── */
.lase-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ─────────────────────────────────────────────── */
.lase-topbar {
  height: var(--topbar-h);
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 50;
}
.lase-topbar h1 { font-size: 16px; font-weight: 600; color: var(--c-text); letter-spacing: -.02em; }
.lase-topbar p { font-size: 12px; color: var(--c-text-muted); margin-top: 1px; }
.lase-topbar-right { display: flex; align-items: center; gap: 12px; }
.lase-pill {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--c-orange-pale); color: var(--c-orange);
  border: 1px solid var(--c-orange-mid); padding: 4px 10px;
  border-radius: 999px; font-weight: 500; white-space: nowrap;
}
.lase-topbar-menu {
  width: 36px; height: 36px;
  display: none; align-items: center; justify-content: center;
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); cursor: pointer; font-size: 18px; color: var(--c-text);
}

/* ── Content ────────────────────────────────────────────── */
.lase-content { padding: 28px; flex: 1; display: flex; flex-direction: column; gap: 20px; }

/* ── Dashboard cards ────────────────────────────────────── */
.lase-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.lase-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 20px 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative; overflow: hidden;
}
.lase-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--c-orange); opacity: 0; transition: opacity var(--transition);
}
.lase-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.lase-card:hover::after { opacity: 1; }
.lase-card span { font-size: 11px; font-weight: 500; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.lase-card strong { font-size: 32px; font-weight: 700; color: var(--c-text); letter-spacing: -.04em; line-height: 1; font-family: var(--font-mono); }

/* ── Panel ──────────────────────────────────────────────── */
.lase-panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; }
.lase-panel h2 { font-size: 14px; font-weight: 600; color: var(--c-text); letter-spacing: -.01em; padding: 18px 24px 0; }
.lase-panel > p { font-size: 13px; color: var(--c-text-mid); padding: 8px 24px 18px; line-height: 1.65; }

/* ── Record Form ────────────────────────────────────────── */
.lase-record-form { padding: 16px 24px 22px; }
.lase-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.lase-form-grid label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; font-weight: 500; color: var(--c-text-muted);
  letter-spacing: .04em; text-transform: uppercase;
}
.lase-form-grid input,
.lase-form-grid select,
.lase-form-grid textarea {
  font-family: var(--font); font-size: 13px; color: var(--c-text);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 8px 11px; width: 100%;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  appearance: none;
}
.lase-form-grid input:focus, .lase-form-grid select:focus, .lase-form-grid textarea:focus {
  outline: none; border-color: var(--c-orange);
  background: var(--c-surface); box-shadow: 0 0 0 3px rgba(232,87,26,.10);
}
.lase-form-grid .wide { grid-column: 1 / -1; }
.lase-form-grid textarea { resize: vertical; min-height: 68px; }
.lase-record-form > button[type="submit"] {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--c-orange); border: none;
  border-radius: var(--radius); padding: 9px 18px; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
.lase-record-form > button[type="submit"]:hover { background: var(--c-orange-dark); box-shadow: 0 3px 10px rgba(232,87,26,.3); }
.lase-record-form > button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; }
.lase-record-form .lase-message { margin-top: 10px; font-size: 12px; }

/* ── Table ──────────────────────────────────────────────── */
.lase-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lase-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lase-table thead { background: var(--c-bg); border-bottom: 2px solid var(--c-border); }
.lase-table th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; font-weight: 600; color: var(--c-text-muted);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.lase-table td { padding: 12px 16px; color: var(--c-text-mid); border-bottom: 1px solid var(--c-border-soft); vertical-align: middle; }
.lase-table tbody tr:last-child td { border-bottom: none; }
.lase-table tbody tr { transition: background var(--transition); }
.lase-table tbody tr:hover { background: var(--c-orange-pale); }
.lase-table td:first-child { color: var(--c-text); font-weight: 500; }
.lase-table td:empty::after { content: '—'; color: var(--c-border); }

/* ── Delete button ──────────────────────────────────────── */
.lase-delete,
.lase-delete-batch,
.lase-delete-bulk {
  font-family: var(--font); font-size: 11px; font-weight: 600;
  color: var(--c-red); background: var(--c-red-pale);
  border: 1px solid rgba(220,38,38,.2); border-radius: var(--radius-sm);
  padding: 4px 10px; cursor: pointer; transition: all var(--transition);
  white-space: nowrap; letter-spacing: .02em;
}
.lase-delete:hover,.lase-delete-batch:hover,.lase-delete-bulk:hover { background: var(--c-red); color: #fff; border-color: var(--c-red); box-shadow: 0 2px 6px rgba(220,38,38,.25); }
.lase-delete:disabled,.lase-delete-batch:disabled,.lase-delete-bulk:disabled { opacity: .5; cursor: not-allowed; }

/* ── Notice ─────────────────────────────────────────────── */
.lase-notice {
  border: 1px solid var(--c-orange-mid); border-left: 3px solid var(--c-orange);
  background: var(--c-orange-pale); border-radius: var(--radius);
  padding: 14px 18px; font-size: 13px; color: var(--c-orange-dark); line-height: 1.6;
}
.lase-notice strong { display: block; margin-bottom: 4px; font-weight: 600; }

/* ── Toast ──────────────────────────────────────────────── */
@keyframes lase-spin { to { transform: rotate(360deg); } }
@keyframes lase-toast-in { from { opacity:0; transform:translateY(12px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes lase-toast-out { to { opacity:0; transform:translateY(12px) scale(.95); } }

#lase-toast { position:fixed; bottom:24px; right:24px; z-index:9999; display:flex; flex-direction:column; gap:10px; pointer-events:none; }
.lase-toast-item {
  font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 12px 18px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: lase-toast-in .25s ease forwards; max-width: 320px;
}
.lase-toast-item.ok  { background: #15803d; color: #fff; }
.lase-toast-item.err { background: #991b1b; color: #fff; }
.lase-toast-item.info{ background: var(--c-sidebar); color: #fff; }
.lase-toast-item.out { animation: lase-toast-out .3s ease forwards; }

/* ── Overlay sidebar mobile ─────────────────────────────── */
.lase-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 99; display: none;
}
.lase-sidebar-overlay.show { display: block; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lase-sidebar {
    transform: translateX(-220px); width: 220px;
    transition: transform .25s ease;
  }
  .lase-sidebar.open { transform: translateX(0); }
  .lase-main { margin-left: 0; }
  .lase-topbar { padding: 0 16px; }
  .lase-topbar-menu { display: flex; }
  .lase-content { padding: 16px; }
  .lase-form-grid { grid-template-columns: 1fr; }
  .lase-grid-cards { grid-template-columns: repeat(2, 1fr); }
  .lase-login-card { padding: 28px 22px; }
  .lase-table { font-size: 12px; }
  .lase-table th, .lase-table td { padding: 9px 10px; }
}

/* =========================================================
   v0.3.1 — Stili operativi: programmazione, driver, mappa
   ========================================================= */

/* ── Step panels (programmazione) ───────────────────────── */
.lase-step-panel { margin-bottom: 0; }
.lase-step-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--c-border-soft);
}
.lase-step-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--c-orange); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; font-family: var(--font-mono);
  box-shadow: 0 2px 8px rgba(232,87,26,.3);
}

/* ── Progress geocoding ──────────────────────────────────── */
.lase-geocoding-progress { margin-bottom: 16px; }
.lase-progress-bar {
  height: 6px; background: var(--c-border); border-radius: 999px; overflow: hidden; margin-bottom: 8px;
}
.lase-progress-fill {
  height: 100%; background: var(--c-orange);
  border-radius: 999px; transition: width .4s ease;
}
.lase-geo-label { font-size: 12px; color: var(--c-text-muted); font-family: var(--font-mono); }

/* ── Stops preview table (geocoding) ────────────────────── */
.lase-stops-preview { max-height: 320px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: var(--radius); }
.lase-stops-preview table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lase-stops-preview th { position: sticky; top: 0; background: var(--c-bg); padding: 8px 12px; text-align: left; font-weight: 600; color: var(--c-text-muted); text-transform: uppercase; font-size: 10px; letter-spacing: .06em; border-bottom: 1px solid var(--c-border); }
.lase-stops-preview td { padding: 8px 12px; border-bottom: 1px solid var(--c-border-soft); color: var(--c-text-mid); vertical-align: middle; }
.lase-stops-preview tr:last-child td { border-bottom: none; }
.lase-geo-ok  { color: var(--c-green); font-size: 14px; }
.lase-geo-err { color: var(--c-red); font-size: 14px; }
.lase-geo-pend{ color: var(--c-text-muted); font-size: 14px; }

/* ── Assign crew rows ─────────────────────────────────────── */
.lase-assign-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--c-border-soft);
  flex-wrap: wrap;
}
.lase-assign-row:last-of-type { border-bottom: none; }
.lase-assign-color { width: 12px; height: 36px; border-radius: 4px; background: var(--crew-color,var(--c-orange)); flex-shrink: 0; }
.lase-assign-info { min-width: 130px; }
.lase-assign-info strong { display: block; font-size: 13px; color: var(--c-text); }
.lase-muted-sm { font-size: 11px; color: var(--c-text-muted); }
.lase-assign-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; flex: 1; }
.lase-assign-label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 10px; font-weight: 600; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .05em;
}
.lase-assign-label input[type="time"],
.lase-assign-label select {
  font-family: var(--font); font-size: 13px; color: var(--c-text);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 6px 8px; min-width: 80px;
  appearance: none;
}
.lase-assign-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-text-mid); cursor: pointer; padding-bottom: 2px; }
.lase-assign-check input { cursor: pointer; }

/* ── Map ──────────────────────────────────────────────────── */
.lase-map-container {
  height: 420px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-border);
}

/* ── Runs legend ─────────────────────────────────────────── */
.lase-runs-legend { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.lase-legend-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 8px 14px; font-size: 12px;
}
.lase-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.lase-legend-item strong { font-weight: 600; color: var(--c-text); }
.lase-legend-item span { color: var(--c-text-muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.lase-btn-primary {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--c-orange); border: none;
  border-radius: var(--radius); padding: 10px 18px; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.lase-btn-primary:hover { background: var(--c-orange-dark); box-shadow: 0 3px 10px rgba(232,87,26,.3); }
.lase-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.lase-btn-outline {
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--c-text-mid); background: transparent;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 9px 16px; cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.lase-btn-outline:hover { border-color: var(--c-orange); color: var(--c-orange); background: var(--c-orange-pale); }

.lase-btn-sm {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--c-orange); background: var(--c-orange-pale);
  border: 1px solid var(--c-orange-mid); border-radius: var(--radius-sm);
  padding: 5px 12px; cursor: pointer; text-decoration: none;
  transition: all var(--transition); white-space: nowrap; display: inline-block;
}
.lase-btn-sm:hover { background: var(--c-orange); color: #fff; border-color: var(--c-orange); }

/* ── Today overview ──────────────────────────────────────── */
.lase-today-overview { display: flex; flex-direction: column; gap: 12px; }
.lase-run-card {
  border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  overflow: hidden; border-left: 4px solid var(--crew-color, var(--c-orange));
}
.lase-run-card-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--c-bg);
}
.lase-run-card-header h3 { font-size: 14px; font-weight: 600; color: var(--c-text); flex: 1; }
.lase-run-stats { display: flex; gap: 12px; flex-wrap: wrap; padding: 12px 18px; }
.lase-run-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lase-run-stat strong { font-size: 20px; font-weight: 700; font-family: var(--font-mono); color: var(--c-text); }
.lase-run-stat span { font-size: 10px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.lase-loading-inline { color: var(--c-text-muted); font-size: 13px; padding: 8px 0; }

/* ── Driver view ─────────────────────────────────────────── */
.lase-driver-view { display: flex; flex-direction: column; gap: 0; min-height: calc(100vh - var(--topbar-h)); }

.lase-driver-header {
  background: var(--c-sidebar); color: #fff;
  padding: 16px 20px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: var(--topbar-h); z-index: 40;
}
.lase-driver-header h2 { font-size: 15px; font-weight: 600; color: #fff; }
.lase-driver-header p { font-size: 12px; color: var(--c-sidebar-muted); }
.lase-driver-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.lase-driver-kpis span {
  display: inline-flex; align-items: center; min-height: 24px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.10); color: #fff;
  font-size: 11px; font-weight: 600;
}
.lase-driver-progress-bar { height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; margin-top: 10px; }
.lase-driver-progress-fill { height: 100%; background: var(--c-orange); border-radius: 2px; transition: width .5s ease; }

.lase-driver-stops { display: flex; flex-direction: column; gap: 0; }

.lase-stop-card {
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-surface);
  transition: background var(--transition), opacity var(--transition);
  cursor: pointer;
}
.lase-stop-card.done { background: var(--c-bg); opacity: .65; }
.lase-stop-card.problem { border-left: 4px solid var(--c-amber); }

.lase-stop-card-header {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px;
}
.lase-stop-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  background: var(--c-orange-pale); color: var(--c-orange);
}
.lase-stop-card.done .lase-stop-num { background: var(--c-green-pale); color: var(--c-green); }

.lase-stop-info { flex: 1; min-width: 0; }
.lase-stop-name { font-size: 15px; font-weight: 600; color: var(--c-text); margin-bottom: 3px; }
.lase-stop-addr { font-size: 13px; color: var(--c-text-mid); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lase-stop-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; flex-shrink: 0;
}
.lase-stop-badge.delivered { background: var(--c-green-pale); color: var(--c-green); }
.lase-stop-badge.absent    { background: var(--c-red-pale); color: var(--c-red); }
.lase-stop-badge.problem   { background: var(--c-amber-pale); color: var(--c-amber); }
.lase-stop-badge.pending   { background: var(--c-orange-pale); color: var(--c-orange); }

.lase-stop-detail {
  display: none; padding: 0 20px 20px 66px;
  border-top: 1px solid var(--c-border-soft);
}
.lase-stop-card.expanded .lase-stop-detail { display: block; }

.lase-stop-actions { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.lase-stop-action-btn {
  flex: 1; min-width: 90px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 12px 10px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition); text-align: center;
}
.lase-stop-action-btn.delivered { background: var(--c-green-pale); color: var(--c-green); border-color: rgba(22,163,74,.2); }
.lase-stop-action-btn.delivered:hover,.lase-stop-action-btn.delivered.active { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.lase-stop-action-btn.absent { background: var(--c-red-pale); color: var(--c-red); border-color: rgba(220,38,38,.2); }
.lase-stop-action-btn.absent:hover,.lase-stop-action-btn.absent.active { background: var(--c-red); color: #fff; border-color: var(--c-red); }
.lase-stop-action-btn.problem { background: var(--c-amber-pale); color: var(--c-amber); border-color: rgba(217,119,6,.2); }
.lase-stop-action-btn.problem:hover,.lase-stop-action-btn.problem.active { background: var(--c-amber); color: #fff; border-color: var(--c-amber); }

.lase-stop-note-row { display: flex; gap: 8px; }
.lase-stop-note-row input {
  flex: 1; font-family: var(--font); font-size: 13px; padding: 9px 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg);
  color: var(--c-text);
}
.lase-stop-note-row input:focus { outline: none; border-color: var(--c-orange); }

.lase-stop-meta { font-size: 12px; color: var(--c-text-muted); margin-bottom: 10px; line-height: 1.7; }
.lase-stop-meta a { color: var(--c-orange); text-decoration: none; font-weight: 500; }

.lase-stop-maps-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--c-blue); border: none;
  border-radius: var(--radius); padding: 10px 16px; cursor: pointer; text-decoration: none;
  transition: background var(--transition);
}
.lase-stop-maps-btn:hover { background: #1D4ED8; }

.lase-driver-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 60px 20px; color: var(--c-text-muted); font-size: 14px; }
.lase-spinner-lg { width: 36px; height: 36px; border: 3px solid var(--c-border); border-top-color: var(--c-orange); border-radius: 50%; animation: lase-spin .8s linear infinite; }

.lase-driver-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; text-align: center; }
.lase-driver-empty-icon { font-size: 48px; }
.lase-driver-empty h3 { font-size: 16px; font-weight: 600; color: var(--c-text); }
.lase-driver-empty p { font-size: 13px; color: var(--c-text-muted); max-width: 260px; }

/* ── Nav icon ─────────────────────────────────────────────── */
.lase-nav-icon { width: 18px; text-align: center; font-size: 12px; color: var(--c-sidebar-muted); flex-shrink: 0; transition: color var(--transition); }
.lase-nav:hover .lase-nav-icon, .lase-nav.active .lase-nav-icon { color: var(--c-orange); }

/* ── Mobile driver overrides ─────────────────────────────── */
@media (max-width: 768px) {
  .lase-driver-header { padding: 12px 16px; }
  .lase-stop-card-header { padding: 14px 16px; }
  .lase-stop-detail { padding: 0 16px 16px 62px; }
  .lase-stop-actions { gap: 8px; }
  .lase-stop-action-btn { padding: 14px 8px; font-size: 12px; }
  .lase-stop-addr { white-space: normal; overflow: visible; text-overflow: clip; }
  #lase-toast { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .lase-toast-item { max-width: none; width: 100%; }
  .lase-map-container { height: 280px; }
}


/* ── v0.3.3 — correzione indirizzi geocoding ───────────── */
.lase-stops-preview tr.geo-failed { background: var(--c-red-pale); }
.lase-stops-preview tr.geo-ok .geo-tools-cell { color: var(--c-green); }
.lase-geo-edit { display:flex; gap:8px; align-items:center; min-width: 260px; }
.lase-geo-address-input {
  width: min(520px, 58vw);
  font-family: var(--font); font-size: 12px; color: var(--c-text);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 6px 8px;
}
.lase-geo-address-input:focus { outline:none; border-color: var(--c-orange); box-shadow: 0 0 0 3px rgba(232,87,26,.10); }
.geo-address-cell { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geo-tools-cell { min-width: 320px; }
@media (max-width: 768px) {
  .lase-geo-edit { flex-direction: column; align-items: stretch; min-width: 220px; }
  .lase-geo-address-input { width: 100%; }
  .geo-tools-cell { min-width: 240px; }
}


/* ── v0.3.6 — cancellazione manuale giornata ───────────── */
.lase-btn-danger {
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: #fff; background: var(--c-red); border: none;
  border-radius: var(--radius); padding: 10px 18px; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.lase-btn-danger:hover { background: #991B1B; box-shadow: 0 3px 10px rgba(220,38,38,.28); }
.lase-btn-danger:disabled { opacity:.6; cursor:not-allowed; box-shadow:none; }
#lase-step-day-tools .lase-step-num { background: var(--c-red); box-shadow: 0 2px 8px rgba(220,38,38,.25); }

/* ── v0.3.8 — programmazione giornata + punto carico servizio ───────────── */
.lase-pickup-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text-mid);
}
.lase-pickup-summary strong { color: var(--c-text); }
.lase-pickup-summary span { color: var(--c-text-muted); font-family: var(--font-mono); font-size: 11px; }
.lase-pickup-summary.ok { border-color: var(--c-green-pale); background: var(--c-green-pale); color: var(--c-green); }
.lase-pickup-summary.err { border-color: var(--c-red-pale); background: var(--c-red-pale); color: var(--c-red); }
.lase-geo-review {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--c-orange-mid);
  border-left: 4px solid var(--c-orange);
  border-radius: var(--radius);
  background: var(--c-orange-pale);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lase-geo-review strong { color: var(--c-orange-dark); }
.lase-geo-review span { flex: 1; min-width: 260px; color: var(--c-text-mid); font-size: 13px; }
@media (max-width: 768px) {
  .lase-geo-review { align-items: stretch; flex-direction: column; }
  .lase-geo-review span { min-width: 0; }
}


/* ── v0.3.8 — geocoding punto di carico ───────────────── */
.lase-pickup-geocode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: -4px;
}
.lase-pickup-geocode-row .lase-muted-sm { max-width: 560px; }


/* ── v0.4.3 — bulk destinatari ───────────────────────── */
.lase-bulk-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.lase-bulk-check { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--c-text-mid); cursor:pointer; }
.lase-bulk-check input, .lase-rec-row-check, #lase-rec-head-select-all { accent-color: var(--c-orange); cursor:pointer; }
.lase-delete-bulk { font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--c-red); background: var(--c-red-pale); border: 1px solid rgba(220,38,38,.2); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; transition: all var(--transition); white-space: nowrap; letter-spacing: .02em; }

/* ── v0.4.8 — conferma import destinatari ───────────── */
.lase-import-complete {
  margin: 16px 24px 24px;
  padding: 16px 18px;
  border: 1px solid var(--c-green);
  border-left: 4px solid var(--c-green);
  border-radius: var(--radius-lg);
  background: var(--c-green-pale);
  color: var(--c-text);
}
.lase-import-complete strong { display:block; font-size:14px; margin-bottom:4px; color:var(--c-green); }
.lase-import-complete p { margin: 0 0 12px; font-size:13px; color:var(--c-text-mid); }
.lase-complete-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.lase-complete-actions .lase-btn-primary { text-decoration:none; }


/* ── v0.4.9 — anteprima programmazione giornata ───────────── */
.lase-programming-preview {
  margin: 12px 0 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  overflow: hidden;
}
.lase-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
}
.lase-preview-grid > div {
  padding: 12px 14px;
  border-right: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
}
.lase-preview-grid > div.wide { grid-column: span 2; }
.lase-preview-grid span {
  display: block;
  font-size: 10px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.lase-preview-grid strong {
  display: block;
  font-size: 20px;
  font-family: var(--font-mono);
  color: var(--c-text);
}
.lase-preview-warning {
  padding: 10px 14px;
  background: var(--c-amber-pale);
  color: var(--c-amber);
  border-top: 1px solid rgba(217,119,6,.18);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .lase-preview-grid > div.wide { grid-column: span 1; }
}

/* =========================================================
   v0.5.0 — Driver cockpit: lista + mappa + navigazione
   ========================================================= */
.lase-driver-cockpit {
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(360px, 58%);
  grid-template-areas:
    "next map"
    "list map";
  gap: 16px;
  padding: 16px;
  align-items: start;
}
.lase-driver-next {
  grid-area: next;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.lase-next-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-orange);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.lase-next-step {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 3px 9px; margin-bottom: 8px;
  border-radius: 999px; background: var(--c-blue-pale);
  color: var(--c-blue); font-size: 12px; font-weight: 700;
}
.lase-next-main { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.lase-next-main h3 { font-size: 20px; line-height: 1.15; margin-bottom: 5px; color: var(--c-text); }
.lase-next-main p { font-size: 14px; color: var(--c-text-mid); margin-bottom: 8px; }
.lase-next-notes {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 7px 10px;
  background: var(--c-orange-pale);
  border: 1px solid var(--c-orange-mid);
  border-radius: var(--radius);
  color: var(--c-orange-dark);
  font-size: 13px;
  line-height: 1.4;
}
.lase-next-phone { display: inline-block; color: var(--c-blue); font-weight: 600; text-decoration: none; font-size: 13px; }
.lase-next-actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.lase-next-actions .lase-btn-primary { justify-content: center; }
.lase-next-actions .lase-stop-action-btn { min-width: 0; padding: 9px 10px; }
.lase-next-complete { display: flex; flex-direction: column; gap: 5px; }
.lase-next-complete strong { color: var(--c-green); font-size: 20px; }
.lase-next-complete span { color: var(--c-text-mid); font-size: 13px; }

.lase-driver-map-panel {
  grid-area: map;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lase-driver-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg);
}
.lase-driver-gps-control { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.lase-driver-gps-state {
  display: inline-flex; align-items: center; min-height: 30px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-text-muted);
}
.lase-driver-gps-state.ok { background: var(--c-green-pale); color: var(--c-green); border-color: rgba(22,163,74,.22); }
.lase-driver-gps-state.pending { background: var(--c-orange-pale); color: var(--c-orange-dark); border-color: var(--c-orange-mid); }
.lase-driver-gps-state.err { background: var(--c-red-pale); color: var(--c-red); border-color: rgba(220,38,38,.22); }
#drv-enable-location.active { border-color: rgba(22,163,74,.35); color: var(--c-green); background: var(--c-green-pale); }
.lase-driver-map { height: calc(100vh - 210px); min-height: 420px; width: 100%; }
.lase-driver-map-hint { padding: 8px 12px; font-size: 11px; color: var(--c-text-muted); border-top: 1px solid var(--c-border-soft); }
.lase-driver-list-panel {
  grid-area: list;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lase-driver-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 12px 16px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-soft);
}
.lase-stop-note-mini {
  margin-top: 4px;
  color: var(--c-orange-dark);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lase-stop-card.map-focused {
  box-shadow: inset 4px 0 0 var(--c-blue);
  background: var(--c-blue-pale);
}
.lase-stop-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lase-user-location-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 5px rgba(37,99,235,.25), 0 2px 8px rgba(0,0,0,.35);
}
@media (max-width: 980px) {
  .lase-driver-cockpit {
    grid-template-columns: 1fr;
    grid-template-areas: "next" "map" "list";
    padding: 10px;
  }
  .lase-driver-map-panel { position: static; }
  .lase-driver-map { height: 360px; min-height: 320px; }
  .lase-next-main { grid-template-columns: 1fr; }
  .lase-next-actions { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
  .lase-next-actions .lase-btn-primary { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .lase-driver-cockpit {
    grid-template-areas: "next" "list" "map";
    padding: 8px; gap: 10px;
  }
  .lase-driver-next { padding: 14px; }
  .lase-driver-kpis span { flex: 1 1 auto; justify-content: center; }
  .lase-next-main h3 { font-size: 18px; }
  .lase-next-main p { font-size: 15px; line-height: 1.45; }
  .lase-driver-map-toolbar { flex-direction: column; align-items: stretch; }
  .lase-driver-gps-control { flex-direction: column; align-items: stretch; }
  .lase-driver-gps-state { justify-content: center; width: 100%; }
  .lase-driver-map { height: 240px; min-height: 220px; }
  .lase-next-actions { grid-template-columns: 1fr; }
  .lase-next-actions .lase-btn-primary,
  .lase-next-actions .lase-stop-action-btn,
  .lase-stop-action-btn,
  .lase-stop-maps-btn,
  .lase-driver-view .lase-btn-outline {
    min-height: 48px;
  }
  .lase-stop-card-header { gap: 10px; }
  .lase-stop-name { font-size: 16px; }
  .lase-stop-badge { align-self: flex-start; }
  .lase-stop-actions { flex-direction: column; }
  .lase-stop-note-row { flex-direction: column; }
}

/* =========================================================
   v0.5.1 — Control Room live admin/segreteria
   ========================================================= */
.lase-live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: stretch;
}
.lase-live-map {
  min-height: 520px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-bg);
}
.lase-live-sidebar {
  min-height: 520px;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-bg);
  padding: 12px;
}
.lase-live-hint {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 8px;
}
.lase-live-run-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-left: 4px solid var(--crew-color, var(--c-orange));
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.lase-live-run-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.lase-live-run-head strong { font-size: 13px; color: var(--c-text); }
.lase-live-run-head span { font-size: 11px; color: var(--c-text-muted); text-align: right; }
.lase-live-run-status { font-size: 12px; color: var(--c-text-mid); margin: 8px 0; }
.lase-live-stats { display:flex; gap:8px; flex-wrap:wrap; font-size:11px; color:var(--c-text-muted); margin-top:8px; }
.lase-live-next { font-size: 12px; color: var(--c-text-mid); line-height: 1.45; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-border-soft); }
.lase-live-next b { color: var(--c-text); }
.lase-live-next span { color: var(--c-text-muted); }
.lase-live-driver-dot {
  width: 34px; height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.lase-live-stop-dot {
  width: 22px; height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
@media (max-width: 980px) {
  .lase-live-layout { grid-template-columns: 1fr; }
  .lase-live-map { min-height: 380px; }
  .lase-live-sidebar { min-height: auto; max-height: 420px; }
}


/* ── v0.5.4 — UX gestionale ───────────────────────────── */
.lase-record-form.editing { background: linear-gradient(180deg, var(--c-orange-pale), transparent 120px); }
.lase-record-form.editing::before { content: 'Modifica record esistente'; display: block; margin-bottom: 12px; font-size: 12px; font-weight: 700; color: var(--c-orange-dark); text-transform: uppercase; letter-spacing: .06em; }
.lase-filter-form .lase-btn-outline { display: inline-flex; align-items: center; margin-left: 8px; text-decoration: none; }
.lase-cancel-edit { margin-left: 8px; }

/* ── v0.5.6 — Control Room più solida ─────────────────── */
.lase-live-toolbar {
  display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap;
  padding:0 0 12px; margin-top:-4px;
}
.lase-live-toolbar label {
  display:flex; flex-direction:column; gap:4px;
  font-size:10px; font-weight:600; color:var(--c-text-muted);
  text-transform:uppercase; letter-spacing:.05em;
}
.lase-live-toolbar select {
  min-width:180px; font-family:var(--font); font-size:13px; color:var(--c-text);
  background:var(--c-bg); border:1px solid var(--c-border); border-radius:var(--radius);
  padding:8px 10px;
}
.lase-live-summary {
  margin-left:auto; min-height:34px; display:flex; align-items:center;
  background:var(--c-bg); border:1px solid var(--c-border); border-radius:var(--radius);
  padding:8px 12px; font-size:12px; color:var(--c-text-mid); white-space:nowrap;
}
.lase-live-hint { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
#lase-live-updated { font-family:var(--font-mono); color:var(--c-text-muted); }
.lase-live-run-status.ok { color:var(--c-green); }
.lase-live-run-status.stale { color:var(--c-amber); }
.lase-live-run-status.off { color:var(--c-text-muted); }
.lase-live-next.completed { color:var(--c-green); }
@media (max-width:768px) {
  .lase-live-summary { margin-left:0; width:100%; white-space:normal; }
  .lase-live-toolbar label { width:100%; }
  .lase-live-toolbar select { width:100%; }
}

/* ── v0.5.12 — Schede tempi giro autista ───────────────── */
.lase-route-timing {
  margin-top: 18px;
  border-top: 1px solid var(--c-border-soft);
  padding-top: 16px;
}
.lase-route-timing h3 {
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--c-text);
}
.lase-route-timing-note {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 12px;
}
.lase-route-card {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--crew-color, var(--c-orange));
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.lase-route-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: var(--c-bg);
}
.lase-route-card summary::-webkit-details-marker { display: none; }
.lase-route-card summary b { display: block; font-size: 14px; color: var(--c-text); }
.lase-route-card summary small { display: block; font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }
.lase-route-card-kpis {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-mid);
  text-align: right;
}
.lase-route-card-kpis.over { color: var(--c-red); font-weight: 700; }
.lase-route-card-body { padding: 14px 16px 16px; }
.lase-route-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.lase-route-kpi-grid div {
  background: var(--c-bg);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.lase-route-kpi-grid span {
  display: block;
  font-size: 10px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lase-route-kpi-grid strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--c-text);
}
.lase-route-warning {
  border: 1px solid rgba(220,38,38,.25);
  background: var(--c-red-pale);
  color: var(--c-red);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 600;
}
.lase-route-table td span { color: var(--c-text-muted); font-size: 12px; }
@media (max-width: 768px) {
  .lase-route-card summary { flex-direction: column; align-items: flex-start; }
  .lase-route-card-kpis { text-align: left; }
}
