/* ==========================================================================
   VEHICLE FLEET MASTER & LOGISTICS DIRECTORY
   Clean, Minimal Floating Design System with Full Theme-Adaptive Support
   ========================================================================== */

.vehicle-master-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: calc(100vh - 44px);
  padding: 16px 20px 28px 20px;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   1. KPI SUMMARY METRICS
   ========================================================================== */
.vehicle-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .vehicle-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .vehicle-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.vehicle-kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.vehicle-kpi-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.vehicle-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.veh-icon-emerald {
  background-color: rgba(16, 185, 129, 0.14);
  color: var(--emerald-500, #10b981);
}

.veh-icon-blue {
  background-color: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
}

.veh-icon-amber {
  background-color: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.veh-icon-purple {
  background-color: rgba(168, 85, 247, 0.14);
  color: #a855f7;
}

.vehicle-kpi-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vehicle-kpi-title {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vehicle-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}

.vehicle-kpi-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ==========================================================================
   2. TOOLBAR & CONTROLS
   ========================================================================== */
.vehicle-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

.vehicle-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 280px;
}

.vehicle-search-box {
  position: relative;
  width: 270px;
}

.vehicle-search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.vehicle-search-box input {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-secondary);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.vehicle-search-box input:focus {
  border-color: var(--emerald-500, #10b981);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.veh-filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.veh-filter-pill {
  padding: 5px 11px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.veh-filter-pill:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.veh-filter-pill.active {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald-500, #10b981);
  font-weight: 600;
}

.vehicle-toolbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.vehicle-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-add-vehicle-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--emerald-600, #15803d);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
}

.btn-add-vehicle-primary:hover {
  background: var(--emerald-500, #16a34a);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(21, 128, 61, 0.25);
}

/* ==========================================================================
   3. FLOATING CARDS GRID VIEW
   ========================================================================== */
.vehicle-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.vehicle-floating-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.vehicle-floating-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-floating);
  transform: translateY(-2px);
}

.veh-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.veh-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.veh-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--emerald-500, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.veh-number-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.veh-model-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.veh-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.veh-status-badge.status-active {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.veh-status-badge.status-available {
  background-color: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.veh-status-badge.status-trip {
  background-color: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.veh-card-divider {
  height: 1px;
  background-color: var(--border-subtle);
  width: 100%;
}

.veh-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.veh-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.veh-detail-row .detail-label {
  color: var(--text-muted);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.veh-detail-row .detail-value {
  color: var(--text-primary);
  text-align: right;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.veh-detail-row .transport-name {
  font-weight: 600;
  color: var(--text-primary);
}

.driver-phone-link {
  color: var(--emerald-600, #15803d);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.driver-phone-link:hover {
  color: var(--emerald-500, #10b981);
  text-decoration: underline;
}

.veh-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  margin-top: 2px;
}

.veh-id-pill {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.veh-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   4. TABLE VIEW
   ========================================================================== */
.vehicle-table-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.vehicle-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--text-primary);
  text-align: left;
}

.vehicle-data-table thead th {
  background-color: var(--bg-surface-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.vehicle-data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.vehicle-data-table tbody tr:hover {
  background-color: var(--bg-surface-hover);
}

.vehicle-data-table td {
  padding: 12px 14px;
  vertical-align: middle;
  color: var(--text-primary);
}

.veh-transport-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   5. MODAL DIALOG
   ========================================================================== */
.vehicle-modal-dialog {
  max-width: 520px;
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  box-shadow: var(--shadow-floating);
  color: var(--text-primary);
  overflow: hidden;
  animation: vehModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.veh-form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .veh-form-grid-2col {
    grid-template-columns: 1fr;
  }
}

@keyframes vehModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

