/* Digitool RentTrack — Smart Fleet Calendar v1.4 Stylesheet
 * Strictly reproduces approved mobile calendar visual design & interactions.
 */
:root {
  --cal-bg: #101822;
  --cal-surface: #18232e;
  --cal-ink: #eef4f7;
  --cal-muted: #b1c0cd;
  --cal-line: #334553;
  --cal-teal: #087970;
  --cal-soft: #123838;
}

#rt-smart-calendar-root {
  flex: 1 1 0% !important;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  background: var(--cal-bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#rt-mobile-bottom-nav {
  flex-shrink: 0 !important;
  z-index: 100 !important;
}

html[data-theme="light"] #rt-smart-calendar-root,
body.light-theme #rt-smart-calendar-root,
body.light #rt-smart-calendar-root {
  --cal-bg: #f5f7f9;
  --cal-surface: #ffffff;
  --cal-ink: #172735;
  --cal-muted: #526170;
  --cal-line: #d6e0e7;
  --cal-teal: #076f69;
  --cal-soft: #daf1ee;
  background: var(--cal-bg);
}

.rt-fleet-cal-app {
  --bg: #101822;
  --surface: #18232e;
  --ink: #eef4f7;
  --muted: #b1c0cd;
  --line: #334553;
  --teal: #087970;
  --soft: #123838;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
  color: var(--ink);
  background: var(--bg);
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
  min-height: 100%;
  margin: 0 auto;
  padding: 14px 12px 76px;
  overflow-x: hidden;
}

html[data-theme="light"] .rt-fleet-cal-app,
body.light-theme .rt-fleet-cal-app,
body.light .rt-fleet-cal-app,
.rt-fleet-cal-app.light {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --ink: #172735;
  --muted: #526170;
  --line: #d6e0e7;
  --teal: #076f69;
  --soft: #daf1ee;
  color-scheme: light;
  color: var(--ink);
  background: var(--bg);
}

.rt-fleet-cal-app * {
  box-sizing: border-box;
}

.rt-fleet-cal-app button,
.rt-fleet-cal-app input,
.rt-fleet-cal-app select {
  font: 500 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

.rt-fleet-cal-app button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rt-fleet-cal-app button.active,
.rt-fleet-cal-app button.primary {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #fff !important;
}

.rt-fleet-cal-app button:focus-visible,
.rt-fleet-cal-app [role="button"]:focus-visible,
.rt-fleet-cal-app input:focus-visible,
.rt-fleet-cal-app select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.rt-fleet-cal-app button:disabled {
  opacity: 0.5;
  cursor: default;
}

.rt-fleet-cal-app button:hover {
  border-color: var(--teal);
}

.rt-fleet-cal-app .head,
.rt-fleet-cal-app .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rt-fleet-cal-app .head {
  margin-bottom: 12px;
}

.rt-fleet-cal-app .head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.rt-fleet-cal-app .head .row {
  flex-shrink: 0;
  gap: 6px;
}

.rt-fleet-cal-app .head h1 {
  font: 700 20px/1.25 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.3px;
  margin: 0 0 2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-fleet-cal-app .sub,
.rt-fleet-cal-app .muted,
.rt-fleet-cal-app small {
  color: var(--muted);
}

.rt-fleet-cal-app .sub {
  font: 400 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-fleet-cal-app .iconbtn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.rt-fleet-cal-app .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  margin-bottom: 10px;
  max-width: 100%;
  overflow-x: hidden;
}

.rt-fleet-cal-app .toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rt-fleet-cal-app .toolbar.row {
  width: 100%;
  flex-wrap: wrap;
}

.rt-fleet-cal-app .toolbar.row > .toolbar:first-child {
  flex: 1 1 auto;
  justify-content: space-between;
  min-width: 0;
}

.rt-fleet-cal-app .toolbar strong {
  font: 600 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  color: var(--ink);
}

.rt-fleet-cal-app .toolbar button {
  padding: 6px 10px;
  min-height: 44px;
  min-width: 44px;
  font: 500 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 8px;
}

/* 4 COMPACT ICON-BASED VIEW CARDS */
.rt-fleet-cal-app .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 10px;
  width: 100%;
}

.rt-fleet-cal-app .view-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 3px;
  min-height: 52px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.rt-fleet-cal-app .view-card .view-card-ico {
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
}

.rt-fleet-cal-app .view-card .view-card-label {
  font: 600 12.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
}

/* Active view: teal background, white icon and text */
.rt-fleet-cal-app .view-card.active {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #ffffff !important;
}

.rt-fleet-cal-app .view-card.active .view-card-ico,
.rt-fleet-cal-app .view-card.active .view-card-label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Inactive views: light-gray background with muted icons and text */
.rt-fleet-cal-app.light .view-card:not(.active) {
  background: #eaedf1;
  border-color: #d8e0e8;
}

.rt-fleet-cal-app:not(.light) .view-card:not(.active) {
  background: #18232e;
  border-color: #273645;
}

.rt-fleet-cal-app .controls-area {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
  width: 100%;
}

.rt-fleet-cal-app .controls-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

/* Display Modes Group: Coverage / Dots / Count */
.rt-fleet-cal-app .group {
  display: flex;
  gap: 4px;
  width: 100%;
}

.rt-fleet-cal-app .group button {
  font: 500 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 7px 8px;
  min-height: 44px;
  flex: 1 1 0;
  text-align: center;
  border-radius: 8px;
}

.rt-fleet-cal-app .group button.active {
  background: var(--soft) !important;
  color: var(--ink) !important;
  border-color: var(--teal) !important;
  font-weight: 600;
}

/* Dropdown Filters */
.rt-fleet-cal-app .fleet-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.rt-fleet-cal-app .filter-select,
.rt-fleet-cal-app select {
  font: 500 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  padding: 8px 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

.rt-fleet-cal-app select option {
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.rt-fleet-cal-app input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 44px;
  max-width: 100%;
  font: 400 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.rt-fleet-cal-app input::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

/* Weekday header (Sunday-first) */
.rt-fleet-cal-app .weekday,
.rt-fleet-cal-app .days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2.5px;
  width: 100%;
}

.rt-fleet-cal-app .weekday span {
  text-align: center;
  font: 600 10.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
  padding: 5px 0 3px;
  text-transform: uppercase;
}

/* Month Week Card */
.rt-fleet-cal-app .week {
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 4px;
  width: 100%;
}

/* Month Day Cell */
.rt-fleet-cal-app .day {
  min-height: 36px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  padding: 3px 1px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  line-height: 1;
  min-width: 0;
  transition: border-color 0.12s ease, background 0.12s ease;
}

/* Selected Date: Teal border ONLY. No solid teal circular highlight */
.rt-fleet-cal-app .day.selected {
  border: 1.5px solid var(--teal) !important;
  background: transparent !important;
}

.rt-fleet-cal-app .day.selected .day-num {
  background: transparent !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  font-weight: 700 !important;
}

/* Day Number text */
.rt-fleet-cal-app .day .day-num {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font: 600 12.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1;
  margin-bottom: 2px;
  color: var(--ink);
}

/* Today's Date Indicator */
.rt-fleet-cal-app .day.today:not(.selected) {
  border-color: rgba(8, 121, 112, 0.45);
}

.rt-fleet-cal-app .day.today:not(.selected) .day-num {
  color: var(--ink) !important;
  font-weight: 700 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rt-fleet-cal-app .day.out {
  opacity: 0.15;
  pointer-events: none;
}

.rt-fleet-cal-app .day .dots {
  display: flex;
  justify-content: center;
  gap: 1.5px;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
}

.rt-fleet-cal-app .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.rt-fleet-cal-app .day .count {
  color: var(--muted);
  font: 600 9.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin-top: 2px;
}

/* Continuous Coverage Bars across separate non-overlapping lanes */
.rt-fleet-cal-app .coverage-row {
  position: relative;
  height: var(--rt-cal-slot-height, 7px);
  margin-top: 2.5px;
  width: 100%;
}

.rt-fleet-cal-app .bar {
  height: 100%;
  position: absolute;
  border-radius: 2px;
  opacity: 0.95;
  transition: opacity 0.1s ease;
}

.rt-fleet-cal-app .bar.continues-before {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.rt-fleet-cal-app .bar.continues-after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rt-fleet-cal-app .hint {
  font: 400 11px/1.4 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
  margin: 8px 0 2px;
}

.rt-fleet-cal-app .sectiontitle {
  font: 700 15px/1.3 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  color: var(--ink);
}

/* Booking Entry */
.rt-fleet-cal-app .entry {
  background: var(--bg);
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  max-width: 100%;
  border: 1px solid var(--line);
}

.rt-fleet-cal-app .entry .stripe {
  height: 34px;
  width: 3.5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.rt-fleet-cal-app .entry .body {
  flex: 1 1 0;
  min-width: 0;
}

.rt-fleet-cal-app .entry strong {
  display: block;
  font: 600 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

.rt-fleet-cal-app .entry small {
  display: block;
  font: 400 12px/1.45 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin-top: 2px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-fleet-cal-app .pill {
  font: 500 10.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 3px 6px;
  white-space: nowrap;
  color: var(--ink);
  flex-shrink: 0;
  background: var(--surface);
}

.rt-fleet-cal-app .note-pill {
  font: 500 10px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 4px;
  background: rgba(8, 121, 112, 0.18);
  color: var(--teal);
  padding: 2px 5px;
  margin-left: 5px;
  white-space: nowrap;
}

.rt-fleet-cal-app .hidden {
  display: none !important;
}

.rt-fleet-cal-app .line {
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

/* CALENDAR PREFERENCES CARD & 3 SECTIONS */
.rt-fleet-cal-app .pref-card {
  border-color: var(--teal);
}

.rt-fleet-cal-app .pref-header {
  margin-bottom: 10px;
}

.rt-fleet-cal-app .iconbtn-close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
}

.rt-fleet-cal-app .pref-feedback {
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font: 500 12.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rt-fleet-cal-app .pref-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.rt-fleet-cal-app .pref-feedback.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #22c55e;
}

.rt-fleet-cal-app .pref-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-fleet-cal-app .pref-section-title {
  font: 700 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  margin: 0;
}

.rt-fleet-cal-app .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font: 500 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  width: 100%;
}

.rt-fleet-cal-app .field-label-text {
  font: 500 12px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
  margin-top: 4px;
}

.rt-fleet-cal-app .field-hint {
  font: 400 11px/1.35 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
  margin-top: 2px;
}

.rt-fleet-cal-app .readonly-badge {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: 500 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Swatches */
.rt-fleet-cal-app .swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}

.rt-fleet-cal-app .swatch {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.rt-fleet-cal-app .swatch:active {
  transform: scale(0.92);
}

.rt-fleet-cal-app .swatch.active {
  outline: 2.5px solid var(--ink);
  outline-offset: 1px;
}

/* Expandable Customize Color Controls */
.rt-fleet-cal-app .customize-color-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
  margin: 6px 0;
}

.rt-fleet-cal-app .customize-color-summary {
  font: 600 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.rt-fleet-cal-app .sliders-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.rt-fleet-cal-app .slider-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font: 500 12px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

.rt-fleet-cal-app .slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.rt-fleet-cal-app input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  outline: none;
  margin: 4px 0;
  cursor: pointer;
}

.rt-fleet-cal-app input[type="range"].slider-hue {
  background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  border: none;
}

.rt-fleet-cal-app input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--teal);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Live Color Preview Row */
.rt-fleet-cal-app .color-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.rt-fleet-cal-app .preview-label {
  font: 500 12px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
}

.rt-fleet-cal-app .color-preview-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--teal);
  background: rgba(8, 121, 112, 0.12);
  transition: all 0.15s ease;
}

.rt-fleet-cal-app .preview-sample-dot {
  font-size: 14px;
  line-height: 1;
}

.rt-fleet-cal-app .preview-sample-text {
  font: 600 12.5px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-fleet-cal-app .save-vehicle-btn {
  width: 100%;
  min-height: 44px;
  font-weight: 600;
  margin-top: 4px;
}

/* FLEET VIEW STYLING */
.rt-fleet-cal-app .fleetrow {
  padding: 9px 10px;
  background: var(--bg);
  border-radius: 8px;
  margin: 6px 0;
  max-width: 100%;
  border: 1px solid var(--line);
}

.rt-fleet-cal-app .fleetrow.empty-week-row {
  padding: 6px 10px;
  opacity: 0.85;
}

.rt-fleet-cal-app .fleetrow.week-row-selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.rt-fleet-cal-app .fleet-unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.rt-fleet-cal-app .fleet-unit-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font: 600 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rt-fleet-cal-app .fleet-unit-dot {
  flex-shrink: 0;
  font-size: 12px;
}

.rt-fleet-cal-app .fleet-unit-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rt-fleet-cal-app .fleet-unit-plate {
  flex-shrink: 0;
  white-space: nowrap;
  font: 500 12px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
}

.rt-fleet-cal-app .fleet-timeline-wrap {
  width: 100%;
  touch-action: pan-y;
  user-select: none;
}

.rt-fleet-cal-app .fleet-timeline-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.rt-fleet-cal-app .fleet-timeline-nav-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.rt-fleet-cal-app .fleet-timeline-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.rt-fleet-cal-app .fleet-timeline-range {
  font: 600 14px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

.rt-fleet-cal-app .fleet-timeline-hint {
  font: 400 12px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
}

.rt-fleet-cal-app .fleet-timeline-header-row {
  padding: 4px 10px 8px;
  width: 100%;
  box-sizing: border-box;
}

.rt-fleet-cal-app .fleet-col-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2.5px;
  width: 100%;
}

.rt-fleet-cal-app .fleet-header-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  padding: 6px 1px;
  min-height: 44px;
  border-radius: 6px;
  color: var(--muted);
  line-height: 1.1;
  transition: background 0.15s ease, color 0.15s ease;
}

.rt-fleet-cal-app .fleet-header-cell:hover {
  background: rgba(255, 255, 255, 0.05);
}

.rt-fleet-cal-app .fleet-header-cell.timeline-col-selected {
  color: var(--ink) !important;
  background: var(--soft);
  font-weight: 700;
}

.rt-fleet-cal-app .fleet-header-weekday {
  font: 600 11px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.rt-fleet-cal-app .fleet-header-day {
  font: 600 13px system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

.rt-fleet-cal-app .fleet-timeline-unit-row {
  padding: 8px 10px;
  margin-bottom: 6px;
}

.rt-fleet-cal-app .timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2.5px;
  margin-top: 7px;
  width: 100%;
}

.rt-fleet-cal-app .timeline div {
  text-align: center;
  cursor: pointer;
  min-width: 0;
  padding: 2px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.rt-fleet-cal-app .timeline div.timeline-col-selected {
  background: rgba(8, 121, 112, 0.14);
}

.rt-fleet-cal-app .timeline i {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 3px;
  background: var(--line);
  transition: transform 0.1s ease;
}

.rt-fleet-cal-app .mini {
  font-size: 12px;
}

.rt-fleet-cal-app .detail {
  border-color: var(--teal);
}

.rt-fleet-cal-app .detail p {
  font: 400 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--muted);
  margin: 5px 0;
}

/* Extra small mobile screens (320px - 360px) */
@media (max-width: 360px) {
  .rt-fleet-cal-app {
    padding: 10px 8px 76px;
  }
  .rt-fleet-cal-app .head h1 {
    font-size: 18px;
  }
  .rt-fleet-cal-app .sub {
    font-size: 11px;
  }
  .rt-fleet-cal-app .view-card .view-card-label {
    font-size: 11.5px;
  }
  .rt-fleet-cal-app .group button {
    font-size: 12px;
    padding: 6px 4px;
  }
  .rt-fleet-cal-app .toolbar strong {
    font-size: 13px;
  }
}

@media (min-width: 550px) {
  .rt-fleet-cal-app {
    margin: 20px auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    min-height: 850px;
  }
}


/* Compact mobile correction: preserve 44px hit targets where practical while
   reducing wasted vertical space in the Calendar surface. */
.rt-fleet-cal-app { padding: 10px 10px 72px; }
.rt-fleet-cal-app .head { margin-bottom: 8px; }
.rt-fleet-cal-app .head h1 { font-size: 19px; }
.rt-fleet-cal-app .iconbtn { width: 38px; height: 40px; min-height: 40px; }
.rt-fleet-cal-app .card { padding: 9px 8px; margin-bottom: 7px; }
.rt-fleet-cal-app .toolbar button { min-height: 38px; min-width: 38px; padding: 5px 8px; }
.rt-fleet-cal-app .tabs { margin: 8px 0 7px; gap: 5px; }
.rt-fleet-cal-app .view-card { min-height: 46px; padding: 6px 2px; }
.rt-fleet-cal-app .controls-area { gap: 5px; margin-bottom: 7px; }
.rt-fleet-cal-app .group button { min-height: 38px; padding: 5px 6px; }
.rt-fleet-cal-app .fleet-filter-stack { flex-direction: row; gap: 6px; }
.rt-fleet-cal-app .fleet-filter-stack > * { flex: 1 1 0; min-width: 0; }
.rt-fleet-cal-app .filter-select,
.rt-fleet-cal-app select { min-height: 40px; padding: 6px 8px; font-size: 12.5px !important; }
.rt-fleet-cal-app .weekday span { padding: 3px 0 2px; }
.rt-fleet-cal-app .week { margin-bottom: 3px; padding: 2px; }
.rt-fleet-cal-app .day { min-height: 30px; padding: 2px 1px; }
.rt-fleet-cal-app .day .day-num { height: 19px; width: 19px; font-size: 11.5px; }
.rt-fleet-cal-app .coverage-row { margin-top: 2px; }
.rt-fleet-cal-app .hint { margin: 5px 0 2px; }
/* Preferences is an actual overlay, not a long inline block above the month. */
.rt-fleet-cal-app .pref-card:not(.hidden) {
  position: fixed;
  z-index: 180;
  inset: max(58px, env(safe-area-inset-top)) 10px max(82px, env(safe-area-inset-bottom));
  width: auto;
  max-width: 480px;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--teal);
  border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(3, 10, 17, .78), 0 12px 36px rgba(0,0,0,.35);
}
.rt-fleet-cal-app .pref-header { position: sticky; top: -12px; z-index: 2; background: var(--surface); padding: 7px 0 9px; }
.rt-fleet-cal-app .pref-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; margin: 4px 0 12px; }
.rt-fleet-cal-app .pref-tab { min-height: 38px; padding: 6px 3px; font-size: 12px; }
.rt-fleet-cal-app .pref-section[hidden], .rt-fleet-cal-app .pref-divider { display: none !important; }
.rt-fleet-cal-app .pref-section { gap: 7px; }
.rt-fleet-cal-app .swatch { width: 30px; height: 30px; min-height: 30px; }
.rt-fleet-cal-app .customize-color-details { padding: 8px; }
.rt-fleet-cal-app .sliders-container { gap: 10px; }
.rt-fleet-cal-app input[type="range"] { height: 7px; margin: 9px 0; }
.rt-fleet-cal-app .save-vehicle-btn { min-height: 42px; }
@media (max-width: 360px) {
 .rt-fleet-cal-app .fleet-filter-stack { flex-direction: column; }
 .rt-fleet-cal-app .pref-card:not(.hidden) { inset-inline: 6px; }
}
