/* ─── (was) RESERVE VEHICLE — now shared modal + timeline styling ─────────
   The Reserve Vehicle page was retired (vehicles.html/vehicles.js deleted),
   but this file must NOT be deleted with it. Alongside the now-unused
   .reserve-* / .vtl-* rules it carries selectors other pages rely on:

     .modal-header/.modal-body/.modal-card/.modal-close  index.html,
                                                         epn-network.html, app.js
     .dow-label, .today-header, .weekend                 app.js,
                                                         transfer-calendar.js
     .w3, .org                                           crew.html, heatmap.js

   Removing the genuinely dead rules is safe but fiddly, and was deliberately
   not attempted when the page was retired — the shared rules were verified by
   grepping every selector here against the remaining HTML/JS.
   ──────────────────────────────────────────────────────────────────────── */
/* ─── RESERVE VEHICLE BUTTON ─────────────────────────────── */
.btn-new-reservation {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0d1117;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.btn-new-reservation:hover { opacity: 0.85; }

/* ─── VEHICLE TIMELINE ───────────────────────────────────── */
/* Date header cells */
.vtl-day-header-cell {
  width: var(--day-w);
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  border-right: 1px solid rgba(48,54,61,0.45);
  user-select: none;
  gap: 1px;
  height: 100%;
}
.vtl-day-header-cell .dow-label  { font-size: 9px; color: var(--text-dim); text-transform: uppercase; }
.vtl-day-header-cell.weekend      { background: var(--weekend-bg); color: var(--text-dim); }
.vtl-day-header-cell.today-header { color: var(--today-color) !important; }
.vtl-day-header-cell.today-header .dow-label { color: var(--today-color) !important; }

/* Office header row (sidebar + timeline) */
.vtl-office-hdr {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(22,32,46,0.9);
  border-top: 2px solid;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
  flex-shrink: 0;
}
.vtl-office-hdr-timeline {
  background: rgba(88,166,255,0.03);
  position: relative;
}

/* Vehicle sidebar row */
.vtl-vehicle-row {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}
.vtl-vehicle-icon  { font-size: 22px; flex-shrink: 0; line-height: 1; }
.vtl-vehicle-info  { min-width: 0; }
.vtl-vehicle-name  {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vtl-vehicle-sub   {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Vehicle timeline row */
.vtl-timeline-row {
  height: 60px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  cursor: pointer;
  overflow: visible;
  transition: background 0.1s;
}
.vtl-timeline-row:hover { background: rgba(255,255,255,0.025); }

/* Reservation bars */
.vtl-bar {
  position: absolute;
  top: 11px;
  height: 38px;
  border-radius: 7px;
  border: 1px solid;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
  transition: filter 0.12s, transform 0.12s;
  min-width: 6px;
}
.vtl-bar:hover       { filter: brightness(1.18); transform: scaleY(1.04); }
.vtl-bar-clip-left   { border-radius: 0 7px 7px 0; }
.vtl-bar-clip-right  { border-radius: 7px 0 0 7px; }

.vtl-bar-label {
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Legend in sidebar */
.vtl-legend       { display: flex; flex-direction: column; gap: 7px; }
.vtl-legend-item  { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.vtl-legend-dot   { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ─── RESERVATION MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 520px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 28px 70px rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

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

.modal-row-2col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
}

.modal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.modal-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  font-size: 11px;
}

.modal-input, .modal-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-input:focus, .modal-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
}
.modal-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d8590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
.modal-select option { background: var(--surface2); color: var(--text); }
.modal-textarea      { resize: vertical; min-height: 72px; }

.modal-dates {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-dates .modal-input { flex: 1; }
.modal-date-arrow { color: var(--text-muted); font-size: 16px; flex-shrink: 0; }

/* Job search dropdown */
.modal-search-wrap       { position: relative; }
.modal-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  z-index: 200;
  max-height: 270px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.modal-search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.modal-search-item:last-child { border-bottom: none; }
.modal-search-item:hover      { background: var(--surface3); }
.modal-search-top   { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.modal-search-name  { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.modal-search-dates { font-size: 11px; color: var(--text-muted); }
.modal-search-office { font-size: 10px; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.modal-search-msg   { padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Linked job card */
.modal-job-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  position: relative;
}
.modal-job-top      { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.modal-job-name     { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.modal-job-proj     { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.modal-job-dates    { font-size: 11px; color: var(--accent); }
.modal-job-office-tag { font-size: 10px; color: var(--text-dim); margin-left: auto; }
.modal-job-clear {
  position: absolute;
  top: 9px; right: 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-job-clear:hover { background: var(--surface3); color: var(--text); }

/* Conflict alert */
.modal-conflict {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  border-radius: 8px;
  color: #f85149;
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 12px;
}

/* Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-footer-right  { display: flex; gap: 8px; }
.modal-delete-btn {
  background: transparent;
  border: 1px solid rgba(248,81,73,0.4);
  border-radius: 8px;
  color: #f85149;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-delete-btn:hover { background: rgba(248,81,73,0.1); }
.modal-cancel-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-cancel-btn:hover { background: var(--surface2); color: var(--text); }
.modal-save-btn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0d1117;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modal-save-btn:hover:not(:disabled)  { opacity: 0.85; }
.modal-save-btn:disabled              { opacity: 0.38; cursor: not-allowed; }

