:root {
  --bg: #eef1f5;
  --ink: #1e3248;
  --muted: #748397;
  --line: #d7dde5;
  --bar: #073464;
  --card: #ffffff;
  --accent: #11cfc2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Tajawal", "Noto Kufi Arabic", "Geeza Pro", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

.page {
  width: min(980px, 92%);
  margin: 20px auto 44px;
}

.panel {
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.title-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 36px);
}

.subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.filters-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.price-range-field {
  grid-column: span 2;
}

.filter-field label {
  font-size: 13px;
  color: #5a6f87;
  font-weight: 700;
}

.filter-field select,
.filter-field input {
  width: 100%;
  height: 42px;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #2e4660;
  padding: 0 10px;
}

.filter-field select:focus,
.filter-field input:focus {
  outline: 2px solid rgba(17, 207, 194, 0.24);
  border-color: #8bc7ce;
}

.price-range-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #3f5a77;
  font-size: 13px;
  font-weight: 700;
}

.price-range-slider {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}

.price-range-track {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 999px;
  background: #dbe6f2;
  z-index: 0;
}

.price-range-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d3b67 0%, #11cfc2 100%);
  z-index: 1;
}

.price-range-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  height: 44px;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
}

#filterMinPriceRange {
  z-index: 2;
}

#filterMaxPriceRange {
  z-index: 3;
}

.price-range-slider input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: transparent;
  border: none;
}

.price-range-slider input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
  border: none;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #0d3b67;
  background: #fff;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(6, 30, 57, 0.3);
  margin-top: -8px;
}

.price-range-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #0d3b67;
  background: #fff;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(6, 30, 57, 0.3);
}

html[data-theme="dark"] .price-range-track {
  background: #1e3550 !important;
  border: 1px solid #35587a !important;
}

html[data-theme="dark"] .price-range-fill {
  background: linear-gradient(90deg, #26c7ff 0%, #29e0c7 100%) !important;
  box-shadow: 0 0 0 1px rgba(38, 199, 255, 0.25), 0 0 12px rgba(41, 224, 199, 0.35) !important;
}

html[data-theme="dark"] .price-range-slider input[type="range"] {
  background: transparent !important;
  border: none !important;
}

html[data-theme="dark"] #filterMinPriceRange::-webkit-slider-thumb {
  border-color: #29e0c7;
}

html[data-theme="dark"] #filterMaxPriceRange::-webkit-slider-thumb {
  border-color: #26c7ff;
}

html[data-theme="dark"] .price-range-slider input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #31d9ff;
  background: #0c2134;
  box-shadow: 0 0 0 3px rgba(49, 217, 255, 0.24), 0 4px 14px rgba(3, 20, 38, 0.6);
}

html[data-theme="dark"] .price-range-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #31d9ff;
  background: #0c2134;
  box-shadow: 0 0 0 3px rgba(49, 217, 255, 0.24), 0 4px 14px rgba(3, 20, 38, 0.6);
}

html[data-theme="dark"] #filterMinPriceRange::-moz-range-thumb {
  border-color: #29e0c7;
}

html[data-theme="dark"] #filterMaxPriceRange::-moz-range-thumb {
  border-color: #26c7ff;
}

.filters-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  grid-column: span 6;
}

.filters-actions button {
  height: 42px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#applyFilterBtn {
  border: none;
  background: #0d3b67;
  color: #eff6ff;
}

#applyFilterBtn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

#dateSearchBtn {
  border: 1px solid #0f5a90;
  background: #e8f2fb;
  color: #0f4b78;
}

#dateSearchBtn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

#clearFilterBtn {
  border: 1px solid #cfdae6;
  background: #fff;
  color: #45617f;
}

.search {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: #30485f;
}

.search:focus {
  outline: 2px solid rgba(17, 207, 194, 0.26);
  border-color: #8bc7ce;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #405a74;
  text-decoration: none;
  font-weight: 600;
}

.status {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.status.error {
  color: #b42d2d;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.empty {
  padding: 24px;
  border: 1px dashed #c5d0dd;
  border-radius: 12px;
  background: #fff;
  color: #60758d;
  text-align: center;
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.report-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(6, 24, 41, 0.36);
}

.report-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 24px));
  background: #fff;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  box-shadow: 0 24px 44px rgba(4, 24, 45, 0.24);
  padding: 12px;
}

.report-head h3 {
  margin: 0;
  color: #13385b;
}

.report-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.report-form label {
  font-size: 13px;
  color: #5e748d;
}

.report-form select,
.report-form textarea {
  width: 100%;
  border: 1px solid #d3deea;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

.report-form textarea {
  min-height: 90px;
  resize: vertical;
}

.report-status {
  margin: 0;
  font-size: 13px;
  color: #5f7389;
}

.report-status.ok {
  color: #0f9f69;
}

.report-status.error {
  color: #b03a2e;
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 980px) {
  .filters-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-range-field {
    grid-column: span 3;
  }

  .filters-actions {
    grid-column: span 3;
  }
}

.report-action {
  height: 40px;
  border-radius: 9px;
  border: none;
  background: #0d3b67;
  color: #eff6ff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.report-action.ghost {
  border: 1px solid #cfdae6;
  background: #fff;
  color: #43617e;
}

@media (max-width: 1000px) {
  .cars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .title-wrap {
    flex-direction: column;
    align-items: start;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .back-link {
    width: 100%;
  }

  .cars-grid {
    grid-template-columns: 1fr;
  }

  .filters-form {
    grid-template-columns: 1fr;
  }

  .price-range-field {
    grid-column: auto;
  }

  .filters-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}
