@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0 20px;
  background: #f8fafc;
  margin: -8px -12px 0;
  padding: 12px 12px 20px;
  border-radius: 12px;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.dashboard-live-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: dashboard-pulse 2s ease-in-out infinite;
}

@keyframes dashboard-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.dashboard-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 0;
}

.dashboard-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.dashboard-card-head .muted {
  font-size: 11px;
  color: #94a3b8;
}

.dashboard-card-body {
  padding: 12px 14px 14px;
}

/* Slim KPI grid: 2 rows × 6 columns */
.kpi-analytics-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.kpi-analytics-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.kpi-card-pro {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card-pro:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  border-color: #e2e8f0;
}

.kpi-card-pro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  min-height: 28px;
}

.kpi-card-pro-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.kpi-card-pro-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-card-pro-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.kpi-card-pro-chart {
  width: 56px;
  height: 22px;
  flex-shrink: 0;
}

.kpi-card-pro-title {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.kpi-card-pro-value {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.2px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.kpi-card-pro-value-skeleton {
  height: 20px;
  width: 65%;
}

.kpi-card-pro-growth {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  flex-shrink: 0;
}

.kpi-card-pro-growth--up {
  color: #16a34a;
}

.kpi-card-pro-growth--down {
  color: #ea580c;
}

.kpi-card-pro-growth--flat {
  color: #94a3b8;
}

.kpi-card-pro-subtext {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .kpi-analytics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpi-analytics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Premium analytics charts — 3-column grid */
.analytics-charts-section {
  width: 100%;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

@media (max-width: 1200px) {
  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-chart-card {
  box-sizing: border-box;
  width: 100%;
  height: 280px;
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.analytics-chart-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  border-color: #e2e8f0;
}

.analytics-chart-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 18px;
}

.analytics-chart-card-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}

.analytics-chart-card-head .analytics-period-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 96px;
  max-width: 112px;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  appearance: none;
  align-self: flex-start;
}

.analytics-chart-card-body {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.analytics-chart-skeleton {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.analytics-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  font-size: 13px;
}

.analytics-chart-tooltip {
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.analytics-chart-tooltip-date {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.analytics-chart-tooltip-value {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.analytics-donut-layout {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  min-height: 0;
}

.analytics-donut-chart-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  max-width: 160px;
}

.analytics-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.analytics-donut-center-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.analytics-donut-center-label {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
}

.analytics-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.analytics-donut-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.analytics-donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.analytics-donut-legend-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.analytics-donut-legend-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.analytics-donut-legend-meta {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.ops-tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ops-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 900px) {
  .ops-tables-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: dashboard-shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes dashboard-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.rank-pill--1 {
  background: #fef3c7;
  color: #b45309;
}

.leaderboard-leave {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.leaderboard-leave--on-leave {
  color: #b45309;
}

.leaderboard-leave--pending {
  color: #2563eb;
}

.leaderboard-leave--range {
  color: #475569;
}

.leaderboard-head-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.leaderboard-head-controls .leaderboard-month-select {
  box-sizing: border-box;
  width: auto;
  max-width: 118px;
  height: 26px;
  padding: 0 22px 0 8px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: #475569;
  cursor: pointer;
  appearance: none;
}

.leaderboard-head-controls .leaderboard-month-select:hover {
  border-color: #cbd5e1;
}

.leaderboard-head-controls .leaderboard-month-select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.leaderboard-head-controls .muted {
  font-size: 11px;
  white-space: nowrap;
  color: #94a3b8;
}

.trip-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  text-transform: capitalize;
}

.driver-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}

.driver-status-pill--online {
  background: #d1fae5;
  color: #047857;
}

.driver-status-pill--offline {
  background: #f1f5f9;
  color: #64748b;
}

.driver-status-pill--busy {
  background: #dbeafe;
  color: #1d4ed8;
}

.driver-status-pill--blocked {
  background: #ffe4e6;
  color: #be123c;
}

.dashboard-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}
._previewRoot_sx3u3_1 {
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

._channelTitle_sx3u3_5 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

._messageText_sx3u3_11 {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 400;
}

._messagePlaceholder_sx3u3_17 {
  font-size: 13px;
  line-height: 1.45;
}

._timeText_sx3u3_22 {
  font-size: 11px;
  font-weight: 500;
}

._statLabel_sx3u3_27 {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

._statValue_sx3u3_33 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

._variablesTitle_sx3u3_39 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

._variableChip_sx3u3_45 {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
}
._formRoot_162b1_1 {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

._headerBar_162b1_9 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px 18px;
}

._headerLeft_162b1_20 {
  display: flex;
  align-items: center;
  gap: 12px;
}

._backButton_162b1_26 {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

._title_162b1_38 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

._modeText_162b1_45 {
  margin: 3px 0 0;
  font-size: 12px;
  color: #64748b;
}

._metaRow_162b1_51 {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

._chip_162b1_58 {
  height: 24px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

._chipMuted_162b1_72 {
  border-color: #e2e8f0;
  background: #ffffff;
  color: #475569;
}

._headerActions_162b1_78 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

._deleteButton_162b1_84 {
  height: 36px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

._saveButton_162b1_95 {
  height: 38px;
  border-radius: 10px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

._bodyGrid_162b1_109 {
  display: grid;
  grid-template-columns: minmax(560px, 1.2fr) minmax(360px, 1fr);
  align-items: start;
}

._formColumn_162b1_115 {
  border-right: 1px solid #e2e8f0;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: #ffffff;
  min-width: 0;
}

._previewColumn_162b1_124 {
  padding: 16px;
  background: #f8fafc;
  min-width: 0;
}

._sectionCard_162b1_130 {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

._sectionTitleRow_162b1_137 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

._sectionMarker_162b1_144 {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: #2563eb;
}

._sectionTitle_162b1_137 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

._helperText_162b1_158 {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
}

._fieldGridTwo_162b1_164 {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

._field_162b1_164 {
  display: grid;
  gap: 6px;
}

._label_162b1_175 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

._control_162b1_182 {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

._control_162b1_182:focus {
  border-color: #2563eb;
}

._textarea_162b1_198 {
  min-height: 170px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.45;
}

._variablesGrid_162b1_205 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

._variableChip_162b1_211 {
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

._statusRow_162b1_221 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

._statusCard_162b1_227 {
  min-width: 190px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

._statusTitle_162b1_235 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

._statusHint_162b1_242 {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

._previewTitle_162b1_248 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

._tipCard_162b1_255 {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
}

._tipRow_162b1_262 {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

._tipIconWrap_162b1_268 {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

._tipTitle_162b1_279 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

._tipText_162b1_286 {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

@media (max-width: 1024px) {
  ._bodyGrid_162b1_109 {
    grid-template-columns: 1fr;
  }

  ._formColumn_162b1_115 {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
}

@media (max-width: 1280px) {
  ._bodyGrid_162b1_109 {
    grid-template-columns: minmax(0, 1fr);
  }

  ._formColumn_162b1_115 {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
}

@media (max-width: 768px) {
  ._fieldGridTwo_162b1_164 {
    grid-template-columns: 1fr;
  }
}
._pageRoot_1jowt_1 {
  background: #f8fafc;
}

._pageContainer_1jowt_5 {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

._pageHeader_1jowt_12 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

._pageGuide_1jowt_19 {
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
  border-radius: 12px;
  padding: 12px 14px;
}

._pageGuideTitle_1jowt_26 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
}

._pageGuideText_1jowt_35 {
  margin: 4px 0 0;
  font-size: 13px;
  color: #475569;
}

._pageTitle_1jowt_41 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}

._pageSubtitle_1jowt_49 {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

._headerActions_1jowt_55 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

._actionButton_1jowt_61 {
  height: 42px;
  border-radius: 12px;
  padding: 0 15px 0 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

._actionButton_1jowt_61:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

._actionButton_1jowt_61:active {
  transform: translateY(0);
}

._actionButton_1jowt_61:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

._actionIconWrap_1jowt_91 {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

._actionButtonPrimary_1jowt_100 {
  border-color: #2563eb;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

._actionButtonPrimary_1jowt_100 ._actionIconWrap_1jowt_91 {
  background: rgba(255, 255, 255, 0.16);
}

._actionButtonPrimary_1jowt_100:hover {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

._actionButtonSecondary_1jowt_116 {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #1d4ed8;
}

._actionButtonSecondary_1jowt_116 ._actionIconWrap_1jowt_91 {
  background: #eff6ff;
  color: #2563eb;
}

._actionButtonSecondary_1jowt_116:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

._metricsRow_1jowt_132 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

._metricCard_1jowt_138 {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

._metricLabel_1jowt_145 {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

._metricValue_1jowt_151 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

._panelCard_1jowt_158 {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0px 4px 20px rgba(15, 23, 42, 0.06);
}

._tableHeader_1jowt_166 {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

._filterPills_1jowt_175 {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

._filterPill_1jowt_175 {
  height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  transition: all 0.2s ease;
}

._filterPill_1jowt_175:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

._filterPillActive_1jowt_199 {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

._sectionTitle_1jowt_205 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}

._sectionSubtitle_1jowt_213 {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

._searchWrap_1jowt_219 {
  position: relative;
}

._searchIcon_1jowt_223 {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #94a3b8;
}

._searchInput_1jowt_233 {
  height: 40px;
  width: 280px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 12px 0 34px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

._searchInput_1jowt_233:focus {
  border-color: #2563eb;
}

._table_1jowt_166 {
  width: 100%;
  border-collapse: collapse;
}

._table_1jowt_166 thead th {
  height: 48px;
  padding: 0 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

._table_1jowt_166 tbody tr {
  height: 72px;
  border-bottom: 1px solid #f1f5f9;
}

._table_1jowt_166 tbody tr:hover {
  background: #f8fafc;
}

._table_1jowt_166 tbody td {
  padding: 0 20px;
  font-size: 13px;
  color: #334155;
}

._templateCell_1jowt_280 {
  display: grid;
  gap: 2px;
}

._templateName_1jowt_285 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

._templateMeta_1jowt_292 {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

._eventBadge_1jowt_298 {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
}

._channelCell_1jowt_310 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

._statusEnabled_1jowt_318,
._statusDisabled_1jowt_319 {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

._statusEnabled_1jowt_318 {
  background: #dcfce7;
  color: #15803d;
}

._statusDisabled_1jowt_319 {
  background: #f1f5f9;
  color: #64748b;
}

._updatedCell_1jowt_339 {
  color: #64748b;
}

._actionsCol_1jowt_343 {
  text-align: right !important;
}

._editButton_1jowt_347 {
  height: 34px;
  border-radius: 9px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

._editButton_1jowt_347:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

._emptyState_1jowt_368 {
  padding: 36px 20px;
  text-align: center;
}

._emptyTitle_1jowt_373 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

._emptySubtitle_1jowt_380 {
  margin: 8px auto 0;
  max-width: 420px;
  font-size: 13px;
  color: #64748b;
}

._emptyState_1jowt_368 ._actionButton_1jowt_61 {
  margin-top: 16px;
}

._drawerOverlay_1jowt_391 {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
}

._quickTestDrawer_1jowt_398 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 560px;
  max-height: min(90dvh, 820px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  z-index: 1201;
}

._quickTestDrawer_1jowt_398 :is(h1, h2, h3, h4, h5, h6, p, label, input, select, button, span, div) {
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

._drawerHeader_1jowt_422 {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

._drawerHeaderLeft_1jowt_432 {
  display: flex;
  align-items: center;
  gap: 10px;
}

._drawerIconWrap_1jowt_438 {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

._drawerTitle_1jowt_448 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

._drawerSubtitle_1jowt_456 {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}

._drawerCloseButton_1jowt_463 {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

._drawerBody_1jowt_475 {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  padding: 0 16px 8px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

._drawerCard_1jowt_486 {
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
}

._drawerCardTitle_1jowt_494 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

._drawerField_1jowt_503 {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

._drawerField_1jowt_503:last-child {
  margin-bottom: 0;
}

._drawerLabel_1jowt_513 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
}

._drawerInput_1jowt_520 {
  width: 100%;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1.3;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

._drawerInput_1jowt_520::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

._drawerInput_1jowt_520:focus {
  border-color: #2563eb;
}

._drawerFooter_1jowt_543 {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 10px 16px 14px;
  display: grid;
  gap: 8px;
}

._drawerResultOk_1jowt_551,
._drawerResultFail_1jowt_552 {
  border-radius: 10px;
  padding: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

._drawerResultOk_1jowt_551 {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

._drawerResultFail_1jowt_552 {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

._drawerSubmit_1jowt_573 {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

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

/* Scoped reset to prevent legacy global style bleed in main page only */
._pageRoot_1jowt_1 label {
  margin-bottom: 0;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

._pageRoot_1jowt_1 .panelCard input:not([type="checkbox"]),
._pageRoot_1jowt_1 .panelCard select {
  width: auto;
  padding: initial;
  border-radius: initial;
  border: initial;
  font-size: inherit;
  transition: initial;
}

._pageRoot_1jowt_1 .panelCard input:not([type="checkbox"]):focus,
._pageRoot_1jowt_1 .panelCard select:focus {
  box-shadow: none;
}

._pageRoot_1jowt_1 button {
  width: auto;
  font-family: inherit;
}

@media (max-width: 1024px) {
  ._metricsRow_1jowt_132 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  ._tableHeader_1jowt_166 {
    flex-direction: column;
    align-items: flex-start;
  }

  ._filterPills_1jowt_175 {
    flex-wrap: wrap;
  }

  ._searchInput_1jowt_233 {
    width: 100%;
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  ._pageHeader_1jowt_12 {
    flex-direction: column;
    align-items: flex-start;
  }

  ._headerActions_1jowt_55 {
    width: 100%;
    flex-wrap: wrap;
  }

  ._metricsRow_1jowt_132 {
    grid-template-columns: 1fr;
  }

  ._drawerVariablesGrid_1jowt_588 {
    grid-template-columns: 1fr;
  }

  ._quickTestDrawer_1jowt_398 {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }
}
.compact-selectors {
  display: flex;
  gap: 12px;
  align-items: center;
}

.selector-group {
  position: relative;
}

.selector-chip {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  padding: 4px 12px;
}

.selector-chip.combined {
  gap: 0;
}

.selector-section {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.selector-section.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selector-section.city-label {
  cursor: default;
  color: #cbd5e1;
}

.city-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.city-name {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: capitalize;
}

.selector-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.selector-divider {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 10px;
  font-weight: 300;
  user-select: none;
}

.selector-native {
  appearance: none;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  width: auto;
  min-width: 60px;
  max-width: 150px;
  cursor: inherit;
  outline: none;
  text-overflow: ellipsis;
  font-family: inherit;
  text-transform: capitalize;
  padding: 4px 0;
}

.selector-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.selector-native option {
  background: #0f172a;
  color: #f8fafc;
  padding: 10px;
}


.selector-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  pointer-events: none;
  opacity: 0.6;
  color: #94a3b8;
}

@media (max-width: 768px) {
  .compact-selectors {
    gap: 8px;
  }
  .selector-chip {
    padding: 2px 8px;
  }
  .selector-chip.combined {
    padding-right: 20px;
  }
  .selector-divider {
    margin: 0 4px;
  }
  .selector-native {
    font-size: 12px;
    max-width: 80px;
    min-width: 40px;
  }
  .selector-icon {
    display: none;
  }
}
/* ============================================
   MODERN MINIMALIST HEADER STYLES
   ============================================ */

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */

@keyframes slideInFromLeft {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes bellAlertPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); background: #fee2e2; color: #dc2626; }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

/* Header Container */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  --header-height: 64px;
  height: var(--header-height);
  background: #0f172a; /* Dark Slate Blue-Black */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
  color: #f8fafc;
}

.header-container {
  max-width: 1600px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 24px;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}

/* Spacer for fixed header */
.header-spacer {
  height: var(--header-height);
}

/* ============================================
   BRAND / LOGO
   ============================================ */

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
  margin-right: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: clamp(32px, 4vh, 40px);
  height: clamp(32px, 4vh, 40px);
  background: #2563eb;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.6vw, 18px);
  border: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  line-height: 1.2;
}

/* Ensure brand text doesn't shift baseline (helps vertical alignment) */
.brand-text * { margin: 0; padding: 0; }

.brand-name {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1;
}

.brand-tagline {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  line-height: 1;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */

.header-nav {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 50;
  position: relative;
  overflow: visible !important;
  margin-left: 12px;
}

/* Ensure more-button can actually contain the absolute dropdown without clipping */
.more-button {
  position: relative;
  z-index: 60;
}

.header-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Brave */
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  border: 1px solid transparent;
}

.nav-link.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #2563eb !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-link:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px);
}

/* Truncate long labels to avoid overflow */
.nav-label {
  display: inline-block;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-label {
  display: inline-block;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  font-weight: 600;
}
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 14px;
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
}

/* More menu button */
.more-button {
  position: relative;
}

.nav-link.more-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.more-dropdown {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  right: 0;
  min-width: 200px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 8px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 70;
}

/* Add a small arrow to the dropdown */
.more-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  display: block;
}

.more-dropdown .nav-link {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #94a3b8;
  align-items: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
}

.more-dropdown .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.more-dropdown .nav-link.active {
  background: rgba(37, 99, 235, 0.1);
  color: #3b82f6;
  pointer-events: auto; /* Allow clicking active items in dropdown */
}

.more-dropdown .nav-icon {
  margin-right: 2px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure labels are visible inside the dropdown even when main nav is icons-only */
.more-dropdown .nav-label {
  display: inline-block;
  max-width: none;
  color: inherit;
  font-weight: 500;
  font-size: 13px;
}

.more-button .nav-link.active {
  background: #2563eb;
  color: #ffffff;
}

/* ============================================
   HEADER SELECTORS & ACTIONS
   ============================================ */

/* ============================================
   HEADER RIGHT GROUP (Selectors & Actions)
   ============================================ */

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: auto; /* Push everything else to the far right */
  z-index: 500;
}

.header-selectors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 fit-content;
  z-index: 85;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 90;
}

.compact-selectors {
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 85;
  flex: 0 0 auto;
}

.compact-selector {
  position: relative;
  flex-shrink: 0;
  width: auto;
}

.compact-selector-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px; /* reduced to save header space */
  width: auto;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.15);
  color: #e0e7ff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.compact-selector-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.compact-selector-btn .compact-icon {
  width: 18px;
  height: 18px;
  display: block;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* Pill variant: slightly larger, more horizontal padding */
.compact-selector-btn.pill {
  padding: 4px 12px;
  height: 36px;
  min-width: 88px; /* slightly smaller pill */
  width: auto;
}

/* Nudge compact selectors slightly to align with nav center */
.compact-selectors { transform: translateY(-1px); }

/* visible label inside compact selector */
.compact-pill-label {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
  max-width: 200px;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Popover for selectors */
/* Responsive adjustments to keep nav items visible without horizontal scroll */
@media (min-width: 1101px) {
  /* Ensure header nav can shrink gracefully */
  .header-nav { gap: 6px; }
  .nav-link { flex-shrink: 1; }
  .nav-link .nav-icon { margin-right: 0; }
}

/* Keep compact selectors visible but avoid pushing nav */
@media (max-width: 1280px) {
  .compact-selectors { display: flex; gap: 6px; }
  .compact-selector-btn.pill { padding: 4px 10px; min-width: 80px; }
}

.compact-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(2,6,23,0.12);
  padding: 8px;
  border-radius: 8px;
  z-index: 85;
}

.compact-popover .compact-select {
  width: 200px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}

/* Hide compact selector icons on very small screens since drawer already provides selectors */
@media (max-width: 420px) {
  .compact-selectors { display: none; }
}

.action-btn {
  position: relative;
  width: clamp(32px, 3.5vh, 40px);
  height: clamp(32px, 3.5vh, 40px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}

.action-icon {
  font-size: 16px;
}

.action-btn.notifications.alerting {
  animation: bellAlertPulse 0.5s ease-in-out 2;
  border-color: #fca5a5;
}

.action-btn.notifications.alerting .action-icon {
  animation: bellRing 0.5s ease-in-out 2;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a; /* Dark border on badge to match header bg */
}

.notifications-menu {
  position: relative;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, 88vw);
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: none;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 80;
}

.notifications-dropdown::-webkit-scrollbar {
  display: none;
}

.notifications-header {
  position: sticky;
  top: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notifications-empty {
  padding: 14px 12px;
  color: #64748b;
  font-size: 13px;
}

.notification-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.notification-item.priority {
  background: #fff1f2;
  border-left: 3px solid #ef4444;
}

.notification-item {
  padding: 12px;
  border-bottom: 1px bottom solid rgba(255, 255, 255, 0.05); /* Fixed from border-bottom to actually be used */
  cursor: pointer;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

button.notification-item-action {
  display: block;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.notification-priority-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.notification-detail {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 3px;
}

.notification-time {
  font-size: 11px;
  color: #64748b;
}

/* ============================================
   USER MENU
   ============================================ */

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-trigger:hover, .user-trigger.open {
  background: rgba(255, 255, 255, 0.08); /* Dark hover */
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.user-avatar {
  width: clamp(24px, 3.2vh, 32px);
  height: clamp(24px, 3.2vh, 32px);
  background: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 1.1vw, 12px);
  font-weight: 600;
  color: #ffffff;
}

.user-avatar.large {
  width: clamp(40px, 5vh, 56px);
  height: clamp(40px, 5vh, 56px);
  font-size: clamp(14px, 1.6vw, 18px);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.user-role {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.dropdown-arrow {
  font-size: 10px;
  color: #94a3b8;
  margin-left: 2px;
  margin-right: 4px;
  transition: transform 0.2s ease;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 75;
  overflow: hidden;
}

.dropdown-header {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dropdown-item.logout {
  color: #fb7185;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-item.logout:hover {
  background: rgba(251, 113, 133, 0.05);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

.menu-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #64748b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { width: 100%; }
.hamburger span:nth-child(2) { width: 75%; }
.hamburger span:nth-child(3) { width: 50%; }

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  width: 100%;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 100%;
}

/* ============================================
   MOBILE DRAWER
   ============================================ */

.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 998;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #ffffff;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  border-right: 1px solid #e2e8f0;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.drawer-header .brand-logo {
  color: #ffffff;
}

.drawer-header .brand-name {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.mobile-nav {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.mobile-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mobile-nav-link.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.mobile-nav-link .nav-icon {
  font-size: 18px;
}

/* Staggered animation for mobile nav items */
.mobile-drawer.open .mobile-nav-link {
  animation: slideInFromLeft 0.3s ease-out backwards;
}

.mobile-drawer.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-drawer.open .mobile-nav-link:nth-child(2) { animation-delay: 0.08s; }
.mobile-drawer.open .mobile-nav-link:nth-child(3) { animation-delay: 0.11s; }
.mobile-drawer.open .mobile-nav-link:nth-child(4) { animation-delay: 0.14s; }
.mobile-drawer.open .mobile-nav-link:nth-child(5) { animation-delay: 0.17s; }
.mobile-drawer.open .mobile-nav-link:nth-child(6) { animation-delay: 0.20s; }
.mobile-drawer.open .mobile-nav-link:nth-child(7) { animation-delay: 0.23s; }

.drawer-footer {
  padding: 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-mini .user-email {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.drawer-footer .logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-footer .logout-btn:hover {
  background: #fee2e2;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Header context (city / organization displayed beside brand) */
.header-context {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 12px;
  color: #94a3b8;
  font-size: 13px;
}
.header-context .context-item {
  background: rgba(255,255,255,0.04);
  padding: 6px 8px;
  border-radius: 8px;
  color: #f8fafc;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
}


@media (max-width: 1023px) {
  .header-container {
    padding: 0 16px;
  }
  
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 640px) {
  .header {
    height: 60px;
  }
  
  .header-spacer {
    height: 60px;
  }
  
  .header-container {
    padding: 0 12px;
    gap: 12px;
  }
  
  .brand-name {
    font-size: 15px;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .action-btn {
    width: 32px;
    height: 32px;
  }

  .action-btn .action-icon {
    font-size: 14px;
  }
  
  .user-trigger {
    padding: 2px;
  }
  
  .user-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
}

/* Hide desktop nav earlier to avoid overflow when space is constrained */
@media (max-width: 1100px) {
  .header-nav {
    display: none;
  }

  .brand-tagline {
    display: none;
  }

  .header-container {
    gap: 12px;
  }

  .header-actions {
    gap: 8px;
  }
}


@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

:root {
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #0f172a;
  background: #eef2f6;
}

* { box-sizing: border-box; }

/* Hide number input spinners (scroll/arrows should not change values) */

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

body { margin: 0; background: #eef2f6; overflow-x: hidden; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px; }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  background: #eef2f6;
  width: 100%;
  min-width: 0;
}

.main-content {
	min-width: 0;
	width: 100%;
	padding-top: 64px;
}

.admin-shell.menu-collapsed {
  grid-template-columns: 0 1fr;
}

.admin-shell.menu-collapsed .sidebar {
  width: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar {
  background:
    linear-gradient(135deg,
      rgba(31, 42, 68, 0.95) 0%,
      rgba(15, 23, 42, 0.9) 25%,
      rgba(30, 41, 59, 0.85) 50%,
      rgba(51, 65, 85, 0.9) 75%,
      rgba(31, 42, 68, 0.95) 100%
    ),
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow:
    4px 0 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.03) 75%,
    transparent 100%
  );
  animation: sidebarGlow 12s ease-in-out infinite;
}

@keyframes sidebarGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  display: inline-block;
}

.brand-title { font-weight: 600; color: #fff; }

.brand-subtitle { font-size: 12px; color: #cbd5f5; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.nav-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item.active {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.8) 100%),
    rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow:
    0 4px 16px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.nav-item.active:hover {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(29, 78, 216, 0.9) 100%),
    rgba(255, 255, 255, 0.15);
  transform: translateX(6px);
  box-shadow:
    0 6px 20px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-item.logout {
  margin-top: auto;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: rgba(252, 165, 165, 0.9);
}

.nav-item.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateX(4px);
}

.admin-shell-static {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eef2f6;
  overflow-y: auto;
}

.sidebar-top {
  background:
    linear-gradient(135deg,
      rgba(31, 42, 68, 0.95) 0%,
      rgba(15, 23, 42, 0.9) 25%,
      rgba(30, 41, 59, 0.85) 50%,
      rgba(51, 65, 85, 0.9) 75%,
      rgba(31, 42, 68, 0.95) 100%
    ),
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.sidebar-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.03) 75%,
    transparent 100%
  );
  animation: sidebarGlow 12s ease-in-out infinite;
}

.main-content-static {
  flex: 1;
  padding: 24px;
  background: #eef2f6;
  overflow: visible;
}

.main-header {
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.15) 25%,
      rgba(248, 250, 252, 0.1) 50%,
      rgba(241, 245, 249, 0.15) 75%,
      rgba(255, 255, 255, 0.2) 100%
    ),
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.15),
    0 4px 16px rgba(31, 38, 135, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.main-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.main-header:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(31, 38, 135, 0.2),
    0 6px 20px rgba(31, 38, 135, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.main-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  background: linear-gradient(135deg, #1e293b, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-header h1 { margin: 0; font-size: 16px; }

.header-left { display: flex; align-items: center; gap: 10px; }

.logout-btn {
  width: auto;
  padding: 10px 16px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  background-size: 200% 200%;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 4px 15px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: buttonPulse 3s ease-in-out infinite;
}

.logout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: buttonShimmer 2.5s infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

@keyframes buttonShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.logout-btn:hover {
  background-position: right center;
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 8px 25px rgba(220, 38, 38, 0.4),
    0 4px 15px rgba(220, 38, 38, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logout-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 2px 8px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(226, 232, 240, 0.6);
  border: none;
  font-weight: 600;
  font-size: 18px;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(226, 232, 240, 0.8);
  transform: scale(1.05);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

.auth-page { min-height: 100vh; display: grid; place-items: center; }

.auth-card { width: min(420px, 100%); }

.auth-card .form {
  gap: 12px;
}

.auth-card .form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

.auth-card .form button[type="submit"]:hover:not(:disabled) {
  background: #1e40af;
  transform: none;
}

.password-input-wrap {
  position: relative;
  width: 100%;
}

.password-input-field {
  width: 100%;
  padding-right: 2.5rem;
  box-sizing: border-box;
}

.password-input-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0 10px 10px 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.password-input-toggle:hover {
  background: #f1f5f9;
  color: #334155;
  transform: none;
}

.password-input-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.password-input-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  flex-shrink: 0;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }

.home-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }

.metric, .card { background: #fff; border: 1px solid #dbeafe; border-radius: 12px; padding: 14px; margin-bottom: 12px; max-width: 100%; box-sizing: border-box; }

.metric h3 { margin: 4px 0 0; }

.kpi-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.08);
}

.kpi-card h3 { margin: 4px 0 0; font-size: 20px; }

.sparkline { width: 120px; height: 36px; stroke: #3b82f6; stroke-width: 2; }

.chart-card { padding: 14px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }

.area-chart { width: 100%; height: 180px; }

.area-chart polygon { fill: rgba(59, 130, 246, 0.15); }

.area-chart polyline { stroke: #2563eb; stroke-width: 3; }

.table-card .table-row { min-width: 600px; }

.recent-row { grid-template-columns: 0.7fr 1.2fr 1fr 0.9fr 0.7fr; min-width: 600px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.assign-panel { margin-top: 12px; }

.assign-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.form-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 2px;
}

.driver-form-modal {
  width: min(720px, 96vw);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.driver-form-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  max-height: calc(90dvh - 56px);
}

.driver-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-form-modal {
  width: min(640px, 96vw);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.customer-form-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.customer-form-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  max-height: calc(90dvh - 72px);
}

.customer-form-section {
  margin-bottom: 16px;
}

.customer-form-section-title {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.customer-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-form-actions {
  padding-top: 8px;
  border-top: 1px solid #e8edf2;
}

.driver-form-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.driver-form-field-label {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

.driver-form-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.driver-form-inline-checkbox {
  width: auto;
  margin: 0;
}

.driver-form-inline-checkbox input[type="checkbox"] {
  width: auto;
}

.driver-form-file-hint {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.driver-form-actions {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e8edf2;
}

.driver-form-actions .btn,
.driver-form-actions .btn-ghost {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 10px;
}

.driver-form-actions .driver-form-submit-btn {
  min-width: 160px;
  font-weight: 600;
}

.driver-form-body textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}

.driver-form-body .sector-search-field .create-trip-customer-search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

/* Sector dropdown uses buttons; neutralize legacy `.form button` primary styling */

.driver-form-body button.create-trip-customer-suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: #fff;
  color: inherit;
  font-weight: 400;
  box-shadow: none;
}

.driver-form-body button.create-trip-customer-suggestion:last-child {
  border-bottom: none;
}

.driver-form-body button.create-trip-customer-suggestion:hover,
.driver-form-body button.create-trip-customer-suggestion.create-trip-customer-suggestion--active {
  background: #f1f5f9;
  color: inherit;
  transform: none;
}

.driver-form-body .create-trip-customer-suggestions {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.sector-search-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 640px) {
  .driver-form-row {
    grid-template-columns: 1fr;
  }
}

.assign-cta { display: flex; align-items: end; }

label { font-size: 12px; color: #475569; display: block; margin-bottom: 4px; font-weight: 500; }

input:not([type="checkbox"]), select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

input:not([type="checkbox"]):focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:not([type="checkbox"]):hover, select:hover {
  border-color: #94a3b8;
}

input::placeholder {
  color: #94a3b8;
}

/* Legacy form-only button defaults (plain submit buttons in settings/login) */

.form button:not(.btn):not(.btn-ghost):not(.btn-primary):not(.btn-secondary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.icon-btn):not(.create-trip-customer-suggestion):not(.create-trip-type-chip):not(.small-btn):not(.settings-sectors-btn):not(.settings-cities-submit):not(.settings-cities-row-btn):not(.settings-menu-item):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.password-input-toggle) {
  border: none;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border-radius: 12px;
}

.form button:not(.btn):not(.btn-ghost):not(.btn-primary):not(.btn-secondary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.icon-btn):not(.create-trip-customer-suggestion):not(.create-trip-type-chip):not(.small-btn):not(.settings-sectors-btn):not(.settings-cities-submit):not(.settings-cities-row-btn):not(.settings-menu-item):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.password-input-toggle):hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.form button:not(.btn):not(.btn-ghost):not(.btn-primary):not(.btn-secondary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.icon-btn):not(.create-trip-customer-suggestion):not(.create-trip-type-chip):not(.small-btn):not(.settings-sectors-btn):not(.settings-cities-submit):not(.settings-cities-row-btn):not(.settings-menu-item):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.password-input-toggle):active {
  transform: translateY(0);
}

.form button:not(.btn):not(.btn-ghost):not(.btn-primary):not(.btn-secondary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(.icon-btn):not(.create-trip-customer-suggestion):not(.create-trip-type-chip):not(.small-btn):not(.settings-sectors-btn):not(.settings-cities-submit):not(.settings-cities-row-btn):not(.settings-menu-item):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.password-input-toggle):disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Cancel/actions inside `.form` — keep ghost/primary variant colors on hover and click */

.form button.btn-ghost,
.form .modal-actions .btn-ghost,
.form .driver-form-actions .btn-ghost,
.form .customer-form-actions .btn-ghost,
.create-trip-form--v2 .create-trip-actions .btn-ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
  transform: none;
}

.form button.btn-ghost:hover:not(:disabled),
.form .modal-actions .btn-ghost:hover:not(:disabled),
.form .driver-form-actions .btn-ghost:hover:not(:disabled),
.form .customer-form-actions .btn-ghost:hover:not(:disabled),
.create-trip-form--v2 .create-trip-actions .btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
  transform: none;
}

.form button.btn-ghost:active:not(:disabled),
.form .modal-actions .btn-ghost:active:not(:disabled),
.form .driver-form-actions .btn-ghost:active:not(:disabled),
.form .customer-form-actions .btn-ghost:active:not(:disabled),
.create-trip-form--v2 .create-trip-actions .btn-ghost:active:not(:disabled) {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
  transform: none;
}

.form button.btn-primary,
.form .modal-actions .btn-primary,
.form .driver-form-actions .btn-primary,
.form .customer-form-actions .btn-primary,
.create-trip-form--v2 .create-trip-actions .btn-primary {
  background: #1d4ed8;
  color: #fff;
  border: none;
}

.form button.btn-primary:hover:not(:disabled),
.form .modal-actions .btn-primary:hover:not(:disabled),
.form .driver-form-actions .btn-primary:hover:not(:disabled),
.form .customer-form-actions .btn-primary:hover:not(:disabled),
.create-trip-form--v2 .create-trip-actions .btn-primary:hover:not(:disabled) {
  background: #1e40af;
  color: #fff;
  transform: none;
}

.form button.btn-primary:active:not(:disabled),
.form .modal-actions .btn-primary:active:not(:disabled),
.form .driver-form-actions .btn-primary:active:not(:disabled),
.form .customer-form-actions .btn-primary:active:not(:disabled),
.create-trip-form--v2 .create-trip-actions .btn-primary:active:not(:disabled) {
  background: #1e3a8a;
  color: #fff;
  transform: none;
}

.checkbox { display: flex; align-items: center; gap: 8px; }

/* Notifications page style isolation to avoid legacy global bleed */

.notif-settings-page label {
  margin-bottom: 0;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

.notif-settings-page input:not([type="checkbox"]),
.notif-settings-page select {
  width: auto;
  padding: initial;
  border-radius: initial;
  border: initial;
  font-size: inherit;
  transition: initial;
}

.notif-settings-page input:not([type="checkbox"]):focus,
.notif-settings-page select:focus {
  outline: none;
  box-shadow: none;
}

.search { margin-bottom: 12px; }

.driver-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

.search-wrap { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 280px; }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  width: auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.chip.active { background: #1d4ed8; color: #fff; }

.table { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; }

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 2fr) minmax(0, 0.9fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.table-row.cities-row {
  grid-template-columns: 1.2fr 1.5fr 0.8fr 1fr 0.5fr;
  min-width: 600px;
}

.table-row:last-child { border-bottom: none; }

.table-head { background: #eff6ff; font-weight: 600; }

.table-head span { white-space: nowrap; }

.driver-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.6fr);
}

.driver-row span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.driver-row .cell-user-id { white-space: normal; word-break: break-all; }

.driver-row .cell-location { display: flex; align-items: center; gap: 6px; }

.driver-row .cell-actions { white-space: normal; }

.driver-row .action-wrap { justify-content: flex-start; }

.driver-row-compact {
  grid-template-columns: 1.1fr 1fr 1fr 0.8fr 0.9fr 1.2fr;
  min-width: 900px;
}

.driver-row-full {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.6fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.driver-availability-table .table-row.driver-row-compact {
  grid-template-columns: 3fr 0.8fr 0.9fr 0.4fr 0.7fr;
  min-width: 0;
}

.trip-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }

.settings-row { grid-template-columns: 1.2fr 1fr 0.8fr 0.9fr 0.1fr; min-width: 760px; }

.route-tariff-table {
  width: fit-content;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  overflow-x: auto;
  background: #ffffff;
}

.route-tariff-table.route-tariff-table-compact {
  width: 100%;
}

.route-tariff-row {
  grid-template-columns:
    max-content
    max-content
    max-content
    max-content
    max-content
    max-content
    max-content;
  column-gap: 12px;
  row-gap: 4px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 6px 12px;
}

.route-tariff-row.route-tariff-row-compact {
  width: 100%;
  max-width: none;
  grid-template-columns:
    minmax(140px, 1.3fr)
    minmax(140px, 1.3fr)
    minmax(72px, 0.7fr)
    minmax(90px, 0.9fr)
    minmax(90px, 0.9fr)
    minmax(170px, 1fr);
  column-gap: 12px;
}

.route-tariff-row.route-tariff-row-compact .route-tariff-col-destination {
  justify-self: start;
  text-align: left;
}

.route-tariff-row.route-tariff-row-compact .route-tariff-col-charge,
.route-tariff-row.route-tariff-row-compact .route-tariff-money {
  justify-self: end;
  text-align: right;
}

.route-tariff-row.route-tariff-row-compact .route-tariff-col-actions,
.route-tariff-row.route-tariff-row-compact .route-tariff-actions {
  justify-self: end;
  text-align: right;
}

.route-tariff-row.route-tariff-row-compact .route-tariff-actions {
  border-radius: 999px;
  background: #f1f5f9;
  border-color: #dbe3ef;
  padding: 2px;
  gap: 2px;
}

.route-tariff-row.route-tariff-row-compact .route-compact-action-btn {
  min-height: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #1e40af;
  font-weight: 600;
  line-height: 1;
  padding: 0 10px;
  box-shadow: none;
  transform: none;
}

.route-tariff-row.route-tariff-row-compact .route-compact-action-btn:hover {
  background: #ffffff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: none;
}

.route-tariff-row.route-tariff-row-compact .route-compact-action-btn-danger {
  color: #b91c1c;
}

.route-tariff-row.route-tariff-row-compact .route-compact-action-btn-danger:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #991b1b;
}

.route-tariff-table-outstation {
  display: grid;
  width: 100%;
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(76px, max-content)
    minmax(52px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(76px, max-content)
    minmax(52px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    max-content
    minmax(210px, max-content);
  column-gap: 10px;
  row-gap: 0;
}

.route-tariff-table-outstation .route-tariff-row {
  display: grid;
  /* Avoid `subgrid` because it isn't consistently supported across browsers.
     We repeat the same column template as the container so header + rows align. */
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(76px, max-content)
    minmax(52px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(76px, max-content)
    minmax(52px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    minmax(48px, max-content)
    max-content
    minmax(210px, max-content);
  grid-column: 1 / -1;
  column-gap: 10px;
  min-width: 0;
  width: auto;
  max-width: none;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.route-tariff-table-outstation .route-tariff-head-group {
  background: #eef2f7;
  border-bottom: 1px solid #e2e8f0;
  padding: 5px 12px 3px;
}

.route-tariff-table-outstation .route-tariff-head-group .route-tariff-head-span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
  text-align: center;
}

.route-tariff-table-outstation .route-tariff-head-group .route-tariff-col-destination {
  text-align: left;
}

.route-tariff-table-outstation .route-tariff-head-cols {
  padding-top: 2px;
  padding-bottom: 4px;
}

.route-tariff-table-outstation .route-tariff-head-cols .route-tariff-col-status,
.route-tariff-table-outstation .route-tariff-head-cols .route-tariff-col-actions {
  visibility: hidden;
  padding: 0;
  min-height: 0;
  font-size: 0;
}

.route-tariff-table-outstation .route-tariff-money {
  font-size: 12px;
}

.route-tariff-table .table-head {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.route-tariff-table .table-head span {
  display: block;
}

.route-tariff-table .table-row:not(.table-head) {
  transition: background-color 0.15s ease;
}

.route-tariff-table .table-row:not(.table-head):hover {
  background: #f8fbff;
}

.route-tariff-table .table-row:not(.table-head):nth-child(even) {
  background: #fcfdff;
}

.route-tariff-col-destination,
.route-tariff-row .route-tariff-city {
  justify-self: start;
  text-align: left;
}

.route-tariff-col-long,
.route-tariff-col-short,
.route-tariff-col-charge,
.route-tariff-row .route-tariff-cell.route-tariff-money {
  justify-self: end;
  text-align: right;
}

.route-tariff-col-status,
.route-tariff-row .route-tariff-cell.route-tariff-status {
  justify-self: center;
  text-align: center;
}

.route-tariff-col-actions,
.route-tariff-row .route-tariff-actions {
  justify-self: end;
  text-align: right;
}

.route-tariff-row .route-tariff-cell {
  min-width: 0;
}

.route-tariff-row .route-tariff-cell.route-tariff-money,
.route-tariff-row .route-tariff-cell.route-tariff-status {
  white-space: nowrap;
}

.route-tariff-row .route-tariff-cell.route-tariff-status {
  display: flex;
  justify-content: center;
  overflow: visible;
}

.route-tariff-city {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: flex-start;
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.route-tariff-city-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  text-transform: capitalize;
}

.route-tariff-city-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.route-tariff-city-meta::before {
  content: "·";
  margin-right: 6px;
  color: #cbd5e1;
}

.route-tariff-money {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #334155;
  font-size: 13px;
}

.route-tariff-money.route-tariff-highlight {
  font-weight: 700;
  color: #047857;
}

.route-tariff-money.route-tariff-empty {
  color: #94a3b8;
  font-weight: 500;
}

.route-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.route-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-status-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.route-status-active::before {
  background: #16a34a;
}

.route-status-inactive {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.route-status-inactive::before {
  background: #dc2626;
}

.route-tariff-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: flex-end;
  align-items: center;
  overflow: visible;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 1px;
}

.route-tariff-actions::before {
  display: none;
}

.route-tariff-btn {
  width: auto;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
  transform: none;
}

.route-tariff-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: none;
}

.route-tariff-btn-primary {
  color: #1d4ed8;
}

.route-tariff-btn-primary:hover {
  background: #eff6ff;
  color: #1e40af;
}

.route-tariff-btn-danger {
  color: #b91c1c;
}

.route-tariff-btn-danger:hover {
  background: #fff1f2;
  color: #991b1b;
}

.route-tariff-message {
  text-align: center;
  color: #475569;
  padding: 10px 0;
}

.action-wrap { display: flex; gap: 6px; flex-wrap: wrap; }

.action-wrap button { width: auto; padding: 6px 10px; font-size: 12px; }

.trip-table tr.selected {
  background: #eff6ff;
}

.trip-table tr.selected {
  border-color: #bfdbfe;
}

.trip-table tr.selected td {
  color: #0f172a;
}

.trip-table tr.selected td.trip-type {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  text-transform: capitalize;
}

.pill.online { background: #dcfce7; color: #166534; }

.pill.offline { background: #e2e8f0; color: #475569; }

.pill.blocked { background: #fee2e2; color: #991b1b; }

.pill.assigned, .pill.approved { background: #dbeafe; color: #1d4ed8; }

.pill.rejected { background: #fecaca; color: #991b1b; }

.pill.completed { background: #dcfce7; color: #166534; }

.pill.cancelled { background: #fee2e2; color: #991b1b; }

.trip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.trip-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.trip-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.trip-status-tabs {
  margin-bottom: 0;
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 5px;
  background: rgba(0,0,0,0.12);
  color: inherit;
}

.chip-count.active {
  background: rgba(255,255,255,0.28);
  color: #fff;
}

.chip-count.urgent {
  background: #f97316;
  color: #fff;
}

.trip-shown-count {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.trip-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Compact filter row - combines status and date filters */

.trip-filter-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px;
  background: #f8fafc;
  border-radius: 8px;
  flex-wrap: wrap;
}

.trip-filter-compact .trip-search-input {
  flex: 1;
  min-width: 180px;
  height: 32px !important;
  padding: 0 10px 0 28px !important;
}

.trip-shown-count {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 4px;
}

.trip-status-pills {
  display: flex;
  gap: 5px;
  align-items: center;
}

.trip-status-pills > * {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 16px;
}

.trip-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: white;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  height: 28px;
}

.trip-pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.trip-pill.active {
  background: #1d4ed8;
  color: white;
  border-color: #1d4ed8;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  font-size: 10px;
  font-weight: 600;
  background: #fed7aa;
  color: #92400e;
  border-radius: 9px;
}

.pill-badge.urgent {
  background: #fecaca;
  color: #991b1b;
}

.trip-date-selector {
  display: flex;
}

.date-dropdown {
  padding: 5px 10px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.date-dropdown:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.date-dropdown:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.trip-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  width: 100%;
}

.trip-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.trip-filter-controls::-webkit-scrollbar {
  display: none;
}

.trip-icon-filters {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  max-width: 100%;
}

.trip-icon-filters::-webkit-scrollbar {
  display: none;
}

.trip-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.trip-icon-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #334155;
  transform: translateY(-1px);
}

.trip-icon-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.trip-icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.trip-icon-btn.active svg {
  opacity: 1;
}

/* row 1 inherits from .trip-icon-filters — no overrides needed */

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
  transition: all 0.25s ease;
}

.trip-icon-btn:hover .icon-badge {
  background: rgba(0, 0, 0, 0.12);
}

.trip-icon-btn.active .icon-badge {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}

.icon-badge.urgent {
  background: #fef08a;
  color: #92400e;
}

.trip-icon-btn.active .icon-badge.urgent {
  background: #fef08a;
  color: #92400e;
}

.trip-filter-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.trip-filter-select {
  min-width: 170px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

input.trip-search-input {
  flex: 0 0 auto;
  width: 172px;
  height: 36px;
  padding: 0 12px 0 32px;
  font-size: 13px;
  color: #1e293b;
  background-color: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: width 0.24s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 14px 14px;
}

input.trip-search-input:hover {
  width: 260px;
  background-color: #ffffff;
  border-color: #bfdbfe;
}

input.trip-search-input:focus {
  width: 280px;
  background-color: #ffffff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

input.trip-search-input::placeholder {
  color: #94a3b8;
}

/* Scoped overrides to avoid stale generic rules affecting HomePage trip controls */

.trip-management-card .trip-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trip-management-card .trip-filter-controls {
  flex: 1 1 auto;
  min-width: 0;
}

.trip-management-card .trip-filter-row input.trip-search-input {
  flex: 0 0 auto;
  margin-left: auto;
}

.trip-management-card .trip-status-row .trip-icon-filters {
  overflow: visible;
}

.trip-management-card .trip-filter-row .trip-icon-filters {
  overflow-x: auto;
  overflow-y: hidden;
}

.trip-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trip-active-filter-pill {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.trip-active-filter-pill:hover {
  background: #eef2ff;
  border-color: #93c5fd;
}

.trip-reset-filters {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
}

.trip-filter-button {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 8px;
}

.trip-filter-button:hover {
  background: #2563eb;
}

/* Modal Styles */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
}

.modal-body {
  padding: 16px;
}

.filter-section {
  margin-bottom: 16px;
}

.filter-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #374151;
}

.filter-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #e2e8f0;
}

.btn-primary {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.trip-card-grid {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  background: #f8fafb;
  padding: 0;
}

.trip-card-grid {
  overflow-y: visible;
  box-sizing: border-box;
}

.trip-card-grid::-webkit-scrollbar {
  height: 8px;
}

.trip-card-grid::-webkit-scrollbar-track {
  background: transparent;
}

.trip-card-grid::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.trip-card-grid::-webkit-scrollbar-thumb:hover {
  background: #a5b4fc;
}

.trip-card-grid {
  scrollbar-color: #cbd5f5 transparent;
  scrollbar-width: thin;
}

.trip-management {
  overflow: visible;
}

.trip-card {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f9fafb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.trip-card-left {
  display: grid;
  gap: 8px;
}

.trip-card-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.trip-id {
  font-weight: 600;
  color: #1d4ed8;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.trip-customer {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trip-name {
  font-weight: 600;
  font-size: 14px;
}

.trip-meta {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 12px;
}

.trip-type-icon {
  margin: 0;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trip-meta strong {
  font-weight: 500;
  color: #0f172a;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: capitalize;
  background: #fef9c3;
  color: #854d0e;
}

.status-badge.unassigned { background: #fef9c3; color: #854d0e; }

.status-badge.driver_assigned { background: #dbeafe; color: #1d4ed8; }

.status-badge.trip_accepted { background: #dcfce7; color: #166534; }

.status-badge.on_the_way { background: #e0e7ff; color: #3730a3; }

.status-badge.reached_pickup { background: #f0fdf4; color: #166534; }

.status-badge.trip_started { background: #e0f2fe; color: #0369a1; }

.status-badge.trip_completed { background: #dcfce7; color: #166534; }

.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: #e2e8f0;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.06);
}

.status-dot.unassigned { background: #f59e0b; }

.status-dot.driver_assigned { background: #3b82f6; }

.status-dot.trip_accepted { background: #22c55e; }

.status-dot.on_the_way { background: #6366f1; }

.status-dot.reached_pickup { background: #14b8a6; }

.status-dot.trip_started { background: #0ea5e9; }

.status-dot.trip_completed { background: #16a34a; }

.status-dot.cancelled { background: #ef4444; }

/* Base button styles */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  width: auto;
  min-width: fit-content;
  height: 28px;
  box-sizing: border-box;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Small button size */

.small-btn {
  padding: 0 8px;
  font-size: 11px;
  height: 24px;
  border-radius: 8px;
}

/* Button variants */

.btn-primary {
  background: #1d4ed8;
  color: #fff;
  border-radius: 12px;
}

.btn-primary:hover:not(:disabled) {
  background: #1e40af;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 12px;
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border-radius: 12px;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-ghost {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border-radius: 12px;
}

.btn-success:hover:not(:disabled) {
  background: #15803d;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
  border-radius: 12px;
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.trip-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
  margin-bottom: 16px;
  font-size: 12px;
  table-layout: auto;
}

.trip-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
}

.trip-table thead th {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  padding: 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  text-align: center;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.trip-table th.trip-type-header { width: 8%; }

.trip-table th.trip-customer-header { width: 15%; }

.trip-table th.trip-location-header { width: 20%; }

.trip-table th.trip-time-header { width: 12%; }

.trip-table th.trip-status-header { width: 10%; }

.trip-table th.trip-driver-header { width: 15%; }

.trip-table th.trip-start-time-header { width: 10%; }

.trip-table th.trip-end-time-header { width: 10%; }

.trip-table th.trip-days-header { width: 6%; }

.trip-table th.trip-actions-header { width: 10%; }

.trip-table td {
  padding: 14px 12px;
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle;
  overflow: visible;
}

.trip-driver-cell {
  overflow: visible;
}

@media (max-width: 1024px) {
  .trip-table thead th {
    font-size: 11px;
    padding: 10px 8px;
  }

  .trip-table td {
    padding: 12px 8px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .trip-table thead th {
    font-size: 10px;
    padding: 8px 6px;
  }

  .trip-table td {
    padding: 10px 6px;
    font-size: 10px;
  }
}

.trip-table tbody {
  display: table-row-group;
  width: 100%;
}

.trip-table tbody tr {
  display: table-row;
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.trip-table tbody tr:hover {
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.trip-table tbody tr td {
  display: table-cell;
  align-items: center;
  text-align: left;
  padding: 14px 12px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  height: 56px;
}

.trip-driver-cell {
  overflow: visible !important;
}

.trip-action-cell {
  overflow: visible;
  white-space: normal;
  justify-content: center;
}

.trip-table tbody tr td.trip-type,
.trip-table tbody tr td.trip-customer-cell {
  overflow: visible;
}

.trip-table-container {
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
}

.trip-table-container::-webkit-scrollbar {
  height: 8px;
}

.trip-table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.trip-table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.trip-table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.trip-action-cell .trip-actions,
.trip-actions-cell .trip-actions,
.trip-actions-cell > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
}

.trip-table tbody tr td .tooltip-wrap {
  overflow: visible;
}

.trip-table tbody tr td .tooltip {
  z-index: 50;
}

.trip-table .trip-time {
  white-space: normal;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-time-line {
  color: #64748b;
  font-size: 11px;
  display: block;
}

.trip-start-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-start-time-header {
  text-align: center;
}

.trip-fare-header {
  text-align: center;
}

.trip-fare-cell {
  text-align: center;
}

.fare-amount {
  font-weight: 600;
  color: #2E7D32;
  font-size: 14px;
}

.trip-assign-header {
  text-align: center;
  vertical-align: middle;
  padding-left: 12px;
}

.trip-customer-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 250px;
}

.trip-customer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}

.trip-customer-sub {
  font-size: 11px;
  color: #94a3b8;
}

.trip-location {
  font-size: 12px;
  color: #334155;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trip-location-line {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.trip-location-sub {
  font-size: 11px;
  color: #94a3b8;
}

.trip-customer-location {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-table td.trip-location {
  white-space: normal !important;
  overflow: visible;
  text-overflow: clip;
}

.driver-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.driver-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #e0e7ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.driver-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.driver-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.driver-display-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  flex-shrink: 0;
}

.driver-display-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-phone {
  font-size: 11px;
  color: #94a3b8;
}

.driver-eta,
.driver-updated {
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.driver-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #0f172a;
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  z-index: 10;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.tooltip-wrap:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.driver-action {
  display: flex;
  justify-content: flex-end;
}

.driver-availability-table .table-row.driver-row-compact {
  transition: background 0.2s ease;
}

.driver-availability-table .table-row.driver-row-compact:hover {
  background: #f8fafc;
}

.driver-availability-table {
  overflow: visible;
}

.status-dot.available { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }

.status-dot.booked { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); }

.status-dot.soon { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }

.status-dot.unavailable { background: #94a3b8; box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2); }

/* Status dot colors for new enum values */

.status-dot.unassigned { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }

.status-dot.driver_assigned { background: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

.status-dot.trip_accepted { background: #0ea5e9; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2); }

.status-dot.on_the_way { background: #8b5cf6; box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2); }

.status-dot.reached_pickup { background: #14b8a6; box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2); }

.status-dot.trip_started { background: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

.status-dot.trip_completed { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }

.status-dot.cancelled { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-pill.unassigned { background: #fef3c7; color: #92400e; }

.status-pill.driver_assigned { background: #dbeafe; color: #1d4ed8; }

.status-pill.trip_accepted { background: #dcfce7; color: #166534; }

.status-pill.on_the_way { background: #e0e7ff; color: #3730a3; }

.status-pill.reached_pickup { background: #f0fdf4; color: #166534; }

.status-pill.trip_started { background: #e0f2fe; color: #0369a1; }

.status-pill.trip_completed { background: #dcfce7; color: #166534; }

.status-pill.cancelled { background: #fee2e2; color: #991b1b; }

.trip-type {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trip-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.trip-type-icon:hover {
  transform: translateY(-1px) scale(1.08);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.18);
}

.btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 10px;
  border-radius: 12px;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}

.btn-view:hover {
  background: #c7d2fe;
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: auto;
  min-width: fit-content;
  height: 28px;
  box-sizing: border-box;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-radius: 12px;
  background: #10b981;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: auto;
  min-width: fit-content;
  height: 28px;
  box-sizing: border-box;
}

.btn-cancel:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-start:hover:not(:disabled) {
  background: #059669;
}

.btn-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-assign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: auto;
  min-width: fit-content;
  height: 28px;
  box-sizing: border-box;
}

.btn-assign:hover:not(:disabled) {
  background: #2563eb;
}

.btn-assign:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-extend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.16);
}

.btn-extend:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.btn-extend:active {
  transform: translateY(0);
}

.btn-extend:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.trip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn-unassign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}

.btn-unassign:hover {
  background: #e2e8f0;
}

.btn-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}

.btn-complete:hover {
  background: #bbf7d0;
}

.btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}

.btn-warning:hover {
  background: #fde68a;
}

@media (max-width: 1024px) {
  .trip-table td {
    padding: 10px 6px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .trip-table {
    font-size: 11px;
  }

  .trip-table td {
    padding: 8px 6px;
  }

  .modal-backdrop {
    place-items: start center;
    padding: 12px;
  }

  .modal-card {
    width: min(560px, 100%);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  .create-trip-modal {
    max-height: calc(100dvh - 24px);
  }

  .create-trip-form {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  .create-trip-actions {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  width: min(500px, 92vw);
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card .modal-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  width: auto;
}

.modal-card .modal-btn-secondary {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.modal-card .modal-btn-primary {
  border: none;
  background: #3b82f6;
  color: #ffffff;
}

.modal-card .modal-btn-danger {
  border: none;
  background: #ef4444;
  color: #ffffff;
}

.driver-documents-modal {
  width: min(920px, 96vw);
}

.driver-documents-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.driver-documents-summary {
  margin: 0;
}

.driver-documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.driver-document-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.driver-document-card-head h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.driver-document-card-head span {
  font-size: 12px;
}

.driver-doc-preview-link {
  display: block;
}

.driver-doc-preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.driver-doc-preview-frame {
  width: 100%;
  height: 220px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.driver-doc-open-link {
  font-size: 13px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}

.driver-doc-open-link:hover {
  text-decoration: underline;
}

.driver-document-missing {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}

.driver-documents-error {
  padding: 10px 12px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 13px;
}

.driver-documents-footer {
  display: flex;
  justify-content: flex-end;
}

.create-trip-modal {
  display: flex;
  flex-direction: column;
}

.create-trip-form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.compact-create-trip-form {
  gap: 6px;
}

.compact-create-trip-form input:not([type="checkbox"]),
.compact-create-trip-form select,
.compact-create-trip-form button {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.compact-create-trip-form .muted {
  font-size: 11px;
}

.create-trip-customer-search {
  position: relative;
  width: 100%;
}

.create-trip-customer-search-input {
  width: 100%;
}

.create-trip-customer-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1200;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.create-trip-customer-suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.create-trip-customer-suggestion:last-child {
  border-bottom: none;
}

.create-trip-customer-suggestion:hover,
.create-trip-customer-suggestion--active {
  background: #f1f5f9;
}

.create-trip-customer-suggestion-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.create-trip-customer-suggestion-meta {
  font-size: 12px;
  color: #64748b;
}

.create-trip-customer-suggestion-location {
  font-size: 11px;
  color: #94a3b8;
}

.customer-search-mark {
  background: #fef08a;
  color: inherit;
  padding: 0;
}

@media (min-width: 980px) {
  .compact-create-trip-form:not(.create-trip-form--v2) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    align-items: start;
  }

  .compact-create-trip-form .create-trip-section-title,
  .compact-create-trip-form .create-trip-field-span,
  .compact-create-trip-form .create-trip-customer-search,
  .compact-create-trip-form .create-trip-outstation-block,
  .compact-create-trip-form .action-wrap,
  .compact-create-trip-form > datalist,
  .compact-create-trip-form > input[type="hidden"] {
    grid-column: 1 / -1;
  }

  .compact-create-trip-form .create-trip-inline-checkbox {
    grid-column: 1 / -1;
  }

  .compact-create-trip-form .create-trip-actions {
    grid-column: 1 / -1;
  }

  .compact-create-trip-form input[name="customerAddress"],
  .compact-create-trip-form input[name="customerPickupAddress"],
  .compact-create-trip-form input[name="customerDropAddress"] {
    grid-column: 1 / -1;
  }
}

.create-trip-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  margin: 4px 0 1px;
}

.compact-create-trip-form .create-trip-field-span {
  grid-column: 1 / -1;
}

.compact-create-trip-form .create-trip-field-row {
  display: grid;
  gap: 8px 10px;
  grid-column: 1 / -1;
  align-items: end;
}

.compact-create-trip-form .create-trip-field-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-create-trip-form .create-trip-field-row--3 {
  grid-template-columns: minmax(100px, 120px) minmax(0, 1fr) auto;
  align-items: stretch;
}

.compact-create-trip-form .create-trip-actions button,
.compact-create-trip-form .create-trip-field-row .btn-primary {
  width: auto;
  min-width: 0;
  white-space: nowrap;
  transform: none;
}

.compact-create-trip-form .create-trip-field-row .btn-primary {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: #1d4ed8;
  color: #fff;
}

.compact-create-trip-form .create-trip-field-row .btn-primary:hover {
  background: #2563eb;
  transform: none;
}

.compact-create-trip-form .create-trip-field-row .btn-primary:active {
  transform: none;
}

.compact-create-trip-form .create-trip-field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.compact-create-trip-form .create-trip-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.create-trip-field-hint {
  font-size: 11px;
  color: #64748b;
  margin: -4px 0 4px;
  line-height: 1.35;
}

.sector-suggestion-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 6px;
}

.sector-suggestion-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.sector-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sector-suggestion-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  min-height: 36px;
}

.sector-suggestion-chip:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.sector-suggestion-chip--active {
  border-color: #2563eb;
  background: #dbeafe;
}

.sector-suggestion-chip-label {
  font-weight: 600;
}

.sector-suggestion-chip-detail {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

.compact-create-trip-form .create-trip-schedule {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compact-create-trip-form .create-trip-outstation-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 1 / -1;
}

.outstation-city-select {
  position: relative;
  width: 100%;
}

.outstation-city-select > input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

.outstation-city-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1100;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.outstation-city-select-menu .outstation-city-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transform: none;
}

.outstation-city-select-option:hover,
.outstation-city-select-option:focus-visible {
  background: #f8fafc;
}

.outstation-city-select-option--custom {
  color: #166534;
  background: #f0fdf4;
  font-weight: 600;
}

.outstation-city-select-option--custom:hover {
  background: #dcfce7;
}

.outstation-city-select-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 999px;
}

.outstation-city-select-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #64748b;
}

.compact-create-trip-form .create-trip-inline-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 12px;
}

@media (max-width: 640px) {
  .compact-create-trip-form .create-trip-field-row--2,
  .compact-create-trip-form .create-trip-schedule {
    grid-template-columns: 1fr;
  }

  .compact-create-trip-form .create-trip-field-row--3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .compact-create-trip-form .create-trip-field-row--3 .btn-primary {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

.create-trip-modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.create-trip-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #e2e8f0;
  z-index: 2;
}

/* Create trip — v2 (compact modal form) */

.create-trip-modal--v2 {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(90dvh, 820px);
  padding: 0;
  overflow: hidden;
}

.create-trip-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.create-trip-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.create-trip-modal-head-text h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.create-trip-modal-subtitle {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.create-trip-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.create-trip-modal-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.create-trip-modal-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.create-trip-form--v2 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
  margin: 0;
  padding: 0;
}

.create-trip-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
}

.create-trip-section {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.create-trip-section:last-child {
  border-bottom: none;
  padding-bottom: 10px;
}

.create-trip-section .create-trip-section-title {
  margin: 0 0 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.create-trip-section-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.create-trip-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.create-trip-form--v2 input:not([type="checkbox"]),
.create-trip-form--v2 select,
.create-trip-form--v2 .create-trip-customer-search-input {
  padding: 6px 8px;
  font-size: 12px;
  min-height: 32px;
  border-radius: 6px;
}

.create-trip-grid--contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: start;
}

.create-trip-grid-full {
  grid-column: 1 / -1;
}

.create-trip-location-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 2px;
}

.create-trip-inline-checkbox--compact {
  font-size: 11px;
  color: #64748b;
}

.create-trip-form--v2 .sector-suggestion-row {
  margin: 2px 0 0;
  gap: 4px;
}

.create-trip-form--v2 .sector-suggestion-chip {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.create-trip-form--v2 .sector-suggestion-label {
  font-size: 10px;
}

.create-trip-field input,
.create-trip-field .create-trip-customer-search-input,
.create-trip-form--v2 .outstation-city-select > input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

.create-trip-form--v2 .create-trip-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.create-trip-grid {
  display: grid;
  gap: 8px;
}

.create-trip-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.create-trip-grid--sector {
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
}

.create-trip-grid--3 {
  grid-template-columns: 72px 1fr auto;
  align-items: end;
}

/* Override global `button { width: 100% }` inside create-trip form */

.create-trip-form--v2 button.create-trip-type-chip,
.create-trip-form--v2 .datetime-local-now-btn,
.create-trip-form--v2 .sector-suggestion-chip,
.create-trip-modal--v2 .create-trip-modal-close {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none;
  box-sizing: border-box;
}

/* Keep unselected trip type chips neutral despite legacy `.form button` defaults */

.create-trip-form--v2 button.create-trip-type-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
}

.create-trip-form--v2 button.create-trip-customer-suggestion {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  color: inherit;
  border-radius: 0;
  padding: 10px 12px;
}

.create-trip-form--v2 button.create-trip-type-chip:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  color: #334155;
}

.create-trip-form--v2 button.create-trip-customer-suggestion:hover,
.create-trip-form--v2 button.create-trip-customer-suggestion.create-trip-customer-suggestion--active {
  background: #f1f5f9;
  color: inherit;
}

.create-trip-form--v2 button.create-trip-type-chip.create-trip-type-chip--active,
.create-trip-form--v2 button.create-trip-type-chip.create-trip-type-chip--active:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.create-trip-form--v2 button.create-trip-type-chip:hover,
.create-trip-form--v2 .datetime-local-now-btn:hover {
  transform: none;
}

.create-trip-type-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.create-trip-type-chip {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.create-trip-type-chip:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.create-trip-type-chip:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.create-trip-type-chip--active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.create-trip-vehicle-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 32px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.create-trip-vehicle-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.create-trip-vehicle-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #2563eb;
}

.create-trip-field-hint--inline {
  margin: 0;
  font-size: 0.6875rem;
}

@media (min-width: 520px) {
  .create-trip-grid--contact {
    grid-template-columns: 1.1fr 1fr 0.95fr;
  }

  .create-trip-grid--contact .create-trip-grid-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 519px) {
  .create-trip-field--alt {
    grid-column: 1 / -1;
  }
}

.create-trip-schedule-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.create-trip-hours-field {
  max-width: 120px;
}

.create-trip-form--v2 .datetime-local-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.create-trip-form--v2 .datetime-local-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.create-trip-form--v2 .datetime-local-mui-picker,
.create-trip-form--v2 .datetime-local-mui-picker .MuiPickersTextField-root {
  width: 100%;
  min-width: 0;
}

.create-trip-form--v2 .datetime-local-mui-picker--compact .MuiPickersOutlinedInput-root {
  min-height: 36px;
}

.create-trip-form--v2 .datetime-local-now-btn {
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  font-size: 12px;
}

@media (min-width: 480px) {
  .create-trip-schedule-block:has(.create-trip-hours-field) {
    grid-template-columns: minmax(0, 1fr) 100px;
    align-items: end;
  }
}

.create-trip-form--v2 .create-trip-inline-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 12px;
  color: #475569;
}

.create-trip-form--v2 .sector-suggestion-row {
  margin: 0;
}

.create-trip-form--v2 .create-trip-outstation-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-trip-refresh-km {
  min-height: 36px;
  padding: 6px 12px;
  white-space: nowrap;
}

.create-trip-form--v2 .create-trip-actions {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  position: static;
}

.create-trip-form--v2 .create-trip-actions .btn-primary,
.create-trip-form--v2 .create-trip-actions .btn-ghost {
  width: auto;
  min-width: 100px;
}

@media (max-width: 520px) {
  .create-trip-modal--v2 {
    width: 100%;
    max-height: 96dvh;
  }

  .create-trip-grid--2,
  .create-trip-grid--contact,
  .create-trip-grid--sector,
  .create-trip-grid--3 {
    grid-template-columns: 1fr;
  }

  .create-trip-schedule-block:has(.create-trip-hours-field) {
    grid-template-columns: 1fr;
  }

  .create-trip-hours-field {
    max-width: none;
  }

  .create-trip-grid--3 .create-trip-refresh-km {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .modal-backdrop {
    padding: 8px;
  }

  .create-trip-modal {
    padding: 12px;
    border-radius: 12px;
    max-height: calc(100dvh - 16px);
  }

  .create-trip-modal .modal-head {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .create-trip-form {
    gap: 6px;
  }

  .create-trip-section-title {
    margin: 4px 0 1px;
    font-size: 10px;
  }

  .create-trip-actions {
    margin-top: 8px;
    padding-top: 8px;
  }

  .create-trip-actions button {
    padding: 9px 10px;
    font-size: 13px;
  }
}

.mobile-menu {
  width: 90vw;
  max-width: 300px;
  padding: 20px;
}

.mobile-menu .nav {
  flex-direction: column;
  gap: 10px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-subtitle {
  color: #475569;
  margin: 6px 0 10px;
  font-size: 12px;
}

.modal-trip-details {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f1f5f9;
  margin-bottom: 12px;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cancel-reason {
  margin-bottom: 12px;
}

.cancel-reason textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  resize: vertical;
  font-family: inherit;
  font-size: 12px;
}

.map-frame {
  width: 100%;
  height: min(60vh, 520px);
  border: 0;
  border-radius: 12px;
}

.tracking-page {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.tracking-header {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-title-wrap h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.tracking-updated-at {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.tracking-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tracking-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, auto));
  gap: 8px;
}

.tracking-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 8px;
  text-align: center;
}

.tracking-stat-value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}

.tracking-stat-value.map {
  color: #2563eb;
}

.tracking-stat-value.all {
  color: #475569;
}

.tracking-stat-value.online {
  color: #16a34a;
}

.tracking-stat-value.offline {
  color: #64748b;
}

.tracking-stat-label {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.tracking-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracking-mobile-toggle {
  display: none;
}

.tracking-mobile-toggle-btn {
  width: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tracking-mobile-toggle-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
}

.tracking-select {
  width: auto;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.tracking-follow-toggle {
  width: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tracking-follow-toggle.active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

/* Sidebar tabs */

.tracking-list-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #e2e8f0;
}

.tracking-tab-btn {
  padding: 10px 8px;
  border: none;
  border-bottom: 2px solid transparent;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tracking-tab-btn.active {
  background: #fff;
  color: #1d4ed8;
  border-bottom-color: #2563eb;
}

/* Trip card badge */

.tracking-status-badge.trip-unassigned {
  background: #fff7ed;
  color: #c2410c;
}

.tracking-driver-card.trip-selected {
  background: #fff7ed;
  border-color: #fb923c;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.3);
}

/* Assignment panel */

.tracking-assign-panel {
  border-top: 2px solid #f97316;
  background: #fff;
  max-height: none;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
  position: static;
  z-index: auto;
  box-shadow: none;
}

.tracking-assign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff7ed;
  font-size: 13px;
  font-weight: 700;
  color: #c2410c;
}

.tracking-assign-close {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

.tracking-assign-trip {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}

.tracking-assign-section {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.tracking-assign-driver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}

.tracking-assign-driver-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.tracking-assign-driver-meta {
  font-size: 11px;
  color: #64748b;
}

.tracking-assign-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.tracking-assign-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tracking-assign-btn.secondary {
  background: #e2e8f0;
  color: #334155;
}

.tracking-assign-show-more {
  width: 100%;
  padding: 8px;
  border: none;
  background: #f8fafc;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid #e2e8f0;
}

.tracking-assign-show-more:hover {
  background: #eff6ff;
}

.tracking-assign-success {
  padding: 10px 12px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #bbf7d0;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tracking-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
}

.tracking-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  align-items: stretch;
}

.tracking-list-panel,
.tracking-map-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
}

.tracking-list-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  padding-bottom: 12px;
}

.tracking-list-head {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tracking-list-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.tracking-list-body {
  padding: 10px;
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 12px;
}

.tracking-list-body::-webkit-scrollbar {
  width: 8px;
}

.tracking-list-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.tracking-list-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

.tracking-list-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.tracking-driver-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tracking-driver-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tracking-driver-card.selected {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.tracking-driver-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tracking-driver-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tracking-driver-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-status-badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.tracking-status-badge.online {
  background: #dcfce7;
  color: #166534;
}

.tracking-status-badge.offline {
  background: #f1f5f9;
  color: #475569;
}

.tracking-status-badge.blocked,
.tracking-status-badge.busy {
  background: #fef3c7;
  color: #92400e;
}

.tracking-driver-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
}

.tracking-driver-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tracking-driver-time.warn {
  color: #d97706;
}

.tracking-stale {
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
}

.tracking-empty {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 13px;
}

.tracking-map-panel {
  min-height: 0;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.tracking-map {
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.tracking-popup {
  min-width: 180px;
}

.tracking-popup-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #0f172a;
}

.tracking-popup-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.tracking-popup-time {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.tracking-popup-time.warn {
  color: #d97706;
}

@media (max-width: 1024px) {
  .tracking-main {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .tracking-stats {
    grid-template-columns: repeat(2, minmax(60px, auto));
  }
}

@media (max-width: 768px) {
  .tracking-page {
    padding: 6px 8px;
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .tracking-header {
    flex-direction: column;
    align-items: stretch;
  }

  .tracking-header-right {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

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

  .tracking-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tracking-mobile-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .tracking-select {
    width: 100%;
    min-width: 0;
  }

  .tracking-follow-toggle {
    width: 100%;
  }

  .tracking-assign-panel {
    max-height: none;
    position: static;
    box-shadow: none;
  }

  .tracking-main {
    grid-template-columns: 1fr;
  }

  .tracking-list-panel.mobile-hidden,
  .tracking-map-panel.mobile-hidden {
    display: none;
  }

  .tracking-list-panel {
    max-height: 320px;
    overflow: hidden;
  }

  .tracking-map-panel {
    min-height: 52vh;
  }
}

.error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: 10px; padding: 10px; margin-bottom: 10px; }

.success { color: #166534; }

.muted { color: #64748b; font-size: 12px; }

.missing-list { margin: 12px 0; padding-left: 18px; }

.missing-list li { margin-bottom: 6px; }

.operations-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.ride-creation {
  grid-column: span 1;
}

.operations-grid .card {
  margin-bottom: 0;
}

.trip-driver-hub {
  grid-column: span 1;
}

.trip-driver-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr;
  gap: 16px;
}

.trip-hub-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.trip-detail-panel {
  display: grid;
  gap: 12px;
}

.trip-detail-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.trip-detail-card {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.trip-detail-dropdown {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 8px 12px;
}

.trip-detail-dropdown + .trip-detail-dropdown {
  margin-top: 10px;
}

.trip-detail-dropdown summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.trip-detail-dropdown summary::-webkit-details-marker {
  display: none;
}

.trip-detail-dropdown summary::before {
  content: "▸";
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.trip-detail-dropdown[open] summary::before {
  transform: rotate(90deg);
}

.trip-detail-dropdown > *:not(summary) {
  margin-top: 10px;
}

.trip-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.trip-detail-label {
  color: #64748b;
  font-weight: 500;
}

.trip-detail-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #0f172a;
}

.trip-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-detail-actions .btn-cancel,
.trip-detail-actions .btn-complete {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
}

.trip-detail-drivers {
  display: grid;
  gap: 10px;
}

.driver-selection.simplified {
  display: grid;
  gap: 10px;
}

.driver-selection.simplified .assignment-controls {
  margin-top: 4px;
}

.driver-filter-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 8px;
  margin-bottom: 6px;
}

.driver-filter-row input,
.driver-filter-row select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-head h3 {
  margin: 0;
  font-size: 14px;
}

@media (min-width: 741px) {
  .admin-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background:
      linear-gradient(135deg,
        rgba(31, 42, 68, 0.95) 0%,
        rgba(15, 23, 42, 0.9) 25%,
        rgba(30, 41, 59, 0.85) 50%,
        rgba(51, 65, 85, 0.9) 75%,
        rgba(31, 42, 68, 0.95) 100%
      ),
      radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    height: auto;
  }

  .sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      135deg,
      transparent 0%,
      rgba(255, 255, 255, 0.03) 25%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(255, 255, 255, 0.03) 75%,
      transparent 100%
    );
    animation: sidebarGlow 10s ease-in-out infinite;
  }

  .sidebar .brand {
    margin-right: auto;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
  }

  .sidebar .nav {
    flex-direction: row;
    gap: 12px;
    margin: 0;
    align-items: center;
    position: relative;
    z-index: 2;
  }

  .sidebar .nav-item {
    width: auto;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(226, 232, 240, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
  }

  .sidebar .nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
  }

  .sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .sidebar .nav-item:hover::before {
    left: 100%;
  }

  .sidebar .nav-item.active {
    background:
      linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%),
      rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow:
      0 6px 24px rgba(59, 130, 246, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-weight: 600;
  }

  .sidebar .nav-item.active:hover {
    background:
      linear-gradient(135deg, rgba(37, 99, 235, 1) 0%, rgba(29, 78, 216, 1) 100%),
      rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow:
      0 8px 28px rgba(59, 130, 246, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  .sidebar .nav-item.logout {
    margin-top: 0;
    margin-left: auto;
    margin-right: 0;
    background:
      linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%),
      rgba(255, 255, 255, 0.05);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
    box-shadow:
      0 4px 16px rgba(239, 68, 68, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
  }

  .sidebar .nav-item.logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: buttonShimmer 3s infinite;
  }

  .sidebar .nav-item.logout:hover {
    background:
      linear-gradient(135deg, rgba(220, 38, 38, 1) 0%, rgba(185, 28, 28, 1) 100%),
      rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
      0 6px 20px rgba(239, 68, 68, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
  }

  .main-content {
    grid-row: 2;
    grid-column: 1;
    padding: 24px;
    padding-top: calc(24px + 64px);
    background:
      linear-gradient(135deg,
        rgba(248, 250, 252, 0.8) 0%,
        rgba(241, 245, 249, 0.9) 50%,
        rgba(248, 250, 252, 0.8) 100%
      ),
      radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
      radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  }
}

@media (max-width: 740px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }
  .trip-driver-grid {
    grid-template-columns: 1fr;
  }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; }
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
  }
  .header-left { width: 100%; justify-content: space-between; }
  .header-left h1 { font-size: 14px; }
  .logout-btn { align-self: flex-end; padding: 6px 12px; font-size: 12px; }
  .home-columns { grid-template-columns: 1fr; }
  .trip-card { grid-template-columns: 1fr; }
  .trip-card-right { align-items: stretch; }
}

.drivers-page {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 18px;
}

.drivers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drivers-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.drivers-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-bulk-import-modal {
  max-width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.driver-bulk-import-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.driver-bulk-import-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.driver-bulk-import-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-bulk-import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.driver-bulk-import-filename {
  font-size: 12px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-bulk-import-warnings {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  color: #92400e;
}

.driver-bulk-import-warnings p {
  margin: 0 0 6px;
}

.driver-bulk-import-warnings p:last-child {
  margin-bottom: 0;
}

.driver-bulk-import-headers {
  margin: 0;
  font-size: 11px;
}

.driver-bulk-import-preview {
  max-height: min(400px, 50vh);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.driver-bulk-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.driver-bulk-import-table th,
.driver-bulk-import-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.driver-bulk-import-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  z-index: 1;
}

.driver-bulk-import-row-ok {
  color: #15803d;
  font-weight: 600;
}

.driver-bulk-import-row-bad {
  color: #b91c1c;
  font-weight: 600;
}

.driver-bulk-import-row-detail {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  word-break: break-word;
}

.driver-bulk-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.driver-bulk-import-empty {
  margin: 12px 0 0;
  text-align: center;
}

.btn-add-driver {
  width: auto;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
}

.drivers-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.drivers-filters .search {
  min-width: 280px;
}

.drivers-table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 8px 0;
  overflow: hidden;
}

.drivers-table-card .drivers-data-table .data-table-row.drivers-row--blocked {
  background: #fecaca;
  box-shadow: inset 3px 0 0 #dc2626;
}

.drivers-table-card .drivers-data-table .data-table-row.drivers-row--blocked:hover {
  background: #fca5a5;
}

.drivers-table-head,
.drivers-table-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1fr 1fr 1.2fr 1.4fr;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.drivers-table-head {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #eef2f6;
}

.drivers-table-row {
  font-size: 13px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  min-height: 58px;
}

.drivers-table-row:last-child {
  border-bottom: none;
}

.drivers-table-row:hover {
  background: #f8fafc;
}

.drivers-driver-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.drivers-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.drivers-driver-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drivers-driver-name {
  font-weight: 600;
}

.drivers-driver-phone {
  font-size: 11px;
  color: #94a3b8;
}

.drivers-location,
.drivers-vehicle,
.drivers-experience,
.drivers-rating {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drivers-rating {
  color: #0f172a;
}

.drivers-availability-next3 {
  min-width: 72px;
}

.driver-availability-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.driver-availability-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.driver-availability-dot:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.driver-availability-dot--available {
  background: #2e7d32;
}

.driver-availability-dot--leave {
  background: #c62828;
}

.driver-availability-dot--permission {
  background: #ed6c02;
}

.driver-availability-dot--unavailable {
  background: #9ca3af;
}

.driver-availability-popover {
  position: absolute;
  z-index: 1200;
  width: 280px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.driver-availability-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.driver-availability-popover-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.driver-availability-popover-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
}

.driver-availability-popover-nav button {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.driver-availability-popover-loading {
  margin: 0 0 8px;
  font-size: 12px;
}

.driver-availability-cal-weekdays,
.driver-availability-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 11px;
  text-align: center;
}

.driver-availability-cal-weekdays span {
  color: #64748b;
  font-weight: 600;
}

.driver-availability-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
}

.driver-availability-cal-day--empty {
  visibility: hidden;
}

.driver-availability-cal-day--available {
  background: #e8f5e9;
  color: #1b5e20;
}

.driver-availability-cal-day--leave {
  background: #ffebee;
  color: #b71c1c;
}

.driver-availability-cal-day--permission {
  background: #fff3e0;
  color: #e65100;
}

.driver-availability-cal-day--unavailable {
  background: #f1f5f9;
  color: #64748b;
}

.driver-availability-cal-day--present {
  box-shadow: inset 0 0 0 2px #2e7d32;
}

.driver-availability-cal-day--today {
  font-weight: 700;
}

.driver-availability-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
  color: #475569;
}

.driver-availability-legend li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drivers-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.drivers-status.badge-online {
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.drivers-status.badge-offline {
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.drivers-status.badge-blocked {
  background: #f87171;
  color: #7f1d1d;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.drivers-status-toggle {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 11px;
  padding: 0;
  cursor: pointer;
}

.drivers-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}

.drivers-actions .btn.drivers-action-unblock,
.drivers-actions .drivers-action-unblock.btn-ghost {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #991b1b;
}

.drivers-actions .btn.drivers-action-unblock:hover:not(:disabled),
.drivers-actions .drivers-action-unblock.btn-ghost:hover:not(:disabled) {
  background: #991b1b;
  color: #fff;
  border-color: #7f1d1d;
}

.drivers-actions .btn.drivers-action-block,
.drivers-actions .drivers-action-block.btn-ghost {
  background: #16a34a;
  color: #fff;
  border: 1px solid #15803d;
}

.drivers-actions .btn.drivers-action-block:hover:not(:disabled),
.drivers-actions .drivers-action-block.btn-ghost:hover:not(:disabled) {
  background: #15803d;
  color: #fff;
  border-color: #166534;
}

.leave-header-copy p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.leave-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.leave-summary-card {
  padding: 10px;
}

.leave-summary-label {
  margin: 0;
  font-size: 11px;
}

.leave-summary-value {
  margin: 2px 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.leave-date-input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #dbe3ef;
  padding: 0 8px;
  font-size: 12px;
}

.leave-error-card {
  margin-bottom: 12px;
  border-color: #fecaca;
  background: #fff1f2;
}

.leave-error-text {
  margin: 0;
  font-size: 12px;
  color: #9f1239;
}

.leave-loading-text {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.leave-kind-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fee2e2;
  color: #991b1b;
}

.leave-kind-badge--permission {
  background: #ffedd5;
  color: #9a3412;
}

.leave-actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.link-btn {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.link-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.drivers-table-row.empty {
  color: #94a3b8;
}

.customers-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 14px;
  padding: 20px 22px 24px;
  border: 1px solid #e8edf2;
}

.customers-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.customers-page-title-block {
  min-width: 0;
}

.customers-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.customers-page-subtitle {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.45;
}

.customers-add-btn {
  flex-shrink: 0;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.12), 0 4px 12px rgba(29, 78, 216, 0.18);
}

.customers-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.customers-stat-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customers-stat-card--success {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

.customers-stat-card--danger {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.customers-stat-card--info {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
}

.customers-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.customers-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.customers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customers-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: min(100%, 280px);
  max-width: 420px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customers-search:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}

.customers-search-icon {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
}

.customers-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  min-width: 0;
}

.customers-search-input::placeholder {
  color: #94a3b8;
}

.customers-toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

.customers-result-count {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.customers-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customers-filter-chip.chip {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.customers-filter-chip.chip.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.customers-banner {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
}

.customers-banner--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.customers-table-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8edf2;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

.customers-table-card-head {
  padding: 14px 18px 0;
  border-bottom: none;
}

.customers-table-card-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.customers-table-card .customers-data-table .data-table-header,
.customers-table-card .customers-data-table .data-table-row {
  grid-template-columns:
    minmax(200px, 2.2fr)
    minmax(110px, 1.2fr)
    minmax(64px, 0.55fr)
    minmax(96px, 0.75fr)
    minmax(108px, 0.85fr)
    minmax(52px, 0.4fr);
}

.customers-table-card .customers-data-table .data-table-header {
  background: #f8fafc;
  border-bottom: 1px solid #e8edf2;
  padding: 11px 18px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-radius: 0;
}

.customers-table-card .customers-data-table .data-table-row {
  padding: 12px 18px;
  min-height: 64px;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
}

.customers-table-card .customers-data-table .data-table-row.clickable {
  cursor: pointer;
}

.customers-table-card .customers-data-table .data-table-row.clickable:hover {
  background: #f8fafc;
}

.customers-table-card .customers-data-table .data-table-row.customers-row--blocked {
  background: #fffbfb;
}

.customers-table-card .customers-data-table .data-table-row.customers-row--blocked:hover {
  background: #fef2f2;
}

.customers-table-card .customers-data-table .data-table-cell {
  padding: 0 6px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customers-col-actions.data-table-cell {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.customers-table-card .customers-data-table .data-table-row:has(.customers-menu-btn[aria-expanded="true"]) {
  position: relative;
  z-index: 2;
}

.customers-customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.customers-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.customers-customer-cell .stack-cell {
  min-width: 0;
}

.customers-customer-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
}

.customers-customer-phone {
  font-size: 0.75rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.customers-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-size: 0.8125rem;
  color: #334155;
}

.customers-location-icon {
  color: #94a3b8;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.customers-muted {
  color: #94a3b8;
  font-size: 0.8125rem;
}

.customers-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f1f5f9;
  color: #64748b;
}

.customers-metric--filled {
  background: #eff6ff;
  color: #1d4ed8;
}

.customers-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
}

.customers-rating--empty {
  font-weight: 500;
  color: #94a3b8;
}

.customers-rating-star {
  color: #f59e0b;
  font-size: 0.875rem;
  line-height: 1;
}

.customers-rating-value {
  font-variant-numeric: tabular-nums;
}

.customers-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.customers-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.customers-status-pill--active {
  background: #dcfce7;
  color: #166534;
}

.customers-status-pill--active .customers-status-dot {
  background: #22c55e;
}

.customers-status-pill--blocked {
  background: #fee2e2;
  color: #991b1b;
}

.customers-status-pill--blocked .customers-status-dot {
  background: #ef4444;
}

.customers-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.customers-menu-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.customers-menu-btn:hover,
.customers-menu-btn[aria-expanded="true"] {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.customers-menu-icon {
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: 0.05em;
}

.customers-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  min-width: 196px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.customers-menu--portal {
  position: fixed;
  right: auto;
  top: auto;
}

.customers-menu-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  color: #334155;
  transition: background 0.12s ease;
}

.customers-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.customers-menu-item--danger {
  color: #b91c1c;
}

.customers-menu-item--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.customers-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: #e8edf2;
}

.customers-empty {
  padding: 48px 24px 56px;
  text-align: center;
}

.customers-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.customers-empty-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.customers-empty-text {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.menu-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  min-width: 180px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.menu-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  color: #0f172a;
}

.menu-item:hover {
  background: #f1f5f9;
}

.data-table-row.clickable {
  cursor: pointer;
}

@media (max-width: 1024px) {
  .customers-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .customers-page {
    padding: 14px;
  }

  .customers-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-search {
    max-width: none;
  }

  .customers-toolbar-right {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .customers-stats {
    grid-template-columns: 1fr 1fr;
  }

  .customers-table-card .customers-data-table .data-table-header {
    display: none;
  }

  .customers-table-card .customers-data-table .data-table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    margin: 8px 12px;
  }

  .customers-table-card .customers-data-table .data-table-cell::before {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 4px;
  }

  .customers-col-actions.data-table-cell::before {
    display: none;
  }
}

.trips-page {
  width: 100%;
}

.trips-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.trips-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.trips-panel-head-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.trips-panel-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.trips-panel-desc {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.trips-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.trips-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.trips-filters {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.trips-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 640px) {
  .trips-filters-grid {
    grid-template-columns: minmax(10rem, 12rem) minmax(11rem, 14rem) minmax(0, 1fr) auto;
  }
}

.trips-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.trips-filter-field--grow {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .trips-filter-field--grow {
    grid-column: auto;
  }
}

.trips-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trips-month-input,
.trips-select,
.trips-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: #fff;
  color: #0f172a;
}

.trips-month-input:focus,
.trips-select:focus,
.trips-search:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.trips-filters-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.trips-filters-actions .trips-btn {
  width: auto;
  min-width: 7.5rem;
}

.trips-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.trips-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.trips-btn--secondary {
  background: #fff;
  border-color: #cbd5e1;
  color: #1d4ed8;
}

.trips-btn--secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.trips-btn--secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trips-btn--ghost {
  background: transparent;
  border-color: #e2e8f0;
  color: #475569;
}

.trips-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
}

.trips-btn--ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trips-limit-note {
  margin: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.8rem;
  color: #b45309;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.trips-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
}

.trips-data-table.data-table {
  min-width: 960px;
}

.trips-data-table .data-table-header {
  background: #eff6ff;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.trips-cell-muted {
  color: #94a3b8;
  font-size: 0.85rem;
}

.trips-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.trips-status-pill--unassigned {
  background: #f1f5f9;
  color: #64748b;
}

.trips-status-pill--active {
  background: #dbeafe;
  color: #1d4ed8;
}

.trips-status-pill--completed {
  background: #dcfce7;
  color: #166534;
}

.trips-status-pill--cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.trips-table-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 4px 0;
  overflow: auto;
}

.trips-table-head,
.trips-table-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.7fr);
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  min-width: 0;
}

.trips-table-head {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #eef2f6;
}

.trips-table-row {
  font-size: 12px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  min-height: 48px;
}

.trips-table-row:last-child {
  border-bottom: none;
}

.trips-table-row:hover {
  background: #f8fafc;
}

.trip-id-cell {
  font-weight: 600;
  color: #1d4ed8;
}

.trip-customer-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trip-customer-name {
  font-weight: 600;
}

.trip-customer-phone {
  font-size: 11px;
  color: #94a3b8;
}

.trip-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  width: fit-content;
}

.trip-pickup,
.trip-drop,
.trip-datetime,
.trip-fare {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-driver {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-driver-name {
  font-weight: 600;
}

.trip-driver-phone {
  font-size: 11px;
  color: #94a3b8;
}

/* DataTable styles */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
  min-width: 0;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 12px 16px;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table-header > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.data-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
  min-width: 0;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.15s ease;
}

.data-table-row:hover {
  background: #f8fafc;
}

.data-table-row:last-child {
  border-bottom: none;
}

.data-table-cell {
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 768px) {
  .drivers-header,
  .trip-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .drivers-filters,
  .trip-toggle,
  .trip-chips {
    align-items: stretch;
  }

  .drivers-filters .search-wrap,
  .drivers-filters .search,
  .trip-header > * {
    width: 100%;
  }

  .filter-chips,
  .trip-toggle,
  .trip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .trip-status-row,
  .trip-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .trip-shown-count {
    margin-left: 0;
  }

  .trip-filter-controls {
    width: 100%;
  }

  .trip-filter-select {
    flex: 1;
  }

  input.trip-search-input {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  }

  .trip-management-card .trip-filter-row input.trip-search-input {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }

  .filter-options {
    flex-direction: column;
    gap: 8px;
  }

  .drivers-table-card,
  .trips-table-card {
    padding: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .data-table {
    display: grid;
    gap: 12px;
  }

  .data-table-header {
    display: none;
  }

  .data-table-row {
    display: block;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .data-table-cell {
    display: grid;
    grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100% !important;
    padding: 8px 0;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    border-bottom: 1px solid #f1f5f9;
  }

  .data-table-cell:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .data-table-cell::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
  }

  .stack-cell,
  .action-cell {
    min-width: 0;
  }

  .action-cell {
    justify-content: flex-start;
  }
}

/* StackCell styling for multi-line display */

.stack-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stack-primary {
  font-weight: 500;
  color: #1e293b;
}

.stack-secondary {
  font-size: 11px;
  color: #64748b;
}

/* Status badges with colors */

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.unassigned { background: #fef3c7; color: #92400e; }

.status-badge.driver_assigned { background: #dbeafe; color: #1d4ed8; }

.status-badge.trip_accepted { background: #e0f2fe; color: #0369a1; }

.status-badge.on_the_way { background: #ede9fe; color: #5b21b6; }

.status-badge.reached_pickup { background: #ccfbf1; color: #115e59; }

.status-badge.trip_started { background: #dbeafe; color: #1d4ed8; }

.status-badge.trip_completed { background: #dcfce7; color: #166534; }

.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

/* Trip Table Column Headers */

.trip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.trip-table thead th {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.trip-table tbody td {
  padding: 16px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.trip-table tbody tr:hover {
  background: #f8fafc;
}

/* Trip ID Cell */

.trip-id-cell {
  min-width: 100px;
}

.trip-id {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

/* Trip Type Badge (below ID) */

.trip-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
}

.trip-type-badge.local { background: #dcfce7; color: #166534; }

.trip-type-badge.outstation { background: #ede9fe; color: #5b21b6; }

.trip-type-badge.pickup_drop { background: #dbeafe; color: #1d4ed8; }

.trip-type-badge.bulk { background: #fef3c7; color: #92400e; }

.trip-type-badge.daily { background: #f1f5f9; color: #475569; }

/* Trip Type Pill (in type column) */

.trip-type-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.trip-type-pill.local { background: #dcfce7; color: #166534; }

.trip-type-pill.outstation { background: #ede9fe; color: #5b21b6; }

.trip-type-pill.pickup_drop { background: #dbeafe; color: #1d4ed8; }

.trip-type-pill.bulk { background: #fef3c7; color: #92400e; }

.trip-type-pill.daily { background: #f1f5f9; color: #475569; }

/* Customer Cell */

.trip-customer-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.trip-customer-phone {
  font-size: 12px;
  color: #64748b;
}

/* Location Cells (Pickup/Drop) */

.trip-location-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Date & Time Cell */

.trip-datetime {
  display: flex;
  flex-direction: column;
}

.trip-date {
  font-weight: 500;
  color: #0f172a;
}

.trip-time {
  font-size: 12px;
  color: #64748b;
}

/* Driver Cell */

.trip-driver {
  font-weight: 500;
  color: #0f172a;
}

.trip-driver-unassigned {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

/* Column Widths */

.trip-id-header, .trip-id-cell { width: 100px; min-width: 100px; }

.trip-type-header, .trip-type-cell { width: 90px; min-width: 90px; }

.trip-customer-header, .trip-customer-cell { width: 140px; min-width: 140px; }

.trip-location-header, .trip-location { width: 150px; min-width: 150px; }

.trip-status-header, .trip-status-cell { width: 110px; min-width: 110px; }

.trip-driver-header, .trip-driver-cell { width: 120px; min-width: 120px; }

.trip-start-time-header, .trip-start-time-cell { width: 130px; min-width: 130px; }

.trip-time-header, .trip-time { width: 120px; min-width: 120px; }

.trip-actions-header, .trip-actions-cell { width: 140px; min-width: 140px; text-align: center; }

/* Status badge in table cell */

.trip-status-cell .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: capitalize;
  white-space: nowrap;
}

/* Driver cell styling */

.trip-driver-cell {
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
}

/* Start time cell styling */

.trip-start-time-cell {
  font-size: 12px;
  color: #64748b;
  font-family: 'Poppins', sans-serif;
}

/* Center align status, driver, and start time columns */

.trip-table th.trip-status-header,
.trip-table td.trip-status-cell,
.trip-table th.trip-driver-header,
.trip-table td.trip-driver-cell,
.trip-table th.trip-start-time-header,
.trip-table td.trip-start-time-cell {
  text-align: center;
}

/* Outstation Day Manager Styles */

.outstation-day-manager {
  margin-top: 12px;
  padding: 12px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.outstation-day-manager h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.outstation-day-manager .day-badge {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.tracking-list-panel::-webkit-scrollbar {
  width: 8px;
}

.tracking-list-panel::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.tracking-list-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

.tracking-list-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.outstation-day-manager .day-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.outstation-day-manager .day-item.completed {
  background-color: #E8F5E9;
  border-color: #4CAF50;
}

.outstation-day-manager .day-item.in-progress {
  background-color: #FFF3E0;
  border-color: #FF9800;
}

.outstation-day-manager .day-item.current {
  background-color: #E3F2FD;
  border-color: #2196F3;
}

.outstation-day-manager .day-item .day-status {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
}

.outstation-day-manager .day-item .day-status.completed {
  color: #4CAF50;
}

.outstation-day-manager .day-item .day-status.in-progress {
  color: #FF9800;
}

.outstation-day-manager .day-item .day-status.current {
  color: #2196F3;
}

.outstation-day-manager .day-item .day-status.pending {
  color: #666;
}

.outstation-day-manager .day-item .day-time {
  color: #666;
  font-size: 10px;
}

.outstation-day-manager .day-item button {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.outstation-day-manager .day-item button.start {
  background-color: #2196F3;
  color: white;
}

.outstation-day-manager .day-item button.end {
  background-color: #FF9800;
  color: white;
}

.outstation-day-manager .day-item button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trip-days-header, .trip-days-cell {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center;
}

.trip-days-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.trip-assign-header, .trip-assign-cell {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.trip-actions-header, .trip-action-cell, .trip-actions-cell {
  width: 140px;
  min-width: 140px;
  text-align: center;
}

.trip-type-header, .trip-type {
  width: 60px;
  min-width: 60px;
}

.trip-customer-header, .trip-customer-cell {
  width: 120px;
  min-width: 120px;
}

.trip-location-header, .trip-location {
  width: 150px;
  min-width: 150px;
}

.trip-time-header, .trip-time {
  width: 100px;
  min-width: 100px;
}

.trip-status-header, .trip-status {
  width: 100px;
  min-width: 100px;
}

.trip-start-time-header {
  width: 100px;
  min-width: 100px;
}

.trips-table-row.empty {
  color: #94a3b8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.payments-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.25rem 0 1.5rem;
  max-width: 1400px;
}

.payments-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.payments-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.payments-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
  max-width: 36rem;
}

.payments-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.payments-month-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.payments-month-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payments-month-input {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
}

.payments-month-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.payments-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .payments-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .payments-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.payments-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.payments-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payments-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.payments-kpi--revenue { border-top: 3px solid #2563eb; }

.payments-kpi--commission { border-top: 3px solid #7c3aed; }

.payments-kpi--donation { border-top: 3px solid #ea580c; }

.payments-kpi--payout { border-top: 3px solid #16a34a; }

.payments-kpi--trips { border-top: 3px solid #0d9488; }

.payments-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.payments-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.payments-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.payments-panel-desc {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.payments-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.payments-filters {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.payments-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .payments-filters-grid {
    grid-template-columns: minmax(10rem, 12rem) minmax(12rem, 1.4fr) minmax(12rem, 1fr);
  }
}

@media (min-width: 1024px) {
  .payments-filters-grid {
    grid-template-columns: minmax(10rem, 12rem) minmax(14rem, 1.2fr) minmax(14rem, 1.4fr);
  }
}

.payments-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.payments-filter-field--grow {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .payments-filter-field--grow {
    grid-column: auto;
  }
}

.payments-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payments-select {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
  width: 100%;
}

.payments-select:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.payments-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.payments-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.payments-search:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.payments-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.payments-chip {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-transform: capitalize;
}

.payments-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.payments-chip:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.payments-chip--active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.payments-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.payments-data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.875rem;
}

.payments-col--driver {
  width: 22%;
}

.payments-col--num {
  width: 10%;
}

.payments-col--actions {
  width: 6.5rem;
}

.payments-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  vertical-align: bottom;
}

.payments-data-table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}

.payments-data-table thead th.payments-num,
.payments-data-table tbody td.payments-num {
  text-align: right;
}

.payments-data-table thead th.payments-actions,
.payments-data-table tbody td.payments-actions {
  text-align: right;
  padding-right: 0.75rem;
}

.payments-data-table .payments-actions .payments-btn {
  width: auto;
  display: inline-flex;
}

.payments-data-table tbody tr:hover {
  background: #f8fafc;
}

.payments-data-table tbody tr.payments-row--active {
  background: #eff6ff;
}

.payments-data-table tbody tr:last-child td {
  border-bottom: none;
}

.payments-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payments-amount {
  font-weight: 600;
  color: #0f172a;
}

.payments-amount--emphasis {
  color: #15803d;
}

.payments-cell-primary {
  display: block;
  font-weight: 600;
}

.payments-cell-secondary {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.payments-trip-id {
  font-weight: 600;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}

.payments-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  text-transform: capitalize;
}

.payments-datetime {
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
}

.payments-empty {
  padding: 2rem 1rem !important;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.payments-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.payments-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.payments-btn--secondary {
  background: #1d4ed8;
  color: #fff;
}

.payments-btn--secondary:hover:not(:disabled) {
  background: #1e40af;
}

.payments-btn--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.payments-btn--ghost {
  background: transparent;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
}

.payments-btn--ghost:hover {
  background: #eff6ff;
}

/* Settings — primary / secondary actions (avoid sleek legacy .form pills) */

.settings-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: #1d4ed8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.settings-primary-btn:hover:not(:disabled) {
  background: #1e40af;
  transform: none;
}

.settings-primary-btn:active:not(:disabled) {
  background: #1e3a8a;
  transform: none;
}

.settings-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-page .form button[type="submit"]:not(.small-btn):not(.settings-sectors-btn):not(.settings-cities-submit) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  width: auto;
  min-width: 10rem;
}

.settings-page .form button[type="button"]:not(.small-btn):not(.btn):not(.btn-ghost):not(.settings-sectors-btn):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.settings-cities-row-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  margin-top: 8px;
  margin-right: 8px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
  width: auto;
  min-width: 6rem;
}

.settings-page .form button[type="button"]:not(.small-btn):not(.btn):not(.btn-ghost):not(.settings-sectors-btn):not(.settings-primary-btn):not(.route-tariff-btn):not(.route-compact-action-btn):not(.settings-cities-row-btn):hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
  transform: none;
}

.settings-page {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.settings-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.settings-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.settings-menu {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  border: none;
  width: fit-content;
  flex-shrink: 0;
}

.settings-menu-item {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
  min-width: auto;
  width: auto;
}

.settings-menu-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #334155;
}

.settings-menu-item.active {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.settings-content {
  width: 100%;
  display: grid;
  gap: 16px;
}

.settings-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.settings-panel h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

@media (max-width: 900px) {
  .settings-layout {
    flex-direction: column;
  }

  .settings-menu {
    flex-wrap: wrap;
    width: 100%;
  }

  .settings-menu-item {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .route-tariff-table,
  .route-tariff-table-outstation {
    display: block;
    width: 100%;
    border: none;
    box-shadow: none;
    overflow: visible;
    background: transparent;
  }

  .route-tariff-table .table-head {
    display: none;
  }

  .route-tariff-table .route-tariff-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-column: auto;
    column-gap: 10px;
    row-gap: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  }

  .route-tariff-table .route-tariff-city {
    grid-column: 1;
    grid-row: 1;
  }

  .route-tariff-table .route-tariff-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  .route-tariff-table .route-tariff-status::before,
  .route-tariff-table .route-tariff-actions::before {
    display: none;
  }

  .route-tariff-table .route-tariff-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .route-tariff-table .route-tariff-cell::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
  }

  .route-tariff-table .route-tariff-money {
    text-align: left;
    font-size: 13px;
  }

  .route-tariff-table .route-tariff-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 2px;
  }

  .route-tariff-table .route-tariff-btn {
    width: 100%;
    justify-content: center;
    min-height: 32px;
  }

  .route-tariff-table .route-tariff-message {
    grid-column: 1 / -1;
    text-align: left;
    padding: 2px 0;
  }
}

@media (max-width: 768px) {
  .trip-table-container {
    overflow: visible;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .trip-table {
    display: block;
    margin-bottom: 0;
    border-spacing: 0;
  }

  .trip-table thead {
    display: none;
  }

  .trip-table tbody {
    display: grid;
    gap: 12px;
  }

  .trip-table tbody tr {
    display: block;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .trip-table td,
  .trip-table tbody tr td,
  .trip-table th.trip-status-header,
  .trip-table td.trip-status-cell,
  .trip-table th.trip-driver-header,
  .trip-table td.trip-driver-cell,
  .trip-table th.trip-start-time-header,
  .trip-table td.trip-start-time-cell {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 8px 0;
    text-align: left !important;
    white-space: normal !important;
    border-bottom: 1px solid #f1f5f9;
  }

  .trip-table tbody tr td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .trip-table td::before {
    content: attr(data-label);
    display: block;
    width: 118px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    text-align: left;
    line-height: 1.35;
  }

  .trip-table td > * {
    min-width: 0;
  }

  .trip-driver-cell,
  .trip-actions-cell {
    overflow: visible;
  }
}

/* Expandable Table Row Styles */

.expand-indicator {
  font-size: 10px;
  color: #64748b;
  margin-right: 6px;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.trip-table tbody tr.selected .expand-indicator {
  color: #3b82f6;
}

.trip-detail-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: table-row !important;
  height: auto !important;
}

.trip-detail-row td {
  padding: 0 !important;
  background: transparent;
  height: auto !important;
  border: none !important;
}

.trip-inline-detail {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 24px 28px;
  margin: 0 0 16px 0;
}

.inline-detail-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.detail-header h4 {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}

.detail-grid.completed {
  grid-template-columns: repeat(3, 1fr);
}

.detail-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.detail-col h5 {
  margin: 0 0 4px 0;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-col p {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.5;
  word-break: break-word;
}

.detail-col p.status-text {
  color: #3b82f6;
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.detail-actions button {
  width: auto;
  padding: 8px 16px;
}

.assign-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assign-section h5 {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
}

.assignment-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.assignment-controls input {
  flex: 1;
}

.assignment-controls button {
  width: auto;
  white-space: nowrap;
}

.driver-list-inline {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.driver-mini-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.driver-mini-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.driver-mini-row .driver-name {
  font-size: 13px;
  font-weight: 500;
}

.driver-mini-row .driver-eta {
  font-size: 12px;
  color: #64748b;
}

.driver-mini-row .driver-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.driver-mini-row .small-btn {
  padding: 4px 10px;
  font-size: 11px;
}

.trip-table tbody tr:has(+ .trip-detail-row) {
  border-radius: 12px 12px 0 0;
}

.trip-table tbody tr.selected {
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.inline-detail-content.assign-driver {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.info-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.info-row .label {
  color: #64748b;
  font-weight: 500;
  min-width: 70px;
}

.info-row .value {
  color: #0f172a;
}

.driver-filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.driver-filter-row input,
.driver-filter-row select {
  padding: 6px 10px;
  font-size: 12px;
}

.driver-filter-row input {
  flex: 1;
}

.trip-table-container {
  overflow-x: auto;
  padding: 4px;
  max-width: 100%;
}

.trip-table-container.dropdown-open {
  overflow: visible !important;
}

.trip-table-container::-webkit-scrollbar {
  height: 6px;
}

.trip-table-container::-webkit-scrollbar-track {
  background: transparent;
}

.trip-table-container::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .detail-grid.completed {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .trip-inline-detail {
    padding: 16px 20px;
  }
  
  .inline-detail-content {
    padding: 16px 20px;
  }
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .detail-grid.completed {
    grid-template-columns: 1fr;
  }
  
  .detail-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .driver-mini-row {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  
  .driver-mini-row .driver-eta,
  .driver-mini-row .status-dot {
    display: none;
  }
  
  .trip-inline-detail {
    padding: 12px 16px;
  }
  
  .inline-detail-content {
    padding: 12px 16px;
  }
  
  .assignment-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .assignment-controls input,
  .assignment-controls button {
    width: 100%;
  }
}

/* Table header and cell alignment - match columns properly */

.trip-table th {
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  color: #475569;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.trip-table td {
  text-align: left;
  padding: 14px 12px;
}

/* Center specific columns */

.trip-table th.trip-days-header,
.trip-table td.trip-days-cell,
.trip-table th.trip-assign-header,
.trip-table td.trip-assign-cell,
.trip-table th.trip-actions-header,
.trip-table td.trip-action-cell,
.trip-table th.trip-customer-header,
.trip-table td.trip-customer-cell {
  text-align: center !important;
}

.trip-customer-cell,
.trip-time {
  align-items: center !important;
}

.trip-customer-name {
  justify-content: center !important;
}

.home-page-shell {
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.home-dashboard-main {
  width: 100%;
  padding: 0;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-sizing: border-box;
}

.home-fab {
  position: fixed;
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  z-index: 950;
}

.home-fab-create {
  right: 20px;
  background-color: #3b82f6;
  font-size: 30px;
}

.home-fab-map {
  right: 86px;
  background-color: #22c55e;
  font-size: 22px;
}

.trip-assign-cell {
  padding: 8px 12px !important;
  vertical-align: middle;
}

.driver-assign-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
}

.driver-assign-dropdown-wrap {
  position: relative;
  flex: 1 1 7.5rem;
  min-width: 7.5rem;
  max-width: 10rem;
}

.driver-assign-inline .datetime-local-field {
  flex: 1 1 13.5rem;
  min-width: 13.5rem;
  max-width: 15rem;
}

.driver-assign-inline .datetime-local-field-row,
.driver-assign-inline .datetime-local-field-row--solo {
  grid-template-columns: 1fr;
}

.driver-assign-reassign {
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.driver-assign-reassign .datetime-local-field {
  flex: 1 1 13.5rem;
  min-width: 13rem;
  max-width: 15rem;
}

.driver-assign-inline .driver-select {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-width: 140px;
}

.driver-assign-inline .sector-select {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  min-width: 100px;
  max-width: 120px;
}

.driver-assign-inline .time-input {
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-width: 150px;
  max-width: 170px;
}

.driver-assign-inline .time-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.driver-assign-inline .sector-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.driver-assign-inline .sector-select option {
  font-size: 12px;
  padding: 4px;
}

@media (max-width: 768px) {
  .home-dashboard-main {
    padding-bottom: 112px;
  }

  .home-fab {
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 10px));
    width: 52px;
    height: 52px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  }

  .home-fab-create {
    right: 14px;
    font-size: 28px;
  }

  .home-fab-map {
    right: 74px;
    font-size: 20px;
  }

  .trip-table td > *,
  .trip-table td > div,
  .trip-table td > span {
    justify-self: start;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .trip-table td.trip-type {
    align-items: start;
  }

  .trip-table td.trip-type .trip-type-icon {
    justify-content: flex-start;
  }

  .trip-table td.trip-status-cell .status-badge {
    width: fit-content;
  }

  .trip-table td.trip-days-cell {
    text-align: left !important;
  }

  .trip-table td.trip-days-cell .trip-days-wrap {
    width: auto;
    justify-content: flex-start;
  }

  .trip-actions-inline {
    width: 100%;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .trip-actions-inline > button,
  .trip-actions-inline .btn-start,
  .trip-actions-inline .btn-end,
  .trip-actions-inline .btn-assign,
  .trip-actions-inline .btn-cancel,
  .trip-actions-inline .btn-complete {
    width: auto;
  }
}

.driver-assign-inline .driver-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.driver-assign-inline .driver-select option {
  font-size: 12px;
  padding: 4px;
}

.trip-assign-header {
  min-width: 200px;
}

/* Ensure unassigned trips have proper column widths */

.trip-table:has(.trip-assign-cell) {
  table-layout: auto;
  overflow: visible !important;
}

.trip-table {
  overflow: visible !important;
}

.trip-table tbody,
.trip-table tr,
.trip-table td {
  overflow: visible !important;
}

.trip-table .trip-assign-cell {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.trip-table .trip-assign-cell:hover {
  z-index: auto;
}

/* Driver Assignment Dropdown Styles */

.driver-assignment-dropdown {
  position: relative;
  flex: 1;
  min-width: 180px;
  z-index: 9999;
}

.driver-assignment-dropdown .dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-height: 32px;
}

.driver-assignment-dropdown .dropdown-trigger:hover {
  border-color: #3b82f6;
}

.driver-assignment-dropdown .dropdown-trigger.expanded {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.driver-assignment-dropdown .dropdown-trigger .selected-text {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-assignment-dropdown .dropdown-trigger .selected-text small {
  color: #64748b;
  font-size: 11px;
}

.driver-assignment-dropdown .dropdown-trigger .placeholder {
  color: #94a3b8;
}

.driver-assignment-dropdown .dropdown-trigger .expand-icon {
  font-size: 10px;
  color: #64748b;
  margin-left: 8px;
}

.driver-dropdown-portal {
  background: #fff !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
  max-height: 350px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.driver-dropdown-portal .sector-filter-row {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.driver-dropdown-portal .sector-filter-row label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.driver-dropdown-portal .sector-filter-row select {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-width: 120px;
}

.driver-dropdown-portal .driver-list {
  overflow-y: auto;
  max-height: 250px;
  min-height: 50px;
  padding: 8px 0;
  background: #fff;
}

.driver-dropdown-portal .driver-count {
  padding: 8px 16px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 500;
}

.driver-dropdown-portal .driver-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}

.driver-dropdown-portal .driver-item:last-child {
  border-bottom: none;
}

.driver-dropdown-portal .driver-item:hover {
  background: #f1f5f9;
}

.driver-dropdown-portal .driver-item.selected {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.driver-dropdown-portal .driver-item .driver-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.driver-dropdown-portal .driver-item .driver-name {
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
}

.driver-dropdown-portal .driver-item .driver-sector {
  font-size: 11px;
  color: #64748b;
}

.driver-dropdown-portal .driver-item .driver-availability {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: lowercase;
  font-weight: 500;
}

.driver-dropdown-portal .driver-item .driver-availability.available {
  background: #dcfce7;
  color: #166534;
}

.driver-dropdown-portal .driver-item .driver-availability.busy {
  background: #fee2e2;
  color: #991b1b;
}

.driver-dropdown-portal .driver-item .driver-availability.offline {
  background: #f1f5f9;
  color: #64748b;
}

.driver-dropdown-portal .no-drivers {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  background: #fff;
}

.searchable-driver-dropdown {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-height: 32px;
}

.dropdown-trigger:hover {
  border-color: #3b82f6;
}

.dropdown-trigger.open {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown-trigger .selected-text {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-trigger .selected-text small {
  color: #64748b;
  font-size: 11px;
}

.dropdown-trigger .placeholder {
  color: #94a3b8;
}

.dropdown-trigger .dropdown-arrow {
  font-size: 10px;
  color: #64748b;
  margin-left: 8px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dropdown-search {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dropdown-search input {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  outline: none;
}

.dropdown-search input:focus {
  border-color: #3b82f6;
}

.dropdown-options {
  overflow-y: auto;
  max-height: 240px;
  padding: 4px 0;
}

.driver-group {
  border-bottom: 1px solid #f1f5f9;
}

.driver-group:last-child {
  border-bottom: none;
}

.group-header {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.group-header .trip-match {
  color: #3b82f6;
  font-weight: 500;
}

.driver-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}

.driver-option:hover {
  background: #f1f5f9;
}

.driver-option.selected {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.driver-option .driver-name {
  font-size: 12px;
  color: #0f172a;
  font-weight: 500;
}

.driver-option .driver-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.driver-option .availability {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: lowercase;
}

.driver-option .availability.available {
  background: #dcfce7;
  color: #166534;
}

.driver-option .availability.busy {
  background: #fee2e2;
  color: #991b1b;
}

.driver-option .availability.offline {
  background: #f1f5f9;
  color: #64748b;
}

.no-results {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

/* ============================================
   TARIFF & SETTINGS REDESIGN STYLES
   ============================================ */

/* Tariff Sub-tabs - Horizontal pills */

.settings-panel > div[style*="display: inline-flex"][style*="gap: 2px"] {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 24px;
  padding: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.settings-panel > div[style*="display: inline-flex"] button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
}

.settings-panel > div[style*="display: inline-flex"] button:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #334155;
}

.settings-panel > div[style*="display: inline-flex"] button[style*="background: rgb(255, 255, 255)"],
.settings-panel > div[style*="display: inline-flex"] button[style*="background: #ffffff"] {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Settings — Sectors tab */

.settings-sectors {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.settings-sectors-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.settings-sectors-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.settings-sectors-panel-head-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.settings-sectors-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.settings-sectors-desc {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.settings-sectors-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
}

.settings-sectors-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.settings-sectors-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}

.settings-sectors-stat strong {
  font-weight: 700;
  color: #0f172a;
}

.settings-sectors-stat--active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #166534;
}

.settings-sectors-stat--active strong {
  color: #166534;
}

.settings-sectors-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-sectors-filters {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.settings-unmapped-sectors {
  margin: 0 1.25rem 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}

.settings-unmapped-sectors--ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.settings-unmapped-sectors-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.settings-unmapped-sectors-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #92400e;
}

.settings-unmapped-sectors--ok .settings-unmapped-sectors-title {
  color: #166534;
}

.settings-unmapped-sectors-desc {
  margin: 0;
  font-size: 0.8rem;
  color: #78716c;
  max-width: 52rem;
  line-height: 1.45;
}

.settings-unmapped-sectors-desc code {
  font-size: 0.75rem;
}

.settings-unmapped-sectors-loading {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.settings-unmapped-sectors-table-scroll {
  overflow-x: auto;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fff;
}

.settings-unmapped-legacy {
  font-size: 0.8rem;
  color: #b45309;
  font-weight: 500;
}

.settings-cities-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.settings-cities-title {
  margin: 0;
  flex: 0 0 auto;
}

.settings-cities-head-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  .settings-cities-head-search {
    max-width: 22rem;
    margin-left: auto;
  }
}

.settings-cities-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: #fff;
  flex: 1 1 12rem;
  min-width: 0;
}

.settings-cities-search:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.settings-cities-clear {
  flex-shrink: 0;
}

.settings-cities-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

@media (max-width: 520px) {
  .settings-cities-form-row {
    grid-template-columns: 1fr;
  }
}

.settings-cities-form .settings-cities-form-row input {
  width: 100%;
  min-width: 0;
}

.settings-cities-operational-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
}

.settings-cities-form-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-cities-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.settings-cities-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-cities-row-btn {
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.settings-cities-row-btn--danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.settings-cities-row-btn--neutral {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.settings-cities-empty {
  padding: 1rem 0.75rem;
  color: #64748b;
  font-size: 0.9rem;
}

.settings-sectors-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 640px) {
  .settings-sectors-filters-grid {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto;
  }
}

.settings-sectors-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.settings-sectors-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-sectors-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: #fff;
}

.settings-sectors-search:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.settings-sectors-select {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.9rem;
  color: #0f172a;
  width: 100%;
}

.settings-sectors-select:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.settings-sectors-filters-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.settings-sectors-filters-actions .settings-sectors-btn {
  width: auto;
  min-width: 7.5rem;
}

.settings-sectors-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.settings-sectors-data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.settings-sectors-data-table thead th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #eff6ff;
  border-bottom: 1px solid #e2e8f0;
}

.settings-sectors-data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.settings-sectors-data-table tbody tr {
  cursor: pointer;
}

.settings-sectors-data-table tbody tr:hover {
  background: #f8fafc;
}

.settings-sectors-data-table tbody tr:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.settings-sectors-data-table tbody tr.settings-sectors-row--selected {
  background: #eff6ff;
}

.settings-sectors-data-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-sectors-cell-primary {
  font-weight: 600;
  color: #0f172a;
}

.settings-sectors-cell-muted {
  color: #94a3b8;
}

.settings-sectors-zone-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-sectors-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.settings-sectors-status--active {
  background: #dcfce7;
  color: #166534;
}

.settings-sectors-status--inactive {
  background: #f1f5f9;
  color: #64748b;
}

.settings-sectors-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.settings-sectors-empty {
  margin: 0;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
}

.settings-sectors-form-card {
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.settings-sectors-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.settings-sectors-form-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.settings-sectors-form {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .settings-sectors-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .settings-sectors-form-actions {
    grid-column: 1 / -1;
  }
}

.settings-sectors-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.settings-sectors-form-field input {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  width: 100%;
}

.settings-sectors-form-field input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.settings-sectors-form-field input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.settings-sectors-form-hint {
  font-size: 0.75rem;
  color: #64748b;
}

.settings-sectors-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.settings-sectors-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.settings-sectors-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.settings-sectors-btn--primary {
  background: #1d4ed8;
  color: #fff;
}

.settings-sectors-btn--primary:hover {
  background: #1e40af;
}

.settings-sectors-btn--secondary {
  background: #fff;
  border-color: #cbd5e1;
  color: #1d4ed8;
}

.settings-sectors-btn--secondary:hover {
  background: #f8fafc;
}

.settings-sectors-btn--danger {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}

.settings-sectors-btn--danger:hover {
  background: #fef2f2;
}

.settings-sectors-btn--ghost {
  background: transparent;
  border-color: #e2e8f0;
  color: #475569;
}

.settings-sectors-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
}

.settings-sectors-btn--ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-sectors-btn--sm {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.settings-sectors-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── DateTime pickers (MUI X) — aligned with global input/select tokens ── */

.datetime-local-field {
  width: 100%;
  min-width: 0;
  font-family: inherit;
}

.datetime-local-field-row {
  display: grid;
  grid-template-columns: minmax(13.5rem, 1fr) auto;
  gap: 6px;
  align-items: stretch;
  width: 100%;
}

.datetime-local-field-row--solo {
  grid-template-columns: minmax(13.5rem, 1fr);
}

.datetime-local-field--compact .datetime-local-field-row--solo {
  grid-template-columns: minmax(13.5rem, 1fr);
}

.datetime-local-mui-picker {
  width: 100%;
  min-width: 0;
  font-family: inherit;
}

.datetime-local-mui-picker .MuiPickersTextField-root {
  width: 100%;
}

/* Base: match global `input:not([type="checkbox"]), select` (styles.css ~678) */

.datetime-local-mui-picker .MuiPickersOutlinedInput-root {
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.datetime-local-mui-picker .MuiPickersOutlinedInput-notchedOutline {
  border-color: #cbd5e1;
  border-width: 1px;
}

.datetime-local-mui-picker .MuiPickersOutlinedInput-root:hover .MuiPickersOutlinedInput-notchedOutline {
  border-color: #94a3b8;
}

.datetime-local-mui-picker .MuiPickersOutlinedInput-root.Mui-focused {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datetime-local-mui-picker .MuiPickersOutlinedInput-root.Mui-focused .MuiPickersOutlinedInput-notchedOutline {
  border-color: #3b82f6;
  border-width: 1px;
}

.datetime-local-mui-picker .MuiPickersInputBase-root,
.datetime-local-mui-picker .MuiPickersInputBase-sectionsContainer {
  font-family: inherit;
  color: #0f172a;
}

/* Default size — global forms (14px, 10×12 padding) */

.datetime-local-mui-picker--default .MuiPickersOutlinedInput-root {
  min-height: 44px;
  padding-left: 12px;
  padding-right: 6px;
}

.datetime-local-mui-picker--default .MuiPickersInputBase-sectionsContainer {
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Compact — trip table assign row (matches .driver-assign-inline .driver-select) */

.datetime-local-mui-picker--compact .MuiPickersOutlinedInput-root {
  min-height: 36px;
  height: 36px;
  padding-left: 10px;
  padding-right: 4px;
  border-radius: 6px;
}

.datetime-local-mui-picker--compact .MuiPickersOutlinedInput-notchedOutline {
  border-color: #e2e8f0;
}

.datetime-local-mui-picker--compact .MuiPickersOutlinedInput-root:hover .MuiPickersOutlinedInput-notchedOutline {
  border-color: #cbd5e1;
}

.datetime-local-mui-picker--compact .MuiPickersInputBase-sectionsContainer {
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.35;
}

.datetime-local-mui-open-btn {
  margin-right: 2px !important;
  padding: 4px !important;
}

.datetime-local-mui-picker--compact .datetime-local-mui-open-btn {
  padding: 3px !important;
}

.datetime-local-mui-picker .datetime-local-mui-open-btn .MuiSvgIcon-root {
  font-size: 1.125rem;
}

.datetime-local-mui-picker--compact .datetime-local-mui-open-btn .MuiSvgIcon-root {
  font-size: 1rem;
}

.datetime-local-mui-popper {
  z-index: 1400 !important;
}

/* Create trip forms — match .compact-create-trip-form inputs (13px, 8×10, radius 8) */

.compact-create-trip-form .datetime-local-mui-picker--default .MuiPickersOutlinedInput-root,
.create-trip-form .datetime-local-mui-picker--default .MuiPickersOutlinedInput-root {
  min-height: 38px;
  padding-left: 10px;
  padding-right: 6px;
  border-radius: 8px;
}

.compact-create-trip-form .datetime-local-mui-picker--default .MuiPickersInputBase-sectionsContainer,
.create-trip-form .datetime-local-mui-picker--default .MuiPickersInputBase-sectionsContainer {
  padding: 8px 0;
  font-size: 13px;
}

/* Complete / End day modals — match .complete-trip-field input */

.complete-trip-modal .datetime-local-mui-picker--default .MuiPickersOutlinedInput-root,
.complete-trip-modal .datetime-local-mui-picker--compact .MuiPickersOutlinedInput-root {
  min-height: 36px;
  height: auto;
  padding-left: 10px;
  padding-right: 6px;
  border-radius: 8px;
}

.complete-trip-modal .datetime-local-mui-picker--default .MuiPickersInputBase-sectionsContainer,
.complete-trip-modal .datetime-local-mui-picker--compact .MuiPickersInputBase-sectionsContainer {
  padding: 8px 0;
  font-size: 0.8125rem;
}

.complete-trip-modal .datetime-local-field label {
  font-size: 0.75rem !important;
  color: #475569 !important;
  margin-bottom: 4px !important;
}

/* Driver assignment panel — flex with Assign button */

.assignment-controls .datetime-local-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

/* Trip detail inline complete */

.detail-actions .datetime-local-field {
  width: 100%;
}

.create-trip-schedule .datetime-local-field,
.create-trip-form .datetime-local-field,
.form .datetime-local-field {
  width: 100%;
}

.datetime-local-now-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.datetime-local-now-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.datetime-local-now-btn--compact {
  min-height: 36px;
  height: 36px;
  font-size: 12px;
  border-radius: 6px;
  border-color: #e2e8f0;
}

.compact-create-trip-form .datetime-local-now-btn,
.complete-trip-modal .datetime-local-now-btn {
  min-height: 38px;
  height: 38px;
  border-radius: 8px;
}

/* Legacy native input styles (unused; kept for reference) */

.datetime-local-input {
  width: 100%;
  min-width: 13.5rem;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
}

.datetime-local-input--default {
  padding: 10px 12px;
  font-size: 14px;
  min-height: 44px;
}

.datetime-local-input--compact {
  padding: 6px 8px;
  font-size: 12px;
  min-height: 36px;
}

.datetime-local-input:disabled {
  background: #f8fafc;
}

.datetime-local-input::-webkit-datetime-edit-fields-wrapper {
  min-width: 9rem;
}

.datetime-local-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

.complete-trip-modal .datetime-local-range-duration {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.datetime-local-unified-range {
  width: 100%;
}

.datetime-local-unified-range .datetime-local-range-duration {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.datetime-local-range-unified-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  background: #fff !important;
  color: #0f172a !important;
  font-family: inherit;
  font-weight: 400 !important;
  transform: none !important;
  border: 1px solid #cbd5e1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.datetime-local-range-unified-trigger:hover {
  border-color: #94a3b8;
}

.datetime-local-range-unified-trigger:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datetime-local-mui-picker.datetime-local-range-unified-trigger {
  border: 1px solid #cbd5e1;
}

.datetime-local-range-unified-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.datetime-local-range-unified-icon {
  flex-shrink: 0;
  font-size: 10px;
  color: #64748b;
  line-height: 1;
}

.datetime-local-range-popover-paper {
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.datetime-local-range-popover-body {
  padding: 12px 14px;
  min-width: min(100vw - 32px, 320px);
}

.datetime-local-mui-picker--default.datetime-local-range-unified-trigger {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
}

.datetime-local-mui-picker--compact.datetime-local-range-unified-trigger {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border-color: #e2e8f0;
}

.complete-trip-modal .datetime-local-range-unified-trigger {
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.8125rem;
}

.complete-trip-modal .datetime-local-field--compact .datetime-local-range-unified-trigger {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  border-color: #e2e8f0;
  border-radius: 6px;
}

.datetime-local-range-inline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

/* Side-by-side only when there is enough room (e.g. wide modal main pane) */

@media (min-width: 720px) {
  .complete-trip-modal--wide .datetime-local-range-inline {
    grid-template-columns: repeat(2, minmax(13.5rem, 1fr));
  }
}

.complete-trip-modal .datetime-local-range-inline {
  grid-template-columns: 1fr;
}

.complete-trip-modal {
  width: min(640px, 96vw);
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.complete-trip-modal--wide {
  width: min(820px, 96vw);
}

.complete-trip-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.complete-trip-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.complete-trip-modal-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.complete-trip-ref {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px 8px;
}

.complete-trip-modal-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.complete-trip-close {
  flex-shrink: 0;
}

.complete-trip-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.complete-trip-modal-main {
  padding: 14px 18px;
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
}

.complete-trip-modal-aside {
  padding: 14px 16px;
  overflow-y: auto;
  background: #f8fafc;
}

.complete-trip-section {
  margin-bottom: 18px;
}

.complete-trip-section:last-child {
  margin-bottom: 0;
}

.complete-trip-section-title {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.complete-trip-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.complete-trip-summary-item {
  margin: 0;
}

.complete-trip-summary-item--wide {
  grid-column: 1 / -1;
}

.complete-trip-summary-item dt {
  margin: 0 0 2px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
}

.complete-trip-summary-item dd {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

.complete-trip-loading,
.complete-trip-panel-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.complete-trip-day-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.complete-trip-day-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.complete-trip-day-card--done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.complete-trip-day-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.complete-trip-day-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}

.complete-trip-day-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.complete-trip-day-status--done {
  color: #047857;
  background: #d1fae5;
}

.complete-trip-day-status--edited {
  color: #b45309;
  background: #fef3c7;
}

.complete-trip-day-status--active {
  color: #1d4ed8;
  background: #dbeafe;
}

.complete-trip-day-status--pending {
  color: #64748b;
  background: #f1f5f9;
}

.complete-trip-day-fare {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}

.complete-trip-day-card-times {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.complete-trip-day-duration {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.complete-trip-field {
  display: block;
  margin-bottom: 10px;
}

.complete-trip-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}

.complete-trip-field input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.8125rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
}

.complete-trip-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
}

.complete-trip-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.complete-trip-field--full {
  grid-column: 1 / -1;
}

.complete-trip-panel {
  height: 100%;
}

.complete-trip-panel-title {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.complete-trip-breakdown {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.complete-trip-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  padding: 4px 0;
  color: #475569;
}

.complete-trip-breakdown li span:last-child {
  font-weight: 600;
  color: #1e293b;
}

.complete-trip-breakdown--accent li {
  color: #9a3412;
}

.complete-trip-breakdown--accent li span:last-child {
  color: #9a3412;
}

.complete-trip-daywise h4 {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a3412;
}

.complete-trip-daywise-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #fdba74;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a3412;
}

.complete-trip-total-field {
  display: block;
  margin-bottom: 8px;
}

.complete-trip-total-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
}

.complete-trip-total-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  background: #eff6ff;
  box-sizing: border-box;
}

.complete-trip-reapply-btn {
  width: auto;
  padding: 4px 10px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.complete-trip-alert {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.complete-trip-alert--warn {
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.complete-trip-alert--ok {
  border: 1px solid #10b981;
  background: #ecfdf5;
  color: #065f46;
}

.complete-trip-alert--error {
  border: 1px solid #ef4444;
  background: #fef2f2;
  color: #991b1b;
}

.complete-trip-day-meals {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.complete-trip-day-meals-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.complete-trip-day-meals-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.complete-trip-meals-hint {
  margin-top: 12px;
  font-style: italic;
}

.complete-trip-meals {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.complete-trip-meals-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.complete-trip-meals-head h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.complete-trip-meals-head span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f766e;
}

.complete-trip-meals-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.complete-trip-meal-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #475569;
  cursor: pointer;
}

.complete-trip-meal-option input {
  accent-color: #2563eb;
}

.complete-trip-commission-note {
  margin: 12px 0 0;
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.4;
}

.complete-trip-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.complete-trip-modal-footer .btn-ghost,
.complete-trip-modal-footer .btn-complete {
  width: auto;
  padding: 8px 16px;
  font-size: 0.8125rem;
}

@media (max-width: 720px) {
  .complete-trip-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .complete-trip-modal-main {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    overflow: visible;
  }

  .complete-trip-modal-aside {
    overflow: visible;
  }

  .datetime-local-range-inline,
  .complete-trip-day-card-times,
  .complete-trip-field-row {
    grid-template-columns: 1fr;
  }
}

/* Completed trip view (read-only summary) */

.completed-trip-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.8125rem;
  font-weight: 600;
}

.completed-trip-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.completed-trip-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.completed-trip-section-meta {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.completed-trip-day-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.completed-trip-day-card {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.completed-trip-day-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.completed-trip-day-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.completed-trip-day-status {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.completed-trip-day-status--done {
  background: #dcfce7;
  color: #15803d;
}

.completed-trip-day-status--active {
  background: #dbeafe;
  color: #1d4ed8;
}

.completed-trip-day-status--pending {
  background: #f1f5f9;
  color: #64748b;
}

.completed-trip-day-fare {
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f766e;
}

.completed-trip-day-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.completed-trip-day-meta dt {
  margin: 0 0 2px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.completed-trip-day-meta dd {
  margin: 0;
  font-size: 0.8125rem;
  color: #334155;
  line-height: 1.35;
}

.completed-trip-day-charges {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed #e2e8f0;
  display: grid;
  gap: 4px;
}

.completed-trip-day-charges li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: #475569;
}

.completed-trip-day-charges li span:last-child {
  font-weight: 600;
  color: #0f172a;
}

.completed-trip-fare-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.completed-trip-total-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid #99f6e4;
}

.completed-trip-total-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f766e;
}

.completed-trip-total-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #047857;
  line-height: 1.1;
}

.completed-trip-fare-meta {
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.completed-trip-fare-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: #334155;
  margin-bottom: 8px;
}

.completed-trip-fare-meta-row span:last-child {
  font-weight: 600;
  text-align: right;
}

