* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #e8e8e8;
  color: #333;
  overflow-x: hidden;
  font-size: 12px;
}

/* Header */
.header {
  background: #2c3e50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  padding: 8px 20px;
  gap: 1rem;
}

.logo {
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: flex-start;
}

.nav-btn {
  padding: 10px 16px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: 3px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
  background: #e74c3c;
  font-weight: 600;
}

/* Window Tabs Bar */
.window-tabs-bar {
  background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
  border-bottom: 2px solid #ccc;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.window-tabs {
  display: flex;
  gap: 4px;
}

.window-tab {
  padding: 6px 16px;
  border: 1px solid #ccc;
  background: white;
  color: #333;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.window-tab:hover {
  background: #f8f9fa;
}

.window-tab.active {
  background: white;
  border-bottom-color: white;
  font-weight: 600;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid white;
}

.window-actions {
  display: flex;
  gap: 5px;
}

.window-actions .view-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  color: #333;
}

.window-actions .view-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Attention Warning - Now at top of page */
.attention-warning {
  background: #fff3cd;
  border: 2px solid #dc3545;
  border-left: 5px solid #dc3545;
  color: #dc3545;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin: 0;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.attention-warning strong {
  font-weight: 700;
  font-size: 14px;
}

/* Content layout with side actions */

.content-with-actions {
  position: relative;
  padding: 0 10px 10px 10px;
  box-sizing: border-box;
}

.content-with-actions .main-content { min-width: 0; }


.action-buttons-vertical {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  z-index: 900;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .content-with-actions { padding-right: 10px; }
  .action-buttons-vertical {
    position: sticky;
    top: 0;
    justify-content: flex-start;
  }
}

/* More menu */
.more-menu {
  position: relative;
  display: inline-block;
}

.btn-more {
  min-width: 70px;
}

.more-menu-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  min-width: 180px;
  display: none;
  z-index: 2000;
}

.more-menu-dropdown .dropdown-item {
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #c1121f;
}

.more-menu-dropdown .dropdown-item:hover {
  background: #f8d7da;
}

.conf-number-section {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #2c5aa0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.conf-label {
  font-size: 12px;
  font-weight: 700;
  color: #2c5aa0;
}

.conf-input {
  padding: 5px 10px;
  border: 1px solid #2c5aa0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  width: 100px;
  background: #f7fbff;
  color: #2c5aa0;
  text-align: center;
}

.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}


.action-btn {
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  white-space: nowrap;
}

.action-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-save {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.btn-save:hover {
  background: #218838;
  border-color: #1e7e34;
}

.btn-payments {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.btn-payments:hover {
  background: #0056b3;
  border-color: #004085;
}

/* Billing Tabs */
.billing-tabs {
  display: flex;
  gap: 2px;
  background: #e9ecef;
  padding: 8px 8px 0 8px;
  border-bottom: 2px solid #dee2e6;
}

.billing-tab {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: #f8f9fa;
  color: #495057;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: none;
}

.billing-tab:hover {
  background: #e9ecef;
}

.billing-tab.active {
  background: white;
  color: #2c5aa0;
  font-weight: 600;
  border-bottom: 2px solid white;
  position: relative;
  bottom: -2px;
}

.billing-tab-content {
  display: none;
}

.billing-tab-content.active {
  display: block;
}

/* Payment Info Tab Specific Styles */
.payment-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.payment-form-group {
  margin-bottom: 10px;
}

.payment-form-group-inline {
  margin-bottom: 0;
}

.payment-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.payment-control {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  background: white;
}

.payment-control:focus {
  outline: none;
  border-color: #4a90e2;
}

.payment-control-inline {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  background: white;
}

/* Payment Card Options */
.payment-card-options {
  display: flex;
  gap: 20px;
  margin: 12px 0;
  padding: 0;
}

.payment-radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: #333;
}

.payment-radio-option input[type="radio"] {
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin: 0;
}

.payment-radio-option span {
  font-weight: 400;
}

/* Card Input Group */
.payment-card-input-group {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.payment-card-icon-btn {
  padding: 6px 12px;
  background: #6c757d;
  border: 1px solid #5a6268;
  border-radius: 3px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 45px;
}

.payment-card-icon-btn:hover {
  background: #5a6268;
}

/* Section Title */
.payment-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  margin: 15px 0 10px 0;
  padding-bottom: 5px;
}

/* Add Card Button */
.payment-btn-add-card {
  width: 100%;
  padding: 10px;
  background: #ff5733;
  border: none;
  border-radius: 3px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
  margin-bottom: 15px;
}

.payment-btn-add-card:hover {
  background: #e63946;
}

/* Credit Card Notes */
.payment-notes-section {
  margin-top: 15px;
}

.payment-notes-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.payment-notes-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  resize: vertical;
}

.payment-notes-textarea:focus {
  outline: none;
  border-color: #4a90e2;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.btn-primary {
  background: #4a90e2;
  border-color: #4a90e2;
  color: white;
}

.btn-primary:hover {
  background: #357abd;
}

.btn-secondary {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

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

.btn-copy {
  background: #28a745;
  border-color: #28a745;
  color: white;
  font-size: 12px;
  padding: 6px 12px;
}

.btn-copy:hover {
  background: #218838;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 8px;
}

/* Main Content */
.main-content {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 12px;
}

/* Reservation Grid */
.reservation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

/* Columns */
.left-column,
.middle-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.middle-column,
.right-column {
  gap: 6px;
}

.middle-column .panel,
.right-column .panel {
  padding: 4px;
}

.middle-column .form-section,
.right-column .form-section {
  padding: 3px;
}

.middle-column .panel,
.right-column .panel {
  height: fit-content;
}

/* Compact the trip-details column spacing */
.middle-column .time-grid { gap: 2px; margin-bottom: 2px; }
.middle-column .form-row,
.middle-column .form-row-2,
.middle-column .form-row-3,
.middle-column .form-row-4 { gap: 2px; margin-bottom: 2px; }
.middle-column .location-types { gap: 4px; margin: 4px 0; }
.middle-column .location-dropdown { margin: 4px 0; padding: 6px; }
.middle-column .form-group { margin-bottom: 1px; }

/* Compact the reservation-details column spacing */
.right-column .form-row { gap: 2px; margin-bottom: 2px; }
.right-column .form-row-2,
.right-column .form-row-3,
.right-column .form-row-4 { gap: 2px; margin-bottom: 2px; }
.right-column .form-group { margin-bottom: 2px; }
.right-column .form-divider { margin: 6px 0; }

/* Panels */
.panel {
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: visible;
}

/* Color-coded field groups - 50% opacity backgrounds */
.field-group-billing {
  background: rgba(66, 133, 244, 0.08); /* Blue tint for billing */
  border-left: 3px solid rgba(66, 133, 244, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-passenger {
  background: rgba(52, 168, 83, 0.08); /* Green tint for passenger */
  border-left: 3px solid rgba(52, 168, 83, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-agent {
  background: rgba(251, 188, 5, 0.08); /* Yellow tint for booking agent */
  border-left: 3px solid rgba(251, 188, 5, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-trip {
  background: rgba(234, 67, 53, 0.08); /* Red tint for trip details */
  border-left: 3px solid rgba(234, 67, 53, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-routing {
  background: rgba(103, 58, 183, 0.08); /* Purple tint for routing */
  border-left: 3px solid rgba(103, 58, 183, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-costs {
  background: rgba(0, 150, 136, 0.08); /* Teal tint for costs */
  border-left: 3px solid rgba(0, 150, 136, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

.field-group-vehicle {
  background: rgba(255, 87, 34, 0.08); /* Orange tint for vehicle/driver */
  border-left: 3px solid rgba(255, 87, 34, 0.5);
  padding: 8px 10px;
  margin: -12px -12px 12px -12px;
  padding-top: 12px;
}

/* Panel header color indicators to match field groups */
#bookingAgentSection .panel-header {
  background: linear-gradient(180deg, rgba(251, 188, 5, 0.15) 0%, rgba(251, 188, 5, 0.08) 100%);
  border-left: 3px solid rgba(251, 188, 5, 0.6);
}

/* Add Section Link */
.add-section-link {
  padding: 8px 12px;
  text-align: center;
}

.btn-link-add {
  background: transparent;
  border: 1px dashed #90a4ae;
  border-radius: 4px;
  padding: 8px 16px;
  color: #607d8b;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-link-add:hover {
  background: rgba(251, 188, 5, 0.1);
  border-color: #ffc107;
  color: #f57c00;
}

.panel-small {
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 10px;
}

.panel-header {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #ccc;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trip-details-header {
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.form-section {
  padding: 12px;
  max-height: none;
  overflow: visible;
}

.subsection-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin: 10px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}

/* Form Controls */
.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 11px;
  color: #555;
  margin-bottom: 3px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  background: white;
}

/* Enlarge key billing/passenger text fields for readability */
#billingFirstName,
#billingLastName,
#billingPhone,
#billingEmail,
#passengerFirstName,
#passengerLastName,
#passengerPhone,
#passengerEmail {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 9px;
}

.form-control:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

textarea.form-control {
  resize: vertical;
  font-family: inherit;
}

/* Form Row Layouts */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.form-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

/* Stops Container */
#stopsContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.stop-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 6px;
  padding: 8px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
}

.form-group-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.form-group-inline label {
  font-size: 11px;
  color: #555;
  font-weight: 500;
}

.stop-type {
  width: 100%;
}

/* Compact layout to fit more above the fold */
.header-content {
  padding: 6px 12px;
}

.window-tabs-bar {
  padding: 6px 12px;
}

.action-buttons-bar {
  padding: 8px 12px;
}

.panel {
  padding: 8px;
}

.panel-header {
  padding: 6px 10px;
}

.form-section {
  padding: 8px;
}

.form-group {
  margin-bottom: 6px;
}

.form-row-2,
.form-row-3,
.form-row-4 {
  gap: 6px;
  margin-bottom: 8px;
}

.subsection-title {
  margin: 8px 0 6px 0;
}

/* Ultra-compact overrides for tighter vertical spacing */
.main-content {
  padding: 4px;
}

.reservation-grid {
  gap: 6px;
}

.left-column,
.middle-column,
.right-column {
  gap: 6px;
}

.panel {
  border-radius: 2px;
  padding: 6px;
}

.attention-warning {
  padding: 6px 10px;
  font-size: 12px;
}

.action-buttons {
  gap: 6px;
}

.action-btn,
.btn-copy,
.btn-small {
  padding: 4px 8px;
  font-size: 10px;
}

.form-section {
  padding: 4px;
}

.form-group {
  margin-bottom: 3px;
}

.form-group label,
.form-group-inline label {
  margin-bottom: 1px;
  font-size: 9px;
}

.form-control,
.payment-control,
.payment-control-inline {
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1.2;
}

.form-row-2,
.form-row-3,
.form-row-4 {
  gap: 2px;
  margin-bottom: 3px;
}

.payment-form-group,
.payment-form-group-inline {
  margin-bottom: 5px;
}

.payment-form-row-2 {
  gap: 5px;
}

.stop-row {
  gap: 3px;
  padding: 5px;
}

.cost-row {
  grid-template-columns: 1fr 80px 80px 80px;
}

.cost-cell {
  padding: 3px 4px;
}

.cost-input {
  padding: 2px 4px;
  font-size: 9px;
}

/* Cost Breakdown */

/* Cost layout: single area with 4 fixed columns */
.cost-table {
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0;
}

.cost-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}

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

.cost-row.header {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 11px;
  border-color: #dcdfe3;
}

.cost-row.summary {
  background: #f6f7f9;
  font-weight: 700;
  border-top: 1px solid #dcdfe3;
}

.cost-cell {
  padding: 5px 6px;
  border-right: 1px solid #e0e0e0;
  font-size: 11px;
  display: flex;
  align-items: center;
}

/* Give the first column extra breathing room vertically */
.cost-row .cost-cell:first-child {
  padding-top: 9px;
  padding-bottom: 9px;
}

.cost-cell:last-child {
  border-right: none;
}

.cost-input {
  width: 100%;
  padding: 3px 5px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 11px;
  font-family: inherit;
  text-align: right;
}

.cost-input:focus {
  outline: none;
  border-color: #4a90e2;
}

.cost-input[readonly] {
  background: #f8f9fa;
  color: #666;
}

/* Total Section */
.total-section {
  margin-top: 10px;
  border-top: 2px solid #333;
  padding-top: 10px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 12px;
}

.total-row.highlight {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 13px;
  border: 2px solid #333;
  margin-top: 4px;
}

.total-label {
  color: #555;
}

.total-value {
  font-weight: 600;
  color: #333;
}

/* Account Status */
.account-status {
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  text-align: center;
}

.status-message {
  font-size: 13px;
  color: #666;
}

.status-message.success {
  color: #28a745;
}

.status-message.warning {
  color: #ffc107;
}

.status-message.error {
  color: #dc3545;
}

/* Suggestions Dropdown */
.suggestions-dropdown,
.location-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 5000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  top: 0;
  left: 0;
  padding-top: 2px;
}

.suggestions-dropdown.active,
.location-suggestions.active {
  display: block;
}

.suggestion-item,
.location-suggestion-item {
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover,
.location-suggestion-item:hover {
  background: #f8f9fa;
}

.location-suggestion-item .poi-name {
  font-weight: 600;
  color: #333;
  display: block;
}

.location-suggestion-item .poi-address {
  font-size: 11px;
  color: #666;
  display: block;
  margin-top: 2px;
}

.location-suggestion-item .poi-category {
  font-size: 10px;
  color: #4a90e2;
  display: inline-block;
  margin-top: 2px;
}

/* Status Indicator */
.status-indicator {
  background: #f8f9fa !important;
  color: #333;
  font-weight: 600;
  cursor: not-allowed;
}

.status-indicator[value="Farm-out Unassigned"] {
  color: #6c757d;
}

.status-indicator[value="Pending"] {
  color: #ffc107;
}

.status-indicator[value="Farm-out Assigned"] {
  color: #28a745;
}

.status-indicator[value="Farm-out Completed"] {
  color: #007bff;
}

/* Affiliate Suggestions */
.affiliate-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 3px 3px;
  max-height: 200px;
  overflow-y: auto;
  width: calc(100% - 70px);
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
  top: 100%;
  left: 0;
}

.affiliate-suggestions.active {
  display: block;
}

.affiliate-suggestion-item {
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.affiliate-suggestion-item:hover {
  background: #f8f9fa;
}

.affiliate-company {
  font-weight: 600;
  color: #333;
  display: block;
}

.affiliate-contact {
  font-size: 11px;
  color: #666;
  display: block;
  margin-top: 2px;
}

.affiliate-location {
  font-size: 10px;
  color: #4a90e2;
  display: inline-block;
  margin-top: 2px;
}

/* Icon Buttons */
.btn-icon {
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f8f9fa;
  border-color: #999;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  padding: 15px 20px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #ccc;
}

/* Affiliate List Modal */
.affiliate-search-bar {
  margin-bottom: 15px;
}

.affiliate-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.affiliate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

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

.affiliate-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ccc;
  color: #333;
}

.affiliate-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
}

.affiliate-table tbody tr:hover {
  background: #f8f9fa;
}

.affiliate-table .btn-select {
  padding: 4px 12px;
  font-size: 11px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.affiliate-table .btn-select:hover {
  background: #357abd;
}

/* Address Confirmation Modal */
.address-confirm-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
}

.address-option-item {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  transition: background 0.2s;
}

.address-option-item:hover {
  background: #f8f9fa;
}

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

.address-option-item input[type="radio"] {
  margin-right: 10px;
  margin-top: 3px;
  cursor: pointer;
}

.address-option-content {
  flex: 1;
}

.address-option-content strong {
  display: block;
  font-size: 13px;
  color: #333;
  margin-bottom: 4px;
}

.address-option-content .address-details {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.custom-address-option {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #e0e0e0;
}

.custom-option {
  background: #fffbf0;
  border: 2px solid #ffc107;
  border-radius: 3px;
  padding: 12px !important;
}

.custom-option:hover {
  background: #fff8e1;
}

.custom-address-preview {
  margin-top: 8px;
  padding: 8px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Account Info Display */
.account-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-label {
  font-weight: 600;
  min-width: 120px;
  color: #555;
  font-size: 13px;
}

.info-value {
  color: #333;
  font-size: 13px;
}

.duplicate-warning {
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 3px;
  margin-bottom: 15px;
}

.duplicate-warning h4 {
  color: #856404;
  font-size: 14px;
  margin-bottom: 8px;
}

.duplicate-warning p {
  color: #856404;
  font-size: 12px;
}

/* Route Information */
.route-info {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
}

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

.route-detail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}

.route-label {
  font-weight: 600;
  color: #555;
  min-width: 80px;
}

.route-value {
  color: #333;
}

.route-directions {
  flex: 1;
  color: #333;
}

.direction-step {
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}

.direction-step:last-child {
  border-bottom: none;
}

.direction-step .step-distance {
  color: #666;
  font-size: 11px;
  margin-left: 5px;
}

/* Address Suggestions */
.address-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 5000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  top: 0;
  padding-top: 2px;
}

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

.address-suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

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

.address-suggestion-item .suggestion-main {
  color: #333;
  font-weight: 500;
}

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

/* Time Grid */
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

/* Emphasize key pickup/drop-off times */
#puDate,
#puTime,
#doTime {
  font-size: 14px;
  font-weight: 700;
}

/* Address Grid */
.address-grid {
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 6px;
}

/* Location Types */
.location-types {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.location-type-option {
  display: flex;
  align-items: center;
  gap: 5px;
}

.location-type-option input[type="radio"] {
  margin: 0;
}

.location-type-option label {
  margin: 0;
  cursor: pointer;
  font-size: 13px;
}

/* Location Dropdowns */
.location-dropdown {
  margin: 15px 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #4a90e2;
  border-radius: 3px;
}

.location-dropdown .form-control {
  font-weight: 500;
}

/* Location Suggestion Item (for businesses/landmarks) */
.location-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  transition: background 0.2s;
}

.location-suggestion-item:hover {
  background: #f0f7ff;
}

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

/* Airline Suggestions */
.airline-suggestions,
.flight-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 3px 3px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
}

.airline-suggestions.active,
.flight-suggestions.active {
  display: block;
}

/* View-only mode styles */
body.view-mode .attention-warning {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
}

body.view-mode .attention-warning.view-mode-banner-active {
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

body.view-mode .view-mode-field {
  background-color: #f3f4f6 !important;
  color: #1f2937;
  cursor: default;
}

body.view-mode .view-mode-field:focus {
  outline: none;
  box-shadow: none;
}

body.view-mode .view-mode-disabled-button {
  opacity: 0.45;
  cursor: not-allowed !important;
}

body.view-mode .view-mode-allow {
  opacity: 1;
  cursor: pointer;
}

body.view-mode .address-entry-card {
  display: none;
}

.airline-suggestion-item,
.flight-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.airline-suggestion-item:hover,
.flight-suggestion-item:hover {
  background: #f8f9fa;
}

.airline-suggestion-item:last-child,
.flight-suggestion-item:last-child {
  border-bottom: none;
}

/* Airport Suggestions */
.airport-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 3px 3px;
  max-height: 280px;
  overflow-y: auto;
  width: 100%;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
}

.airport-suggestions.active {
  display: block;
}

.airport-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.airport-suggestion-item:hover {
  background: #e8f4f8;
}

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

.airport-code {
  display: inline-block;
  background: #0066cc;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 12px;
  width: fit-content;
}

.airport-name {
  font-size: 13px;
  font-weight: 500;
  color: #222;
}

.airport-city {
  font-size: 11px;
  color: #666;
}

.airline-code {
  display: inline-block;
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 11px;
  margin-right: 8px;
  color: #495057;
}

.airline-name {
  font-size: 12px;
  color: #333;
}

.flight-info-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.flight-number-display {
  font-weight: 600;
  color: #333;
}

.flight-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.flight-status-badge.on-time {
  background: #d4edda;
  color: #155724;
}

.flight-status-badge.delayed {
  background: #fff3cd;
  color: #856404;
}

.flight-status-badge.cancelled {
  background: #f8d7da;
  color: #721c24;
}

.flight-info-secondary {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* Flight Status Indicator */
.flight-status-indicator {
  margin-top: 15px;
  padding: 12px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  font-size: 20px;
}

.status-text {
  font-size: 12px;
  color: #155724;
  font-weight: 500;
}

/* Address Table Window */
.address-table-window {
  background: white;
  border: 2px solid #ccc;
  border-radius: 4px;
  margin: 15px 0 30px 0;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

.address-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.address-table thead {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #ccc;
}

.address-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 12px;
  border-right: 1px solid #e0e0e0;
}

.address-table th:last-child {
  border-right: none;
}

.address-table tbody {
  background: white;
}

.address-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  vertical-align: middle;
}

.address-table td:last-child {
  border-right: none;
}

.address-table tbody tr:last-child td {
  border-bottom: none;
}

.address-table tbody tr:hover {
  background: #f8f9fa;
}

.empty-row {
  background: #f8f9fa;
}

.empty-message {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 30px !important;
}

.address-table .stop-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.stop-type-badge.pickup {
  background: #d4edda;
  color: #155724;
}

.stop-type-badge.dropoff {
  background: #cce5ff;
  color: #004085;
}

.stop-type-badge.stop {
  background: #fff3cd;
  color: #856404;
}

.stop-type-badge.wait {
  background: #f8d7da;
  color: #721c24;
}

.address-table .btn-remove {
  padding: 4px 8px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.address-table .btn-edit {
  padding: 4px 8px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.address-table .btn-edit:hover {
  background: #5a6268;
}

.address-table .btn-remove:hover {
  background: #c82333;
}

/* Consolidated Address / Stops Card */
.address-entry-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
  margin: 10px 0 18px 0;
}

.address-entry-card .location-types {
  margin-top: 0;
}

/* Remove the nested "boxed" look so everything reads as a single consolidated window */
.address-entry-card .address-entry {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 12px 0;
}

.address-entry-card .stop-type-selector {
  background: transparent;
  border: 0;
  padding: 8px 0 0 0;
  margin: 10px 0 12px 0;
}

.address-entry-card .stored-routing {
  margin: 0;
}

.address-entry-card .routing-info-box {
  background: transparent;
  border: 0;
  padding: 0;
}

.address-entry-card .subsection-title {
  margin-top: 16px;
}

/* Address Entry */
.address-entry {
  background: #f8f9fa;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  margin: 0 0 20px 0;
  position: relative;
  overflow: visible;
}

.address-entry .form-group {
  margin-bottom: 2px;
  position: relative;
}

.location-name-group {
  position: relative;
  z-index: 8000;
}

.location-name-group .location-suggestions {
  top: 100%;
}

.address-entry .form-group label {
  margin-bottom: 2px;
  font-size: 11px;
}

.address-entry .form-control {
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.address-entry .address-input,
.address-entry .location-name {
  font-size: 14px;
  font-weight: 600;
}

.address-entry textarea.form-control {
  min-height: 96px;
}

.address-entry .address-grid {
  gap: 6px;
}

.address-entry .address-suggestions,
.address-entry .location-suggestions {
  z-index: 4000;
}

/* Stop Type Selector */
.stop-type-selector {
  display: flex;
  gap: 12px;
  margin: 15px 0;
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  flex-wrap: wrap;
  align-items: center;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.radio-option input[type="radio"] {
  margin: 0;
}

.radio-option span {
  font-size: 13px;
  font-weight: 500;
}

/* Create Button */
.btn-create {
  width: 100%;
  padding: 10px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  font-weight: 600;
  margin-top: 10px;
}

.stop-type-selector .btn-create-inline {
  width: auto;
  padding: 8px 14px;
  margin-left: auto;
  margin-top: 0;
}

.btn-create:hover {
  background: #e0e0e0;
}

/* Stored Routing */
.stored-routing {
  margin: 20px 0;
}

.routing-info-box {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 15px;
  border-radius: 3px;
  color: #666;
  font-size: 12px;
}

/* Notes Tabs */
.notes-tabs-container {
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.notes-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.notes-tab {
  flex: 1;
  padding: 10px 15px;
  background: transparent;
  border: none;
  border-right: 1px solid #e0e0e0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.notes-tab:last-child {
  border-right: none;
}

.notes-tab:hover {
  background: #fff;
}

.notes-tab.active {
  background: #fff;
  color: #333;
  border-bottom: 2px solid #4a90e2;
}

.notes-content {
  background: white;
}

.notes-panel {
  display: none;
  padding: 15px;
}

.notes-panel.active {
  display: block;
}

.notes-textarea {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 10px;
  font-family: inherit;
  resize: vertical;
}

.notes-options {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.notes-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 12px;
  cursor: pointer;
}

.notes-options input[type="checkbox"] {
  margin: 0;
}

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

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

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

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  margin: 0;
}

.form-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 15px 0;
}

.additional-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.additional-link a {
  color: #4a90e2;
  text-decoration: none;
  font-size: 12px;
}

.additional-link a:hover {
  text-decoration: underline;
}

.total-indicator {
  font-size: 12px;
  color: #dc3545;
  font-weight: 600;
}

.farm-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: flex-end;
}

.farm-options {
  display: flex;
  gap: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 3px;
}

.radio-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
}

.radio-inline input[type="radio"] {
  margin: 0;
}

.radio-inline span {
  font-size: 13px;
  font-weight: 500;
}

.btn-icon {
  padding: 6px 10px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #e0e0e0;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.cost-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin: 20px 0 0 0;
}

.cost-tab {
  flex: 1;
  padding: 10px;
  background: #f8f9fa;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.cost-tab:hover {
  background: #e9ecef;
}

.cost-tab.active {
  background: white;
  border-bottom-color: #4a90e2;
  color: #4a90e2;
}

.cost-tab-content {
  display: none;
  padding: 8px 0 0 0;
}

.cost-tab-content.active {
  display: block;
}

.percent-label {
  font-size: 12px;
  color: #666;
}

.grand-total-section {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border: 2px solid #333;
  border-radius: 3px;
}

.grand-total-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.grand-total-row label {
  font-weight: 600;
  font-size: 13px;
  flex: 0 0 auto;
}

.currency-select {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  flex: 0 0 auto;
}

.grand-total-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #333;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  background: white;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.totals-row label {
  font-size: 12px;
  font-weight: 500;
}

.totals-input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  text-align: right;
  width: 120px;
  font-weight: 600;
}

.payments-color {
  color: #dc3545;
  background: #fff5f5;
}

.total-due-row {
  padding-top: 8px;
  border-top: 1px solid #333;
  margin-top: 8px;
}

.total-due-color {
  color: #dc3545;
  background: #fff5f5;
  border-color: #dc3545;
  font-weight: 700;
}

.assignment-tabs {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.assignment-tab {
  flex: 1;
  padding: 8px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.assignment-tab:hover {
  background: #e0e0e0;
}

.assignment-tab.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: white;
}

.assignment-content {
  display: none;
}

.assignment-content.active {
  display: block;
}

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

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 1400px) {
  .reservation-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

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

  .stop-row {
    grid-template-columns: 1fr;
  }

  .cost-row {
    grid-template-columns: 1fr 60px 60px 60px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 10px;
  }

  .cost-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cost-cell {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }

  .cost-cell:last-child {
    border-bottom: none;
  }
}

/* ========================================
   CONSOLIDATED ROUTING PANEL
   ======================================== */

.routing-panel {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0 20px 0;
}

.routing-panel .stored-routing {
  margin: 0 0 12px 0;
}

.routing-panel .routing-info-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

/* Quick Add Buttons */
.routing-quick-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.routing-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.routing-action-btn .action-icon {
  font-size: 14px;
}

.routing-action-btn.pickup-btn {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}
.routing-action-btn.pickup-btn:hover {
  background: #c8e6c9;
  border-color: #81c784;
}

.routing-action-btn.dropoff-btn {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
}
.routing-action-btn.dropoff-btn:hover {
  background: #ffe0b2;
  border-color: #ffb74d;
}

.routing-action-btn.stop-btn {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}
.routing-action-btn.stop-btn:hover {
  background: #bbdefb;
  border-color: #64b5f6;
}

.routing-action-btn.wait-btn {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #ce93d8;
}
.routing-action-btn.wait-btn:hover {
  background: #e1bee7;
  border-color: #ba68c8;
}

/* Address Entry Card (expandable form) */
.address-entry-card {
  background: #f8fafc;
  border: 2px solid #1976d2;
  border-radius: 8px;
  padding: 0;
  margin: 12px 0;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #1976d2;
  color: white;
}

.entry-type-label {
  font-size: 14px;
  font-weight: 600;
}

.close-entry-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.8;
}
.close-entry-btn:hover {
  opacity: 1;
}

/* Location Type Tabs */
.location-type-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  background: white;
}

.location-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #666;
}

.location-tab:hover {
  background: #f5f5f5;
  color: #333;
}

.location-tab.active {
  color: #1976d2;
  border-bottom-color: #1976d2;
  background: #e3f2fd;
}

/* Location Panels */
.location-panel {
  padding: 16px;
}

.location-panel .form-group {
  margin-bottom: 12px;
}

.location-panel label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #37474f;
  margin-bottom: 4px;
}

.location-panel .form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
}

.location-panel .form-control:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.location-panel .address-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}

.location-panel .form-row {
  display: flex;
  gap: 12px;
}

.location-panel .form-row .form-group {
  flex: 1;
}

/* Entry Card Actions */
.entry-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: #f0f4f8;
  border-top: 1px solid #e0e0e0;
}

.entry-card-actions .btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.entry-card-actions .btn-secondary {
  background: #e0e0e0;
  color: #424242;
  border: 1px solid #bdbdbd;
}
.entry-card-actions .btn-secondary:hover {
  background: #d0d0d0;
}

.entry-card-actions .btn-create {
  background: #1976d2;
  color: white;
  border: none;
}
.entry-card-actions .btn-create:hover {
  background: #1565c0;
}

/* Route Metrics Inline */
.route-details-inline {
  display: flex;
  gap: 24px;
  padding: 12px;
  background: #e8f5e9;
  border-radius: 4px;
  margin-top: 12px;
}

.route-metric {
  display: flex;
  gap: 6px;
  align-items: center;
}

.route-metric .route-label {
  font-size: 12px;
  color: #546e7a;
  font-weight: 500;
}

.route-metric .route-value {
  font-size: 14px;
  font-weight: 600;
  color: #2e7d32;
}

/* Suggestions Dropdowns */
.location-suggestions,
.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.location-suggestions.active,
.address-suggestions.active {
  display: block;
}

.location-suggestion-item,
.address-suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.location-suggestion-item:hover,
.address-suggestion-item:hover {
  background: #f5f7fa;
}

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

.poi-name,
.suggestion-main {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: block;
}

.poi-address,
.suggestion-secondary {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  display: block;
}

.poi-category {
  font-size: 11px;
  color: #888;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
  display: inline-block;
}

/* ========================================
   RATE CONFIGURATION PANEL
   ======================================== */

.rate-config-panel {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef4 100%);
  border: 1px solid #c5d0db;
  border-radius: 8px;
  margin: 16px 0;
  overflow: hidden;
}

.rate-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #37474f;
  color: white;
}

.rate-config-title {
  font-size: 13px;
  font-weight: 600;
}

.rate-config-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  transition: transform 0.2s ease;
}

.rate-config-toggle.collapsed {
  transform: rotate(-90deg);
}

.rate-config-body {
  padding: 14px;
}

.rate-config-body.collapsed {
  display: none;
}

.rate-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e0e5eb;
}

.rate-row:last-of-type {
  border-bottom: none;
}

.rate-label {
  font-size: 12px;
  color: #546e7a;
  font-weight: 500;
}

.rate-value {
  font-size: 13px;
  font-weight: 600;
  color: #263238;
}

.rate-config-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d0d7de;
}

.rate-config-actions .btn-small {
  padding: 6px 16px;
  font-size: 12px;
}


