:root{
  --rr-bg:#07111f;
  --rr-bg-2:#0c1728;
  --rr-card:#0f1d33;
  --rr-border:rgba(255,255,255,.09);
  --rr-text:#eef4ff;
  --rr-muted:#9db0d1;
  --rr-accent:#d7af5a;
  --rr-blue:#3b82f6;
  --rr-green:#22c55e;
  --rr-orange:#f59e0b;
  --rr-red:#ef4444;
  --rr-shadow:0 18px 50px rgba(0,0,0,.28);
}

body .rr-driver-shell,
.rr-driver-shell *{box-sizing:border-box}

.rr-driver-shell{
  width:100%;
  max-width:none;
  min-height:100vh;
  padding:20px;
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:20px;
  background:linear-gradient(180deg,#08111d 0%,#020915 100%);
  color:var(--rr-text);
  border-radius:0;
}

.rr-driver-sidebar{
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  border:1px solid var(--rr-border);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--rr-shadow);
  position:sticky;
  top:20px;
  height:fit-content;
}

.rr-driver-profile-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  margin-bottom:16px;
}

.rr-driver-avatar{
  width:64px;
  height:64px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,.14);
  flex:0 0 64px;
}

.rr-driver-profile-meta{
  min-width:0;
}

.rr-driver-profile-meta h3{
  margin:0 0 5px;
  font-size:17px;
  line-height:1.2;
  word-break:break-word;
}

.rr-driver-profile-meta p{
  margin:0;
  color:var(--rr-muted);
  font-size:12.5px;
  line-height:1.5;
  word-break:break-word;
}

.rr-driver-nav{
  display:grid;
  gap:10px;
  margin-bottom:16px;
}

.rr-driver-nav a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:0 16px;
  border-radius:999px;
  background:#0b1a30;
  border:1px solid rgba(125,158,212,.22);
  color:var(--rr-text);
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  transition:.2s ease;
}

.rr-driver-nav a:hover,
.rr-driver-nav a.is-active{
  background:var(--rr-accent);
  color:#111827;
  border-color:transparent;
  transform:translateY(-1px);
}

.rr-driver-sidebar-box{
  display:grid;
  gap:6px;
  padding:16px;
  border-radius:18px;
  background:#0b1a30;
  border:1px solid rgba(255,255,255,.06);
}

.rr-label,
.rr-kicker,
.rr-stat-label{
  display:block;
  color:var(--rr-muted);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:10px;
}

.rr-driver-main{
  min-width:0;
  display:grid;
  gap:18px;
}

.rr-driver-hero,
.rr-panel,
.rr-stat-card{
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.02));
  border:1px solid var(--rr-border);
  border-radius:22px;
  box-shadow:var(--rr-shadow);
}

.rr-driver-hero{
  padding:22px 24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

.rr-driver-hero h1{
  margin:8px 0 8px;
  font-size:28px;
  line-height:1.08;
}

.rr-driver-hero p{
  margin:0;
  color:var(--rr-muted);
  max-width:760px;
  font-size:14px;
  line-height:1.55;
}

.rr-driver-hero-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.rr-live-toggle-wrap{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:8px 14px 8px 10px;
  border-radius:999px;
  background:#0b1a30;
  border:1px solid rgba(255,255,255,.08);
  cursor:pointer;
  user-select:none;
}

.rr-live-toggle-wrap input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.rr-live-toggle-slider{
  position:relative;
  width:54px;
  height:28px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.08);
  transition:.25s ease;
  flex:0 0 auto;
}

.rr-live-toggle-slider::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#ffffff;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  transition:.25s ease;
}

.rr-live-toggle-wrap input:checked + .rr-live-toggle-slider{
  background:rgba(34,197,94,.28);
  border-color:rgba(34,197,94,.45);
}

.rr-live-toggle-wrap input:checked + .rr-live-toggle-slider::after{
  transform:translateX(26px);
  background:#dcfce7;
}

.rr-live-toggle-wrap input:focus + .rr-live-toggle-slider{
  box-shadow:0 0 0 3px rgba(59,130,246,.18);
}

.rr-live-toggle-wrap input:disabled + .rr-live-toggle-slider{
  opacity:.6;
}

.rr-live-toggle-text{
  font-size:13px;
  font-weight:700;
  color:var(--rr-text);
  letter-spacing:.02em;
}

.rr-driver-live-status{
  margin-top:-4px;
  padding:13px 16px;
  border-radius:16px;
  background:rgba(11,26,48,.9);
  border:1px solid rgba(255,255,255,.08);
  color:var(--rr-muted);
  font-size:13px;
  line-height:1.5;
}

.rr-btn{
  border:0;
  border-radius:14px;
  padding:11px 16px;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
}

.rr-btn-secondary{
  background:var(--rr-accent);
  color:#111827;
}

.rr-driver-stats-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
}

.rr-stat-card{
  padding:16px;
  min-width:0;
}

.rr-stat-card strong{
  display:block;
  margin-top:8px;
  font-size:24px;
  line-height:1;
}

.rr-stat-card.is-good strong{color:var(--rr-green)}
.rr-stat-card.is-warn strong{color:var(--rr-orange)}
.rr-stat-card.is-danger strong{color:var(--rr-red)}

/* IMPORTANT: content area becomes one column */
.rr-driver-content-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  align-items:start;
}

.rr-panel{
  padding:18px;
}

.rr-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.rr-panel-head h2{
  margin:6px 0 0;
  font-size:18px;
  line-height:1.2;
}

/* YOUR DAY ON ONE LINE */
.rr-route-summary,
.rr-routes-list{
  display:grid;
  gap:14px;
}

.rr-summary-card,
.rr-route-card{
  border:1px solid rgba(255,255,255,.06);
  border-radius:20px;
  background:#0b1628;
  padding:16px;
}

.rr-summary-card{
  width:100%;
}

.rr-summary-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:14px;
}

.rr-summary-head h3,
.rr-route-card-head h3,
.rr-stop-card h4{
  margin:0;
}

.rr-summary-head h3{
  font-size:18px;
  line-height:1.2;
}

.rr-route-card-head h3{
  font-size:16px;
  line-height:1.2;
}

.rr-stop-card h4{
  font-size:15px;
  line-height:1.25;
  word-break:break-word;
}

.rr-summary-head span,
.rr-route-card-head p,
.rr-stop-address,
.rr-stop-meta,
.rr-stop-muted{
  color:var(--rr-muted);
}

.rr-summary-head span,
.rr-route-card-head p{
  font-size:13px;
  line-height:1.45;
}

/* one line horizontal stats under Your day */
.rr-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.rr-summary-grid div{
  background:#0f1d33;
  border:1px solid rgba(255,255,255,.05);
  border-radius:16px;
  padding:14px 12px;
  min-width:0;
  min-height:84px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.rr-summary-grid strong{
  display:block;
  font-size:22px;
  line-height:1;
  margin-bottom:6px;
}

.rr-summary-grid span{
  display:block;
  font-size:13px;
  line-height:1.35;
  color:var(--rr-text);
  word-break:break-word;
}

/* FULL WIDTH MAP */
.rr-driver-map{
  width:100%;
  min-height:640px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:#09131f;
  overflow:hidden;
}

.rr-map-fallback{
  min-height:640px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  text-align:center;
  color:var(--rr-muted);
}

.rr-map-legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:center;
  color:var(--rr-muted);
  font-size:12px;
}

.rr-legend-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  margin-right:5px;
}

.rr-legend-dot.is-pending{background:var(--rr-blue)}
.rr-legend-dot.is-collected{background:var(--rr-green)}
.rr-legend-dot.is-postponed{background:var(--rr-orange)}
.rr-legend-dot.is-failed{background:var(--rr-red)}

.rr-map-note{
  margin:10px 4px 0;
  color:var(--rr-muted);
  font-size:12px;
}

.rr-route-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:16px;
}

.rr-route-badge{
  padding:8px 11px;
  border-radius:999px;
  background:rgba(215,175,90,.12);
  border:1px solid rgba(215,175,90,.35);
  color:#f5d38d;
  font-size:12px;
  white-space:nowrap;
}

.rr-stops-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.rr-stop-card{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.06);
  background:#0f1d33;
  display:grid;
  gap:10px;
  transition:.2s ease;
  min-width:0;
}

.rr-stop-card.is-loading{opacity:.65; pointer-events:none}

.rr-stop-card.is-pending{box-shadow:inset 0 0 0 1px rgba(59,130,246,.18)}
.rr-stop-card.is-collected{box-shadow:inset 0 0 0 1px rgba(34,197,94,.18)}
.rr-stop-card.is-postponed{box-shadow:inset 0 0 0 1px rgba(245,158,11,.18)}
.rr-stop-card.is-failed{box-shadow:inset 0 0 0 1px rgba(239,68,68,.18)}

.rr-stop-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.rr-stop-address{
  font-size:13px;
  line-height:1.5;
  word-break:break-word;
}

.rr-status-pill{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  border:1px solid transparent;
  white-space:nowrap;
}

.rr-status-pill.is-pending{background:rgba(59,130,246,.12); color:#93c5fd; border-color:rgba(59,130,246,.34)}
.rr-status-pill.is-collected{background:rgba(34,197,94,.12); color:#86efac; border-color:rgba(34,197,94,.34)}
.rr-status-pill.is-postponed{background:rgba(245,158,11,.12); color:#fcd34d; border-color:rgba(245,158,11,.34)}
.rr-status-pill.is-failed{background:rgba(239,68,68,.12); color:#fda4af; border-color:rgba(239,68,68,.34)}

.rr-stop-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  font-size:13px;
  line-height:1.45;
}

.rr-stop-link{
  color:#cfe1ff;
  text-decoration:none;
}

.rr-stop-link:hover{
  text-decoration:underline;
}

.rr-stop-notes{
  padding:11px 13px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  color:#dfe8f8;
  font-size:13px;
  line-height:1.5;
}

.rr-stop-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.rr-status-btn{
  min-height:40px;
  padding:0 13px;
  border-radius:12px;
  border:1px solid transparent;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.rr-status-btn.is-collected{background:#0d2f1c; color:#a7f3d0; border-color:rgba(34,197,94,.35)}
.rr-status-btn.is-postponed{background:#312108; color:#fde68a; border-color:rgba(245,158,11,.35)}
.rr-status-btn.is-failed{background:#341117; color:#fecdd3; border-color:rgba(239,68,68,.35)}
.rr-map-btn{background:#13243c; color:#dbeafe; border-color:rgba(59,130,246,.35)}

.rr-empty,
.rr-driver-guard{
  padding:24px;
  border-radius:18px;
  background:#0f1d33;
  border:1px solid rgba(255,255,255,.06);
  color:var(--rr-muted);
  font-size:14px;
  line-height:1.5;
}

@media (max-width: 1500px){
  .rr-driver-shell{
    grid-template-columns:280px minmax(0,1fr);
  }

  .rr-driver-map,
  .rr-map-fallback{
    min-height:600px;
  }
}

@media (max-width: 1400px){
  .rr-driver-stats-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .rr-summary-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .rr-driver-map,
  .rr-map-fallback{
    min-height:580px;
  }
}

@media (max-width: 1080px){
  .rr-driver-shell{
    grid-template-columns:1fr;
    padding:16px;
  }

  .rr-driver-sidebar{
    position:static;
  }

  .rr-stops-grid{
    grid-template-columns:1fr;
  }

  .rr-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .rr-driver-map,
  .rr-map-fallback{
    min-height:500px;
  }
}

@media (max-width: 640px){
  .rr-driver-hero{
    padding:18px;
    flex-direction:column;
    align-items:flex-start;
  }

  .rr-driver-hero h1{
    font-size:24px;
  }

  .rr-driver-hero p{
    font-size:13px;
  }

  .rr-driver-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .rr-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .rr-route-card-head,
  .rr-summary-head,
  .rr-stop-top,
  .rr-panel-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .rr-driver-hero-actions{
    width:100%;
    justify-content:flex-start;
  }

  .rr-driver-map,
  .rr-map-fallback{
    min-height:420px;
  }
}

.rr-map-popup{
  min-width:220px;
  max-width:280px;
  padding:6px 2px;
  color:#111827;
  font-size:13px;
  line-height:1.45;
}

.rr-map-popup strong{
  display:block;
  margin-bottom:4px;
  color:#111827;
  font-size:14px;
}

.rr-map-popup .rr-map-popup-address{
  color:#374151;
  margin-bottom:4px;
}

.rr-map-popup .rr-map-popup-status{
  color:#111827;
  font-weight:600;
}

.rr-map-popup .rr-map-popup-phone{
  margin-top:4px;
  color:#1f2937;
}

.rr-map-popup .rr-map-popup-notes{
  margin-top:6px;
  color:#4b5563;
}

.rr-map-popup .rr-map-popup-link{
  display:inline-block;
  margin-top:8px;
  color:#2563eb;
  text-decoration:none;
  font-weight:600;
}

.rr-map-popup .rr-map-popup-link:hover{
  text-decoration:underline;
}
/* Fuel / Alimentare module */
.rr-fuel-panel{scroll-margin-top:24px}
.rr-fuel-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.8fr);gap:16px}
.rr-fuel-card{padding:18px;border-radius:18px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07)}
.rr-fuel-intro{margin:0 0 14px;color:var(--rr-muted);line-height:1.55}
.rr-fuel-form{display:grid;gap:14px}
.rr-fuel-location-box{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px;border-radius:16px;background:#0b1a30;border:1px dashed rgba(215,175,90,.45)}
.rr-fuel-location-box strong{display:block;margin-bottom:4px;color:var(--rr-text)}
.rr-fuel-location-box span{display:block;color:var(--rr-muted);font-size:13px;line-height:1.45;word-break:break-word}
.rr-fuel-location-box.is-saved{border-style:solid;border-color:rgba(34,197,94,.55);background:rgba(34,197,94,.08)}
.rr-fuel-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rr-fuel-fields label{display:grid;gap:6px;color:var(--rr-muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.rr-fuel-fields input,.rr-fuel-fields textarea{width:100%;border:1px solid rgba(255,255,255,.11);border-radius:12px;background:#081426;color:var(--rr-text);padding:11px 12px;font:inherit;text-transform:none;letter-spacing:0}
.rr-fuel-fields input[type=file]{padding:9px;background:#0b1a30}
.rr-fuel-fields textarea{resize:vertical;min-height:76px;grid-column:auto}
.rr-fuel-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.rr-btn-primary{background:linear-gradient(135deg,#d7af5a,#f5d37d);color:#111827;border-color:transparent}
.rr-fuel-status{color:var(--rr-muted);font-size:13px;line-height:1.45}
.rr-fuel-status.is-success{color:#86efac}.rr-fuel-status.is-error{color:#fca5a5}.rr-fuel-status.is-info{color:#bfdbfe}
.rr-fuel-rules h3{margin:0 0 10px}.rr-fuel-rules ul{margin:0;padding-left:18px;color:var(--rr-muted);line-height:1.65}.rr-fuel-rules strong{color:var(--rr-text)}
@media (max-width:900px){.rr-fuel-grid{grid-template-columns:1fr}.rr-fuel-fields{grid-template-columns:1fr}.rr-fuel-location-box{align-items:flex-start;flex-direction:column}.rr-fuel-location-box .rr-btn{width:100%}}

/* Driver dashboard tab mode */
.rr-dashboard-tab{display:none;}
.rr-dashboard-tab.is-active{display:block;}
.rr-dashboard-tab[data-rr-tab="dashboard"].is-active{display:grid;gap:18px;}
.rr-fuel-panel.rr-dashboard-tab.is-active{display:block;}

/* Fuel live camera + history */
.rr-fuel-camera-field{display:grid;gap:8px;color:var(--rr-muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em;grid-column:1 / -1;}
.rr-fuel-camera-box{position:relative;min-height:220px;border:1px solid rgba(255,255,255,.11);border-radius:16px;background:#06101f;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.rr-fuel-camera-box video,.rr-fuel-camera-box img{width:100%;height:100%;min-height:220px;object-fit:cover;display:none;}
.rr-fuel-camera-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--rr-muted);padding:18px;text-align:center;background:rgba(0,0,0,.18);}
.rr-fuel-camera-actions{display:flex;gap:10px;flex-wrap:wrap;}
.rr-fuel-camera-field small{color:var(--rr-muted);text-transform:none;letter-spacing:0;font-size:13px;}
.rr-fuel-history-wrap{margin-top:16px;padding:18px;border-radius:18px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.07);}
.rr-fuel-history{display:grid;gap:10px;}
.rr-fuel-history-item{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:#0b1a30;border:1px solid rgba(255,255,255,.06);}
.rr-fuel-history-item strong,.rr-fuel-history-item span,.rr-fuel-history-item small{display:block;}
.rr-fuel-history-item strong{color:var(--rr-text);font-size:14px;}
.rr-fuel-history-item span{color:#d7af5a;font-size:13px;margin-top:3px;}
.rr-fuel-history-item small{color:var(--rr-muted);font-size:12px;margin-top:3px;}
.rr-fuel-history-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.rr-fuel-history-actions a{color:#bfdbfe;text-decoration:none;font-weight:700;font-size:13px;}
.rr-fuel-history-actions a:hover{text-decoration:underline;}
@media (max-width:700px){.rr-fuel-history-item{align-items:flex-start;flex-direction:column}.rr-fuel-history-actions{justify-content:flex-start}.rr-fuel-camera-actions .rr-btn{width:100%;}}

/* Collection proof / trip time */
.rr-stop-proof{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(22,163,74,.08);
  border:1px solid rgba(22,163,74,.18);
  color:#14532d;
  font-size:12px;
  font-weight:700;
  line-height:1.45;
}


/* SmartCollect driver dashboard simplified tablet UI patch */
body:has(.rr-driver-shell) .site-content,
body:has(.rr-driver-shell) .content-area,
body:has(.rr-driver-shell) .entry-content,
body:has(.rr-driver-shell) .wp-site-blocks,
body:has(.rr-driver-shell) main{
  max-width:none!important;
}
.rr-driver-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
.rr-driver-main{min-width:0!important;}
.rr-driver-nav{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.rr-driver-nav a{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.rr-driver-nav a[href*="logout"],.rr-driver-nav a:last-child{
  background:rgba(127,29,29,.30);
  border-color:rgba(248,113,113,.28);
  color:#fecaca;
}
.rr-stops-grid{align-items:start;}
.rr-stop-card{overflow:hidden;}
.rr-stop-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
.rr-status-btn{min-height:44px;}
.rr-stop-proof{margin:10px 0;padding:10px;border-radius:12px;background:rgba(34,197,94,.10);border:1px solid rgba(34,197,94,.20);font-size:12px;color:#bbf7d0;line-height:1.5;}
.rr-driver-mini-report{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-top:14px;}
.rr-driver-mini-report>div{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:14px;}
.rr-driver-mini-report strong{display:block;font-size:22px;color:#fff;}
.rr-driver-mini-report span{display:block;color:#9fb0ca;font-size:12px;margin-top:3px;}
.rr-history-panel h3{margin-top:20px;color:#fff;}
.rr-collection-timeline{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.rr-timeline-row{display:flex;justify-content:space-between;gap:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:13px;}
.rr-timeline-row strong,.rr-timeline-row span,.rr-timeline-row small{display:block;}
.rr-timeline-row small{color:#9fb0ca;margin-top:4px;}
.rr-timeline-row a{color:#facc15;font-weight:800;margin-left:8px;}
.rr-timeline-badge{display:inline-flex;border-radius:999px;background:rgba(34,197,94,.15);color:#86efac;padding:5px 8px;font-size:12px;font-weight:800;margin:2px;}
.rr-timeline-badge.is-time{background:rgba(59,130,246,.15);color:#93c5fd;}
.rr-stage-actions,.rr-stage-timeline,.rr-premium-status-panel{display:none!important;}
@media (min-width:1200px){
  .rr-driver-shell{grid-template-columns:340px minmax(0,1fr)!important;gap:24px!important;padding:24px!important;}
  .rr-driver-map,.rr-map-fallback{min-height:620px;}
  .rr-stops-grid{grid-template-columns:repeat(2,minmax(280px,1fr));}
}
@media (max-width:1199px){
  .rr-driver-shell{grid-template-columns:1fr!important;padding:16px!important;}
  .rr-driver-sidebar{position:relative!important;top:auto!important;}
  .rr-driver-nav{grid-template-columns:repeat(3,minmax(0,1fr));}
  .rr-driver-nav a{justify-content:center;text-align:center;}
  .rr-stops-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:820px){
  .rr-driver-nav{grid-template-columns:repeat(2,minmax(0,1fr));}
  .rr-driver-stats-grid,.rr-driver-mini-report,.rr-collection-timeline{grid-template-columns:repeat(2,minmax(0,1fr));}
  .rr-stops-grid{grid-template-columns:1fr;}
  .rr-driver-map,.rr-map-fallback{min-height:520px;}
}

/* SmartCollect Clock In / Out */
.rr-clock-panel{margin:18px 0;}
.rr-clock-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end;}
.rr-clock-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px;}
.rr-clock-status-box{border:1px solid rgba(255,255,255,.10);background:rgba(4,12,24,.38);border-radius:18px;padding:16px;min-height:92px;}
.rr-clock-status-box span{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:11px;color:#9db0d1;font-weight:800;margin-bottom:8px;}
.rr-clock-status-box strong{display:block;font-size:24px;line-height:1.15;color:#fff;font-weight:900;}
.rr-clock-status-box small{display:block;color:#9db0d1;margin-top:7px;line-height:1.35;}
.rr-clock-status-box a{color:#f0c75e;font-weight:800;text-decoration:none;}
.rr-clock-history{margin-top:14px;display:grid;gap:8px;}
.rr-clock-row{display:grid;grid-template-columns:110px 1fr auto;gap:10px;align-items:center;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);border-radius:14px;padding:10px 12px;color:#dbeafe;}
.rr-clock-row strong{color:#f0c75e;}
.rr-clock-row span{color:#cbd5e1;}
.rr-clock-row em{font-style:normal;font-weight:900;color:#fff;}
.rr-clock-empty{border:1px dashed rgba(255,255,255,.16);border-radius:14px;padding:12px;color:#9db0d1;background:rgba(255,255,255,.03);}
@media (max-width: 980px){.rr-clock-grid{grid-template-columns:1fr}.rr-clock-row{grid-template-columns:1fr}.rr-clock-actions{justify-content:flex-start}}

/* Offline mode / sync queue */
.rr-offline-sync-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
  padding:12px 16px;
  border-radius:18px;
  border:1px solid rgba(34,197,94,.28);
  background:rgba(16,185,129,.12);
  color:#d1fae5;
  font-weight:800;
  box-shadow:0 16px 40px rgba(0,0,0,.16);
}
.rr-offline-sync-bar.is-offline{
  border-color:rgba(245,158,11,.4);
  background:rgba(245,158,11,.16);
  color:#fff7ed;
}
.rr-offline-sync-bar.has-queue:not(.is-offline){
  border-color:rgba(59,130,246,.35);
  background:rgba(59,130,246,.14);
  color:#dbeafe;
}
.rr-offline-sync-bar button{
  border:0;
  border-radius:999px;
  padding:9px 15px;
  background:#d7af5a;
  color:#0b1220;
  font-weight:900;
  cursor:pointer;
}
.rr-offline-sync-bar button:hover{filter:brightness(1.05)}

/* Driver notifications / APK prep */
.rr-notification-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;font-weight:900;margin-left:auto;}
.rr-notifications-list{display:grid;gap:12px;margin-top:14px;}
.rr-notification-item{border:1px solid rgba(148,163,184,.25);background:rgba(15,23,42,.55);border-radius:16px;padding:14px;box-shadow:0 12px 28px rgba(15,23,42,.12);}
.rr-notification-item.is-unread{border-color:rgba(59,130,246,.65);box-shadow:0 0 0 2px rgba(59,130,246,.08);}
.rr-notification-item.is-important{border-color:rgba(245,158,11,.75);}
.rr-notification-item.is-urgent{border-color:rgba(239,68,68,.8);background:rgba(127,29,29,.18);}
.rr-notification-item>div{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;}
.rr-notification-item strong{font-size:15px;color:#fff;}
.rr-notification-item span{font-size:12px;color:#9ca3af;white-space:nowrap;}
.rr-notification-item p{margin:9px 0;color:#dbeafe;line-height:1.5;}
.rr-notification-item footer{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:12px;color:#93c5fd;}
.rr-notification-item footer em{text-transform:uppercase;font-style:normal;font-weight:800;letter-spacing:.04em;}
.rr-error{color:#fecaca;}


/* Driver in-dashboard slide notifications for APK/WebView */
.rr-driver-notification-toast-root{
  position:fixed;
  z-index:999999;
  top:18px;
  left:50%;
  transform:translateX(-50%);
  width:min(720px, calc(100vw - 28px));
  pointer-events:none;
  display:grid;
  gap:10px;
}
.rr-driver-notification-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:48px 1fr 36px;
  gap:14px;
  align-items:center;
  padding:14px 14px 14px 16px;
  border-radius:20px;
  background:linear-gradient(135deg, rgba(15,23,42,.98), rgba(30,41,59,.98));
  border:1px solid rgba(96,165,250,.38);
  box-shadow:0 24px 70px rgba(0,0,0,.36), 0 0 0 1px rgba(255,255,255,.05) inset;
  color:#fff;
  animation:rrDriverToastIn .34s cubic-bezier(.2,.85,.25,1.15) both;
}
.rr-driver-notification-toast.is-important{
  border-color:rgba(245,158,11,.75);
  background:linear-gradient(135deg, rgba(69,44,11,.98), rgba(15,23,42,.98));
}
.rr-driver-notification-toast.is-urgent{
  border-color:rgba(248,113,113,.8);
  background:linear-gradient(135deg, rgba(91,12,12,.98), rgba(15,23,42,.98));
}
.rr-driver-notification-toast.is-leaving{animation:rrDriverToastOut .28s ease both;}
.rr-driver-notification-toast-icon{
  width:48px;height:48px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:22px;
  background:rgba(59,130,246,.18);
  color:#bfdbfe;
}
.rr-driver-notification-toast.is-important .rr-driver-notification-toast-icon{background:rgba(245,158,11,.22);color:#fde68a;}
.rr-driver-notification-toast.is-urgent .rr-driver-notification-toast-icon{background:rgba(239,68,68,.24);color:#fecaca;}
.rr-driver-notification-toast-body strong{display:block;font-size:17px;line-height:1.2;margin-bottom:4px;}
.rr-driver-notification-toast-body p{margin:0;color:#e5e7eb;font-size:15px;line-height:1.35;}
.rr-driver-notification-toast-body small{display:block;margin-top:5px;color:#9ca3af;font-weight:700;}
.rr-driver-notification-toast-close{
  border:0;background:rgba(255,255,255,.09);color:#fff;border-radius:12px;
  width:34px;height:34px;font-size:22px;line-height:1;cursor:pointer;
}
@keyframes rrDriverToastIn{from{opacity:0;transform:translateY(-36px) scale(.97);}to{opacity:1;transform:translateY(0) scale(1);}}
@keyframes rrDriverToastOut{from{opacity:1;transform:translateY(0) scale(1);}to{opacity:0;transform:translateY(-28px) scale(.98);}}
@media (max-width: 700px){
  .rr-driver-notification-toast-root{top:10px;width:calc(100vw - 16px);}
  .rr-driver-notification-toast{grid-template-columns:40px 1fr 32px;padding:12px;border-radius:16px;}
  .rr-driver-notification-toast-icon{width:40px;height:40px;border-radius:13px;}
  .rr-driver-notification-toast-body strong{font-size:15px;}
  .rr-driver-notification-toast-body p{font-size:13px;}
}
