/* ===== FRESH SABJI HUB — DELIVERY DASHBOARD ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #FF6B35;
  --orange-dark: #E55A25;
  --orange-glow: rgba(255,107,53,0.25);
  --cyan: #00E5FF;
  --cyan-dark: #00B8D4;
  --cyan-glow: rgba(0,229,255,0.2);
  --green: #00C853;
  --green-glow: rgba(0,200,83,0.2);
  --bg: #0E1621;
  --bg-card: #141E2E;
  --bg-card2: #1A2640;
  --border: rgba(255,255,255,0.08);
  --text-white: rgba(255,255,255,0.95);
  --text-mid: rgba(255,255,255,0.6);
  --text-dim: rgba(255,255,255,0.35);
  --shadow-orange: 0 4px 20px rgba(255,107,53,0.3);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 22px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Bricolage Grotesque', sans-serif;
}

body {
  background: #060D18;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: var(--font-main);
}

/* Phone Shell */
.phone-shell {
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 48px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 10px #0a0a0a, 0 0 0 12px #1a1a1a;
  overflow: hidden;
}

.app-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}
.app-screen::-webkit-scrollbar { display: none; }

/* Status Bar */
.status-bar {
  background: #0A1220;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 8px;
  flex-shrink: 0;
}
.time { color: white; font-size: 13px; font-weight: 700; }
.status-icons { display: flex; gap: 6px; align-items: center; }

/* Header */
.delivery-header {
  background: linear-gradient(180deg, #0A1220 0%, #0E1621 100%);
  padding: 14px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.rider-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,200,83,0.12);
  border: 1px solid rgba(0,200,83,0.25);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.rider-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.header-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
}
.header-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 2px;
}
.rider-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.rider-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--orange);
  object-fit: cover;
}
.online-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: ring-pulse 2s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.05); }
}

/* Stats Strip */
.stats-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 12px 20px;
  flex-shrink: 0;
}
.strip-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.strip-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}
.strip-val.active-val { color: var(--orange); }
.strip-lbl {
  font-size: 9.5px;
  color: var(--text-dim);
  font-weight: 600;
}
.strip-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Active Order */
.active-order-section {
  padding: 14px 20px 8px;
  flex-shrink: 0;
}
.active-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
  box-shadow: 0 0 8px var(--orange);
}
.active-order-card {
  background: var(--bg-card2);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 4px 20px rgba(255,107,53,0.1);
}
.order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.order-id-wrap { display: flex; align-items: center; gap: 8px; }
.order-id {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}
.order-time-badge {
  background: rgba(0,229,255,0.12);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(0,229,255,0.2);
}
.order-priority {
  font-size: 10.5px;
  font-weight: 700;
  color: #FFB300;
  background: rgba(255,179,0,0.1);
  padding: 2px 8px;
  border-radius: 20px;
}
.customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cust-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cyan-dark), #0097A7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.cust-info { flex: 1; }
.cust-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
}
.cust-addr {
  display: block;
  font-size: 10.5px;
  color: var(--text-mid);
  margin-top: 2px;
}
.call-btn {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green), #00A843);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,200,83,0.3);
  flex-shrink: 0;
}
.order-items-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.item-chip {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Map Section */
.map-section {
  padding: 8px 20px 12px;
  flex-shrink: 0;
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.map-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-white);
}
.map-dist {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0,229,255,0.1);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0,229,255,0.2);
}
.map-widget {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0,229,255,0.15);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.map-bg {
  background: #1A2535;
  height: 180px;
  position: relative;
  overflow: hidden;
}
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}
.road {
  position: absolute;
  background: rgba(255,255,255,0.07);
}
.road-h { left: 0; right: 0; height: 8px; transform: translateY(-50%); }
.road-v { top: 0; bottom: 0; width: 8px; transform: translateX(-50%); }
.main-road { background: rgba(255,255,255,0.12); }
.road-h.main-road { height: 12px; }
.road-v.main-road { width: 12px; }
.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.map-marker.pickup { bottom: 18%; left: 14%; }
.map-marker.dest { top: 12%; left: 52%; }
.marker-pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
}
.orange-pin { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.blue-pin { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.marker-label {
  font-size: 8px;
  font-weight: 700;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 1px 5px;
  border-radius: 4px;
}
.map-controls {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-ctrl {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.eta-chip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
}
.map-actions {
  background: var(--bg-card2);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.map-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: transform 0.15s;
}
.map-action-btn:active { transform: scale(0.97); }
.navigate-btn {
  background: rgba(0,229,255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.25);
}
.arrived-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  box-shadow: var(--shadow-orange);
}

/* Tabs */
.tabs-row {
  display: flex;
  padding: 0 20px;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font-main);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* History List */
.tab-content { flex-shrink: 0; }
.history-list {
  padding: 10px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s;
}
.history-item:hover { border-color: rgba(255,107,53,0.2); }
.hist-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,107,53,0.1);
  border-radius: 10px;
  padding: 6px 10px;
  flex-shrink: 0;
}
.hist-day {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.hist-month {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hist-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hist-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
}
.hist-addr {
  font-size: 10.5px;
  color: var(--text-mid);
}
.hist-tags {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}
.hist-tag {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.hist-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hist-status.done {
  background: rgba(0,200,83,0.12);
  border: 1px solid rgba(0,200,83,0.25);
}

/* Bottom Nav */
.bottom-nav {
  background: #0A1220;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 8px 22px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  margin-top: auto;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 14px;
  border-radius: 12px;
}
.nav-item span {
  font-size: 10px;
  font-weight: 600;
  color: #546E7A;
}
.nav-item.active span { color: var(--orange); }