.tom-track-shell{max-width:720px;margin:40px auto;padding:0 18px}.tom-track-card{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:20px;padding:28px;box-shadow:0 18px 60px rgba(0,0,0,.08)}.tom-eyebrow{display:block;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.11em;opacity:.55;margin-bottom:8px}.tom-track-card h2{font-size:34px;line-height:1.1;margin:0 0 12px}.tom-track-meta{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:26px}.tom-track-meta span{background:#f5f5f5;border-radius:999px;padding:7px 11px;font-size:13px;font-weight:700}.tom-progress{display:grid;gap:0}.tom-step{position:relative;display:grid;grid-template-columns:24px 1fr;gap:12px;align-items:start;min-height:55px}.tom-step:not(:last-child):after{content:"";position:absolute;left:8px;top:18px;width:2px;height:37px;background:#e1e1e1}.tom-step-dot{width:18px;height:18px;border-radius:50%;border:2px solid #d4d4d4;background:#fff;box-sizing:border-box;margin-top:1px;position:relative;z-index:2}.tom-step--done .tom-step-dot,.tom-step--current .tom-step-dot{border-color:currentColor;background:currentColor}.tom-step--current .tom-step-dot{box-shadow:0 0 0 5px rgba(0,0,0,.08)}.tom-step--done:after{background:currentColor!important}.tom-step-label{font-weight:700}.tom-step--upcoming{opacity:.4}.tom-track-status{margin:10px 0 0;font-size:13px;opacity:.55}.tom-track-alert{border-radius:12px;background:#fff1f1;border:1px solid #f3caca;padding:15px}.tom-driver-map-placeholder{display:grid;gap:4px;margin-top:12px;padding:14px;border:1px dashed #c7c7c7;border-radius:12px;color:#666}.tom-driver-map-placeholder.is-live{border-style:solid;background:#f6f8fa;color:#111}.tom-driver-app{max-width:640px;margin:20px auto;padding:0 14px}.tom-driver-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.tom-driver-head h2{margin:2px 0}.tom-driver-live{font-size:11px;font-weight:800;border-radius:999px;padding:6px 9px;background:#edfaef;color:#087a25}.tom-driver-job{border:1px solid #ddd;border-radius:16px;padding:18px;margin-bottom:14px;background:#fff}.tom-driver-job-head{display:flex;justify-content:space-between;align-items:center}.tom-driver-job h3{margin-bottom:4px}.tom-driver-job p{margin:4px 0}.tom-driver-items{border-top:1px solid #eee;border-bottom:1px solid #eee;margin:12px 0;padding:8px 0}.tom-driver-items small{display:block;padding-left:14px;color:#666}.tom-driver-paid,.tom-driver-due{font-weight:900;border-radius:10px;padding:12px;margin:10px 0}.tom-driver-paid{background:#edfaef;color:#087a25}.tom-driver-due{background:#fff4e5;color:#8a4b00}.tom-driver-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.tom-driver-actions .button{text-align:center;min-height:48px;display:grid;place-items:center}.tom-proof{width:100%;margin-top:10px}.tom-driver-empty{text-align:center;border:1px dashed #ccc;border-radius:16px;padding:40px 20px}.tom-product-options{display:grid;gap:10px;margin:14px 0}.tom-product-options select{width:100%;max-width:420px}.tom-split-toggle{display:flex;gap:8px;align-items:center}.tom-split-picker{display:grid;gap:6px}@media(max-width:600px){.tom-track-shell{margin:20px auto}.tom-track-card{padding:21px;border-radius:16px}.tom-track-card h2{font-size:27px}.tom-driver-actions{grid-template-columns:1fr}}.tom-future-cancel{margin-top:18px;padding:14px;border:1px solid #ddd;border-radius:12px;background:#fafafa}.tom-future-cancel p{margin-top:0}
.tom-driver-brief{display:grid;gap:7px;margin:12px 0}.tom-driver-item{display:grid;gap:3px;padding:8px 0;border-bottom:1px solid #eee}.tom-driver-item small{color:#8a2b25}.tom-driver-details{margin:10px 0}.tom-driver-details summary{cursor:pointer;font-weight:700}.tom-driver-full-item{padding:8px 0}.tom-driver-full-item small{display:block;color:#666;padding-left:10px}.tom-driver-future{margin:8px 0;padding:7px 9px;border-radius:8px;background:#fff3cd;color:#6b5100;font-weight:800}.tom-driver-network{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;background:#edfaef;color:#087a25}.tom-driver-network.is-offline{background:#fff1f1;color:#a12622}.tom-proof-label{display:grid;gap:5px;margin-top:10px;font-size:12px}

.tom-step-time{
  display:block;
  margin-top:2px;
  font-size:11px;
  font-weight:500;
  opacity:.58;
}

.tom-driver-job-head{padding-bottom:10px;border-bottom:1px solid #eee}
.tom-driver-job-id{display:flex;align-items:center;gap:8px}
.tom-driver-total{font-size:20px}
.tom-driver-summary-line{display:flex;justify-content:space-between;gap:12px;margin:12px 0 4px;font-size:13px}
.tom-driver-summary-line span{opacity:.6}
.tom-driver-actions--pickup .tom-driver-primary{grid-column:1/-1;min-height:54px;font-size:16px;font-weight:800}
.tom-driver-actions a.button{text-decoration:none}
.tom-driver-brief small{line-height:1.45}

/* v0.4.5 driver compact delivery card */
.tom-driver-customer h3{margin:14px 0 4px}
.tom-driver-customer p{margin:3px 0}
.tom-driver-brief{
  display:grid;
  gap:0;
  margin:8px 0 12px;
  border-top:1px solid #eee;
}
.tom-driver-item{
  padding:10px 0;
  border-bottom:1px solid #eee;
}
.tom-driver-item strong{
  font-size:15px;
  font-weight:700;
}
.tom-driver-details{
  margin:8px 0 12px;
  border:1px solid #e1e1e1;
  border-radius:10px;
  overflow:hidden;
  background:#fafafa;
}
.tom-driver-details > summary{
  padding:11px 12px;
  cursor:pointer;
  font-weight:800;
  list-style-position:inside;
}
.tom-driver-details[open] > summary{
  border-bottom:1px solid #e1e1e1;
  background:#f3f3f3;
}
.tom-driver-items{
  padding:4px 12px 12px;
}
.tom-driver-change-list{
  display:grid;
  gap:0;
}
.tom-driver-change-item{
  padding:10px 0;
  border-bottom:1px solid #eee;
}
.tom-driver-change-item:last-child{border-bottom:0}
.tom-driver-change-item > strong{
  display:block;
  margin-bottom:6px;
}
.tom-driver-change-item small{
  color:#777;
}
.tom-driver-changes{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.tom-driver-changes span{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  background:#fff1f1;
  color:#9b2c26;
  font-size:11px;
  font-weight:800;
}
.tom-driver-kitchen-details{
  margin-top:10px;
  border-top:1px solid #e5e5e5;
  padding-top:8px;
}
.tom-driver-kitchen-details summary{
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  color:#666;
}

/* v0.4.7 driver tabs and real connectivity */
.tom-driver-tabs{display:flex;gap:8px;margin:12px 0 16px;flex-wrap:wrap}
.tom-driver-tab{appearance:none;border:1px solid #ddd;background:#fff;border-radius:999px;padding:9px 13px;cursor:pointer;font:inherit;font-weight:700}
.tom-driver-tab.is-active{background:#111;border-color:#111;color:#fff}
.tom-driver-tab-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;margin-left:4px;border-radius:999px;background:#e33;color:#fff;font-size:11px}
.tom-driver-tab.is-active .tom-driver-tab-count{background:#fff;color:#111}
.tom-driver-network{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;background:#edfaef;color:#087a25}
.tom-driver-network.is-offline{background:#fff1f1;color:#a12622}

/* v0.4.8 */
.tom-driver-actions .tom-driver-delivered.tom-driver-primary{
  grid-column:1 / -1;
  min-height:54px;
  font-size:16px;
  font-weight:800;
}

/* v0.5.0 driver action hierarchy */
.tom-driver-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.tom-driver-primary-actions .tom-driver-primary{grid-column:1/-1;min-height:56px;font-size:16px;font-weight:900}
.tom-driver-primary-actions a.button{text-decoration:none;text-align:center}
.tom-driver-more{margin-top:10px;border:1px solid #e3e3e3;border-radius:10px;background:#fafafa}
.tom-driver-more>summary{padding:10px 12px;cursor:pointer;font-weight:800}
.tom-driver-more[open]>summary{border-bottom:1px solid #e3e3e3}
.tom-driver-more .tom-driver-actions,.tom-driver-more .tom-proof-label{margin:10px}
.tom-driver-tab-count--active{background:#16803a}
.tom-driver-modal{position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,.48);display:grid;place-items:center;padding:18px}
.tom-driver-modal[hidden]{display:none!important}
.tom-driver-modal-card{width:min(520px,100%);background:#fff;border-radius:16px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.25)}
.tom-driver-modal-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tom-driver-modal-head h3{margin:0}
.tom-driver-modal-close{border:0;background:transparent;font-size:28px;cursor:pointer}
.tom-failed-reasons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.tom-failed-reasons .button{min-height:44px}
.tom-failed-other{width:100%;margin-top:10px}
@media(max-width:520px){.tom-failed-reasons{grid-template-columns:1fr}}

/* v0.6.0 multi-drop driver routing */
.tom-driver-route-panel{
  margin:14px 0 18px;padding:14px;
  border:1px solid #dcdcde;border-radius:14px;background:#fff;
}
.tom-driver-route-panel[hidden]{display:none}
.tom-driver-route-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.tom-driver-route-head h3{margin:2px 0 4px;font-size:20px}
.tom-driver-route-head p{margin:0;color:#646970}
.tom-driver-route-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tom-driver-live-location.is-sharing{background:#edfaef!important;border-color:#b8dfc5!important;color:#17643a!important}
.tom-driver-route-list{display:grid;gap:7px;margin-top:13px}
.tom-driver-route-stop{
  display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;
  padding:9px 10px;border:1px solid #eee;border-radius:9px;background:#fafafa;
}
.tom-driver-route-stop div{display:grid;gap:2px}
.tom-driver-route-stop span{color:#646970}
.tom-driver-stop-number{
  display:grid!important;place-items:center;width:30px;height:30px;
  border-radius:50%;background:#111;color:#fff!important;font-weight:800;
}
.tom-driver-route-note{display:block;margin-top:10px;color:#646970}
.tom-driver-job{position:relative}
.tom-driver-stop-badge{
  position:absolute;right:12px;top:-9px;z-index:2;
  padding:4px 8px;border-radius:999px;background:#111;color:#fff;
  font-size:11px;font-weight:800;letter-spacing:.05em;
}

/* API-free approximate customer driver map */
.tom-driver-map-placeholder.is-live{padding:0;overflow:hidden;background:#fff}
.tom-live-map-head{display:flex;justify-content:space-between;gap:10px;padding:11px 12px;align-items:center}
.tom-live-map-frame{display:block;width:100%;height:240px;border:0;border-top:1px solid #eee;border-bottom:1px solid #eee}
.tom-live-map-note{display:block;padding:8px 12px;color:#646970}

@media(max-width:640px){
  .tom-driver-route-head{flex-direction:column}
  .tom-driver-route-actions{width:100%;justify-content:stretch}
  .tom-driver-route-actions .button{flex:1;text-align:center}
  .tom-driver-route-stop{grid-template-columns:34px 1fr}
  .tom-driver-route-stop>small{grid-column:2}
  .tom-live-map-frame{height:210px}
}

/* v0.6.1 live connection state */
.tom-track-live-state{display:inline-flex;align-items:center;gap:7px;float:right;margin:0 0 8px 10px;padding:5px 8px;border-radius:999px;font-size:11px;line-height:1}
.tom-track-live-state span{width:8px;height:8px;border-radius:50%;background:#a7aaad}
.tom-track-live-state.is-live{background:#edfaef;color:#17643a}
.tom-track-live-state.is-live span{background:#00a32a}
.tom-track-live-state.is-connecting{background:#f6f7f7;color:#50575e}
.tom-track-live-state.is-reconnecting{background:#fff7e5;color:#7a4700}
.tom-track-live-state.is-reconnecting span{background:#dba617}
.tom-driver-location-health{margin-top:9px;padding:8px 10px;border-radius:8px;background:#f6f7f7;color:#50575e;font-size:12px;font-weight:600}
.tom-driver-location-health.is-ok{background:#edfaef;color:#17643a}
.tom-driver-location-health.is-warning{background:#fff7e5;color:#7a4700}
.tom-driver-location-health.is-error{background:#fff0f0;color:#8a2424}

/* v0.6.2 inline live tracker diagnostics */
.tom-track-card::after{content:"";display:block;clear:both}
.tom-track-live-state{
  position:relative;
  z-index:2;
  display:inline-flex!important;
  align-items:center;
  gap:6px;
}
.tom-track-live-state.is-live strong{font-weight:800}


/* v0.6.9 active order-stage beacon
   Current non-final stage = subtle radial pulse.
   Delivered/final stage = solid dot, no animation. */
.tom-step--current .tom-step-dot{
  box-shadow:none;
}

.tom-step--current:not(:last-child) .tom-step-dot::before,
.tom-step--current:not(:last-child) .tom-step-dot::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:18px;
  border-radius:50%;
  border:1.5px solid currentColor;
  transform:translate(-50%,-50%) scale(1);
  opacity:.34;
  pointer-events:none;
  z-index:-1;
  animation:tom-stage-beacon 2.2s ease-out infinite;
}

.tom-step--current:not(:last-child) .tom-step-dot::after{
  animation-delay:1.1s;
}

@keyframes tom-stage-beacon{
  0%{
    transform:translate(-50%,-50%) scale(1);
    opacity:.34;
  }
  70%{
    opacity:.10;
  }
  100%{
    transform:translate(-50%,-50%) scale(2.15);
    opacity:0;
  }
}

/* Final Delivered state is deliberately calm and definitive. */
.tom-step--current:last-child .tom-step-dot{
  box-shadow:none;
}

.tom-step--current:last-child .tom-step-dot::before,
.tom-step--current:last-child .tom-step-dot::after{
  display:none;
}

@media (prefers-reduced-motion: reduce){
  .tom-step--current:not(:last-child) .tom-step-dot::before,
  .tom-step--current:not(:last-child) .tom-step-dot::after{
    animation:none;
    opacity:.16;
    transform:translate(-50%,-50%) scale(1.55);
  }
}

.tom-tip-prompt{margin-top:22px;padding:18px;border:1px solid #ddd;border-radius:12px;background:#fafafa}
.tom-tip-prompt>strong{display:block;font-size:18px;margin-bottom:4px}
.tom-tip-prompt p{margin:0 0 12px}
.tom-tip-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.tom-tip-buttons .button{cursor:pointer}
.tom-tip-prompt small{display:block;color:#666;line-height:1.4}

.tom-live-map-canvas{position:relative}
.tom-live-map-canvas .tom-live-map-frame{position:relative;z-index:1}
.tom-destination-marker{
  position:absolute;z-index:3;transform:translate(-50%,-100%);
  width:30px;height:30px;border-radius:50% 50% 50% 0;
  background:#111;color:#fff;border:2px solid #fff;
  box-shadow:0 2px 7px rgba(0,0,0,.28);
  display:grid;place-items:center;
  pointer-events:none;
}
.tom-destination-marker::after{
  content:"";position:absolute;inset:-7px;border:2px solid rgba(0,0,0,.16);
  border-radius:50%;transform:rotate(45deg);
}
.tom-destination-marker span{font-size:16px;line-height:1;transform:rotate(0deg)}


/* v0.7.2 proper Leaflet driver/destination map */
.tom-leaflet-map{
  width:100%;
  height:260px;
  border-top:1px solid #ddd;
  border-bottom:1px solid #ddd;
  z-index:1;
}
.tom-leaflet-driver,
.tom-leaflet-home{
  display:grid;
  place-items:center;
  box-sizing:border-box;
  font-weight:800;
  user-select:none;
}
.tom-leaflet-driver{
  width:34px;
  height:34px;
  border-radius:50%;
  border:3px solid #fff;
  box-shadow:0 2px 8px rgba(0,0,0,.34);
  background:#111;
  color:#fff;
}
.tom-leaflet-driver.is-approximate{
  background:#5f8f31;
}
.tom-leaflet-driver span{
  line-height:1;
  font-size:17px;
}
.tom-leaflet-home{
  width:34px;
  height:34px;
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  background:#111;
  color:#fff;
  border:2px solid #fff;
  box-shadow:0 2px 8px rgba(0,0,0,.3);
}
.tom-leaflet-home span{
  transform:rotate(45deg);
  font-size:18px;
  line-height:1;
}
.tom-map-unavailable{
  padding:18px;
  background:#f6f7f7;
  color:#50575e;
}
@media(max-width:640px){
  .tom-leaflet-map{height:230px}
}

/* v0.11.3 driver delivery note */
.tom-driver-note{
  margin:10px 0 2px;
  padding:10px 12px;
  border:1px solid #efcf8d;
  border-radius:9px;
  background:#fff3cd;
  color:#5f4600;
}
.tom-driver-note strong{
  display:block;
  margin-bottom:3px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
}
.tom-driver-note span{
  display:block;
  font-size:14px;
  line-height:1.35;
  font-weight:650;
}
