 z-index: 3;
  box-shadow: 0 2px 12px #c4453640;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  overflow-x: hidden;
}

/* Header */
.header {
  background: linear-gradient(180deg, #2d2d2d 0%, #1f1f1f 100%);
  border-bottom: 2px solid #3a3a3a;
  padding: 12px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-bull {
  height: 20px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

.header-controls {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 8px 20px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #b0b0b0;
  cursor: pointer;
  font-size: 13px;
  border-radius: 3px;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #353535;
  color: #ffffff;
}

.tab-btn.active {
  background: #c44536;
  border-color: #c44536;
  color: #ffffff;
  font-weight: 500;
}

/* Main Content */
.main-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Split Layout */
.split-layout {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 20px;
  height: calc(100vh - 100px);
}

/* Form Panel */
.form-panel {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 20px;
  overflow-y: auto;
}

.panel-title {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a3a3a;
}

/* Form Styles */
.reservation-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  gap: 12px;
}

.address-details {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  padding: 12px;
  margin-top: -8px;
  margin-bottom: 8px;
}

.address-details .form-group {
  margin-bottom: 8px;
}

.address-details .form-group:last-child,
.address-details .form-row-3 {
  margin-bottom: 0;
}

.address-suggestions-dropdown {
  position: absolute;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-top: none;
  border-radius: 0 0 3px 3px;
  max-height: 250px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  margin-top: -1px;
}

.address-suggestions-dropdown.active {
  display: block;
}

.address-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #333;
  transition: background 0.2s;
}

.address-suggestion-item:hover {
  background: #333;
}

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

.suggestion-main {
  color: #e0e0e0;
  font-weight: 500;
  font-size: 13px;
}

.suggestion-secondary {
  color: #888;
  font-size: 11px;
  margin-top: 2px;
}

.form-group {
  position: relative;
}

label {
  font-size: 12px;
  color: #b0b0b0;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  padding: 8px 10px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #4a90e2;
}

textarea {
  resize: vertical;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #c44536;
  color: #ffffff;
  width: 100%;
}

.btn-primary:hover {
  background: #d45545;
}

.btn-success {
  background: #4caf50;
  color: #ffffff;
}

.btn-success:hover {
  background: #5cbf60;
}

.btn-secondary {
  background: #4a90e2;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 12px;
}

.btn-secondary:hover {
  background: #5a9ff2;
}

/* Map Panel */
.map-panel {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.map-controls label {
  font-size: 12px;
  color: #b0b0b0;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.map-view-selector {
  padding: 6px 8px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  min-width: 180px;
}

.map-view-selector:focus {
  outline: none;
  border-color: #4a90e2;
}

.map {
  width: 100%;
  height: 100%;
}

/* Reservations List */
.reservations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reservation-card {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-left: 4px solid #4a90e2;
  border-radius: 3px;
  padding: 14px;
  transition: all 0.2s;
}

.reservation-card:hover {
  border-left-color: #5a9ff2;
  background: #1f1f1f;
}

.reservation-card.pending {
  border-left-color: #ffa726;
}

.reservation-card.accepted {
  border-left-color: #4caf50;
}

.reservation-card.completed {
  border-left-color: #78909c;
}

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

.card-id {
  font-size: 12px;
  color: #b0b0b0;
  font-weight: 600;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

.status-badge.accepted {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.status-badge.completed {
  background: rgba(120, 144, 156, 0.2);
  color: #78909c;
}

.status-badge.unassigned {
  background: rgba(158, 158, 158, 0.18);
  color: #bdbdbd;
}

.status-badge.offered {
  background: rgba(74, 144, 226, 0.2);
  color: #64b5f6;
}

.status-badge.assigned {
  background: rgba(76, 175, 80, 0.2);
  color: #66bb6a;
}

.status-badge.declined {
  background: rgba(239, 83, 80, 0.2);
  color: #ef5350;
}

.status-badge.enroute {
  background: rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

.status-badge.arrived {
  background: rgba(255, 213, 79, 0.2);
  color: #ffd54f;
}

.status-badge.passenger_onboard {
  background: rgba(129, 199, 132, 0.2);
  color: #81c784;
}

.status-badge.in_house {
  background: rgba(96, 125, 139, 0.2);
  color: #90a4ae;
}

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

.card-field {
  display: flex;
  gap: 8px;
  font-size: 12px;
}

.field-label {
  color: #b0b0b0;
  min-width: 80px;
}

.field-value {
  color: #e0e0e0;
  flex: 1;
}

.card-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #3a3a3a;
  display: flex;
  gap: 8px;
}

/* Reservations Panel (Full Width) */
.reservations-panel {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 20px;
}

.reservations-panel.farmout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 6px 16px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  color: #b0b0b0;
  cursor: pointer;
  font-size: 12px;
  border-radius: 3px;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #2a2a2a;
  color: #ffffff;
}

.filter-btn.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: #ffffff;
}

/* Reservations Table */
.reservations-table {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 90px 170px 210px 210px 110px 110px 110px 140px 160px;
  padding: 12px 16px;
  border-bottom: 1px solid #3a3a3a;
  font-size: 12px;
  align-items: center;
  transition: background 0.2s;
}

.table-row:hover {
  background: #242424;
}

.table-row.header {
  background: #2a2a2a;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 2px solid #3a3a3a;
}

.table-row.header:hover {
  background: #2a2a2a;
}

.table-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.farmout-toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.farmout-tool-buttons {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  flex-wrap: wrap;
}

.farmout-tool-shell {
  background: #0f0f0f;
  border-bottom: 1px solid #2e2e2e;
  padding: 10px 14px 0;
  display: none;
}

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

.farmout-tool-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

#farmoutToolFrame {
  width: 100%;
  height: calc(100vh - 140px);
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  background: #0f0f0f;
}

.main-content.hidden {
  display: none !important;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toolbar-group label {
  font-size: 11px;
  color: #8d8d8d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toolbar-group select {
  padding: 6px 10px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 12px;
  min-width: 140px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.farmout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.farmout-table-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.farmout-detail {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.farmout-detail.hidden {
  display: none;
}

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

.detail-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

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

.mode-toggle {
  display: flex;
  gap: 8px;
}

.mode-toggle .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

.mode-toggle .btn.active {
  background: #c44536;
  border-color: #c44536;
}

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

#farmoutDriverSelect {
  width: 100%;
  padding: 8px 10px;
  background: #121212;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 12px;
}

.assignment-actions {
  display: flex;
  gap: 8px;
}

.snapshot-card {
  background: #121212;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 12px;
  font-size: 12px;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snapshot-card.empty {
  color: #7b7b7b;
  font-style: italic;
}

.snapshot-name {
  font-weight: 600;
  color: #ffffff;
}

.snapshot-meta {
  color: #a0a0a0;
}

.farmout-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.automation-status {
  background: #121212;
  border: 1px dashed #3a3a3a;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 12px;
  color: #d7ead9;
}

.automation-controls {
  gap: 12px;
}

.automation-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 12px;
}

.automation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.automation-field .field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9aa7b3;
  letter-spacing: 0.04em;
}

.automation-field input,
.automation-field textarea {
  width: 100%;
  padding: 8px 10px;
  background: #0f0f0f;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #f1f1f1;
  font-size: 12px;
  resize: vertical;
}

.automation-field input:focus,
.automation-field textarea:focus {
  outline: none;
  border-color: #c44536;
  box-shadow: 0 0 0 1px rgba(196, 69, 54, 0.4);
}

.automation-field textarea {
  min-height: 64px;
}

.automation-field .field-hint {
  font-size: 11px;
  color: #7b7b7b;
  line-height: 1.4;
}

.activity-log {
  background: #121212;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.activity-entry {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.activity-time {
  color: #888;
  min-width: 90px;
}

.activity-text {
  color: #e0e0e0;
  flex: 1;
}

.activity-empty {
  color: #7b7b7b;
  font-style: italic;
}

.farmout-chip,
.farmout-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.farmout-chip.unassigned,
.farmout-tag.unassigned {
  background: rgba(158, 158, 158, 0.18);
  color: #bdbdbd;
}

.farmout-chip.in_house,
.farmout-tag.in_house {
  background: rgba(96, 125, 139, 0.2);
  color: #90a4ae;
}

.farmout-chip.offered,
.farmout-tag.offered {
  background: rgba(74, 144, 226, 0.2);
  color: #64b5f6;
}

.farmout-chip.assigned,
.farmout-tag.assigned {
  background: rgba(76, 175, 80, 0.2);
  color: #66bb6a;
}

.farmout-chip.declined,
.farmout-tag.declined {
  background: rgba(239, 83, 80, 0.2);
  color: #ef5350;
}

.farmout-chip.completed,
.farmout-tag.completed {
  background: rgba(120, 144, 156, 0.2);
  color: #90a4ae;
}

.farmout-chip.enroute,
.farmout-tag.enroute {
  background: rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

.farmout-chip.arrived,
.farmout-tag.arrived {
  background: rgba(255, 213, 79, 0.2);
  color: #ffd54f;
}

.farmout-chip.passenger_onboard,
.farmout-tag.passenger_onboard {
  background: rgba(129, 199, 132, 0.2);
  color: #81c784;
}

.reservations-table.selectable .table-row.farmout[data-reservation-id] {
  cursor: pointer;
}

.table-row.farmout {
  grid-template-columns: 80px 220px 220px 120px 120px 120px 150px;
  align-items: center;
}

.table-row.farmout .table-primary {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.table-row.farmout .table-secondary {
  font-size: 11px;
  color: #8d8d8d;
}

.table-row.farmout.selected {
  background: #2d2d2d;
  border-left: 3px solid #c44536;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state-text {
  font-size: 14px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

/* Responsive */
@media (max-width: 1200px) {
  .split-layout {
    grid-template-columns: 400px 1fr;
  }
}

@media (max-width: 968px) {
  .split-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .form-panel {
    height: auto;
    max-height: 600px;
  }
  
  .map-panel {
    height: 500px;
  }
  
  .table-row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
  }

  .farmout-layout {
    grid-template-columns: 1fr;
  }

  .farmout-detail {
    order: -1;
  }
}

/* Leaflet Customization */
.leaflet-container {
  background: #1a1a1a;
}

.leaflet-popup-content-wrapper {
  background: #242424;
  color: #e0e0e0;
  border: 1px solid #3a3a3a;
}

.leaflet-popup-tip {
  background: #242424;
}

.popup-content {
  padding: 8px;
}

.popup-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 13px;
}

.popup-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.popup-field {
  display: flex;
  gap: 6px;
}

.popup-label {
  color: #b0b0b0;
}

.popup-value {
  color: #e0e0e0;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Driver Marker Styles */
.driver-marker {
  transition: transform 0.3s ease;
}

.driver-marker:hover {
  transform: scale(1.1);
}

/* Driver Status Panel */
.driver-status-panel {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 10px;
  max-width: 250px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.driver-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #3a3a3a;
}

.status-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.status-count {
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.driver-status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.driver-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  border-left: 3px solid;
  font-size: 11px;
  transition: background 0.2s;
}

.driver-status-item:hover {
  background: #242424;
  cursor: pointer;
}

.driver-status-item.available {
  border-color: #4caf50;
}

.driver-status-item.enroute {
  border-color: #ffa726;
}

.driver-status-item.arrived {
  border-color: #ffd54f;
}

.driver-status-item.passenger_onboard {
  border-color: #81c784;
}

.driver-status-item.busy {
  border-color: #ef5350;
}

.driver-status-item.offline {
  border-color: #9e9e9e;
}

.driver-status-icon {
  font-size: 14px;
}

.driver-status-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.driver-status-name {
  color: #ffffff;
  font-weight: 500;
}

.driver-status-details {
  color: #b0b0b0;
  font-size: 10px;
}

.driver-status-note {
  color: #8d8d8d;
  font-size: 10px;
  line-height: 1.4;
}
