/* ───── Order Detail Modal ───── */
.od-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: odFade 0.2s ease;
}
@keyframes odFade { from { opacity: 0; } to { opacity: 1; } }

.od-modal {
  position: relative;
  background: #0f1419;
  color: #e5e7eb;
  border-radius: 16px;
  max-width: 1000px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  border: 1px solid rgba(255, 193, 7, 0.2);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: odSlide 0.25s ease;
}
@keyframes odSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.od-modal::-webkit-scrollbar { width: 10px; }
.od-modal::-webkit-scrollbar-thumb { background: rgba(255, 193, 7, 0.3); border-radius: 5px; }

.od-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: #fff;
  border: 0; cursor: pointer; font-size: 22px;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
}
.od-close:hover { background: rgba(239, 68, 68, 0.4); transform: rotate(90deg); }

.od-spinner, .od-spinner-sm {
  border: 4px solid rgba(255, 193, 7, 0.2);
  border-top-color: #FFC107;
  border-radius: 50%;
  animation: odSpin 0.8s linear infinite;
}
.od-spinner { width: 50px; height: 50px; margin: 80px auto; }
.od-spinner-sm { width: 24px; height: 24px; margin: 20px auto; border-width: 3px; }
@keyframes odSpin { to { transform: rotate(360deg); } }

/* Header */
.od-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 24px 28px 16px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid #1f2937;
}
.od-header h2 { margin: 0 0 8px; font-size: 22px; color: #fff; font-weight: 800; }
.od-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: #cbd5e1; }
.od-warn { color: #fbbf24; font-weight: 700; }
.od-chip {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  background: rgba(255, 193, 7, 0.15); color: #FFC107;
  font-size: 11px; font-weight: 700;
}
.od-chip-green {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  background: rgba(22, 163, 74, 0.2); color: #4ade80;
  font-size: 11px; font-weight: 700;
}
.od-chip-gray {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  background: rgba(107, 114, 128, 0.2); color: #94a3b8;
  font-size: 11px; font-weight: 700;
}

.od-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Buttons */
.od-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-weight: 600; font-size: 13px;
  cursor: pointer; border: 0;
  font-family: inherit;
  transition: all 0.2s;
}
.od-btn-sm { padding: 5px 12px; font-size: 12px; }
.od-btn-danger { background: #ef4444; color: #fff; }
.od-btn-danger:hover { background: #dc2626; }
.od-btn-yellow { background: #FFC107; color: #000; }
.od-btn-yellow:hover { background: #B8860B; color: #fff; }
.od-btn:not([class*='od-btn-']) { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Grid */
.od-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 20px 28px 28px;
}
.od-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 18px;
}
.od-section-full { grid-column: 1 / -1; }
.od-section h3 {
  font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 14px;
}

/* Route */
.od-route { position: relative; }
.od-route-row { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.od-route-row small { color: #94a3b8; font-size: 11px; text-transform: uppercase; }
.od-route-row > div:last-child { flex: 1; font-size: 14px; color: #fff; }
.od-route-coord { color: #6b7280; font-size: 11px; }
.od-route-dot {
  width: 14px; height: 14px; border-radius: 50%;
  margin-top: 4px; flex-shrink: 0;
}
.od-route-dot-from { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
.od-route-dot-to { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
.od-route-line {
  width: 2px; height: 18px; background: rgba(255, 193, 7, 0.4);
  margin-left: 6px; border-radius: 2px;
}

/* Finance */
.od-finance { display: flex; flex-direction: column; gap: 8px; }
.od-finance-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}
.od-finance-row:last-child { border-bottom: 0; }
.od-finance-row span { color: #94a3b8; }
.od-finance-row strong { color: #fff; }

/* Person */
.od-person { display: flex; gap: 12px; align-items: flex-start; }
.od-person-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  flex-shrink: 0;
}
.od-person-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.od-phone { color: #FFC107; font-size: 13px; text-decoration: none; }
.od-phone:hover { text-decoration: underline; }
.od-car { color: #94a3b8; font-size: 12px; margin-top: 4px; }
.od-car code { background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 3px; }

.od-cancel-info {
  margin-top: 16px; padding: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 13px;
}

.od-empty { color: #6b7280; font-style: italic; padding: 14px; text-align: center; font-size: 13px; }

/* Drivers list */
.od-drivers { display: flex; flex-direction: column; gap: 10px; }
.od-driver {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s;
}
.od-driver:hover { border-color: rgba(255, 193, 7, 0.4); background: rgba(255, 193, 7, 0.04); }
.od-driver-info { flex: 1; }
.od-driver-head {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 4px;
}
.od-driver-head strong { color: #fff; font-size: 15px; }
.od-driver-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: #94a3b8;
}
.od-driver-meta code { background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.od-driver-action {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  flex-shrink: 0;
}
.od-driver-dist {
  font-size: 18px; font-weight: 800; color: #FFC107;
}

@media (max-width: 760px) {
  .od-grid { grid-template-columns: 1fr; }
  .od-driver { flex-direction: column; gap: 12px; align-items: flex-start; }
  .od-driver-action { flex-direction: row; width: 100%; justify-content: space-between; }
}
