.drv-riwayat-wrap {
  padding: 20px 16px 8px;
}

.drv-riwayat-header {
  margin-bottom: 18px;
}
.drv-riwayat-header h1 {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 21px;
  margin-bottom: 2px;
}
.drv-riwayat-header p {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.drv-riwayat-tabs {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: rgba(149, 157, 165, 0.15) 0px 6px 16px;
}
.drv-riwayat-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 9px 6px;
  border-radius: 9px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.drv-riwayat-tab.active {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
}

.drv-riwayat-panel { display: none; }
.drv-riwayat-panel.active { display: block; }
.drv-summary-box {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: rgba(149, 157, 165, 0.15) 0px 6px 16px;
}
.drv-summary-label {
  font-size: 11.5px;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 4px;
}
.drv-summary-value {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--orange-deep);
}

.drv-empty-block {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink-soft);
}
.drv-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto 12px;
}
.drv-empty-block p {
  font-size: 13px;
}

/* ---------- Detail order aktif (map + timeline) ---------- */
.drv-detail-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: rgba(149, 157, 165, 0.15) 0px 6px 16px;
}
.drv-detail-header {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  padding: 18px;
}
.drv-detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.drv-detail-id {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.drv-detail-badge {
  background: rgba(255,255,255,0.9);
  color: var(--orange-deep);
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 999px;
}
.drv-detail-items { font-size: 13.5px; margin-bottom: 10px; }
.drv-detail-notes {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.4;
}
.drv-detail-notes i {
  margin-top: 1px;
  font-size: 12px;
  opacity: 0.9;
}

.drv-detail-customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.drv-detail-customer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.drv-detail-customer-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.drv-detail-customer-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.drv-detail-customer-avatar-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}

.drv-photo-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.drv-photo-lightbox-overlay[hidden] { display: none; }
.drv-photo-lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
}
.drv-photo-lightbox-name {
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-top: 14px;
}
.drv-photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.drv-chat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 7px 13px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}
.drv-chat-btn i { font-size: 12px; }
.drv-chat-btn:active { transform: scale(0.97); }
.drv-detail-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}
.drv-detail-total-amount {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 19px;
}
.drv-detail-breakdown { font-size: 12px; color: rgba(255,255,255,0.85); }

.drv-detail-map-wrap { position: relative; }
.drv-detail-map { height: 180px; width: 100%; }
.drv-maps-link {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: rgba(0,0,0,0.15) 0px 2px 8px;
  z-index: 400;
}

.drv-timeline { padding: 16px 18px 18px; }
.drv-timeline-step { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.drv-timeline-step:last-child { padding-bottom: 0; }
.drv-timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -4px;
  width: 2px;
  background: #E7E1D8;
}
.drv-timeline-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: #C9C2B6;
  z-index: 1;
}
.drv-timeline-done .drv-timeline-marker { background: #2F7A4F; }
.drv-timeline-active .drv-timeline-marker { background: var(--orange-deep); }

.drv-timeline-body { flex: 1; padding-top: 2px; }
.drv-timeline-title-row { display: flex; align-items: center; justify-content: space-between; }
.drv-timeline-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.drv-timeline-upcoming .drv-timeline-title { color: var(--ink-soft); }
.drv-timeline-time { font-size: 11.5px; color: var(--ink-soft); }
.drv-timeline-desc { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.drv-timeline-btn {
  margin-top: 8px;
  border: 1.5px solid var(--orange-deep);
  background: #fff;
  color: var(--orange-deep);
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}

.drv-timeline-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.drv-timeline-actions .drv-timeline-btn { margin-top: 0; }
.drv-timeline-cancel-btn {
  border: 1.5px solid var(--red);
  background: #fff;
  color: var(--red);
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}
