:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #111113;
  --line: #303035;
  --muted: #929299;
  --red: #ed2f20;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: #e8e8e8;
  font:
    16px Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid #45454c;
  border-radius: 5px;
  padding: 13px 19px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
button:hover {
  border-color: var(--red);
  background: #ed2f2015;
}
button.active,
.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}
header {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4%;
  border-bottom: 1px solid #242424;
  background: #090909;
}
.logo {
  font-size: 36px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -3px;
  white-space: nowrap;
}
.logo span {
  color: var(--red);
  padding: 0 4px;
}
.logo small {
  font-size: 23px;
  letter-spacing: -1px;
}
nav {
  display: flex;
  gap: 32px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.6px;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 48px 4% 80px;
  min-height: 65vh;
}
h1 {
  font-size: 48px;
  letter-spacing: -1.5px;
  font-weight: 400;
  margin: 12px 0;
}
h2 {
  font-size: 30px;
  font-weight: 400;
}
.eyebrow {
  color: var(--red);
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
}
p {
  color: var(--muted);
  line-height: 1.6;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0;
  margin-bottom: 36px;
}
.pill {
  color: var(--muted);
  font-size: 12px;
}
.filters,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 32px;
}
.filters {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 24px;
}
.row {
  display: flex;
  gap: 20px;
  align-items: end;
}
.row > * {
  flex: 1;
}
label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: #b3b3b9;
  line-height: 1.5;
}
input,
select {
  display: block;
  width: 100%;
  background: #09090b;
  border: 1px solid #424248;
  border-radius: 5px;
  padding: 13px;
  color: #e8e8e8;
  margin-top: 8px;
  min-height: 44px;
}
input:focus,
select:focus {
  outline: 1px solid #ddd;
}
.price {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.price .row {
  max-width: 630px;
  margin: 12px 0 20px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 17px;
}
.toolbar > div {
  display: flex;
  gap: 10px;
}
.textbtn {
  border: 0;
  color: var(--muted);
  padding-left: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.card {
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
}
.photo {
  position: relative;
  aspect-ratio: 201/114;
  background: #252525;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.badge,
.heart {
  position: absolute;
  top: 12px;
  background: #15191bc9;
  border: 1px solid #7778;
}
.badge {
  left: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 10px;
}
.heart {
  right: 12px;
  border-radius: 50%;
  padding: 6px;
  width: 33px;
  height: 33px;
  font-size: 16px;
  letter-spacing: 0;
}
.heart.active {
  background: var(--red);
}
.info {
  padding: 20px 0;
}
.make {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.make b {
  color: var(--red);
  font-size: 17px;
  padding: 0 10px;
}
.make span {
  font-size: 12px;
  letter-spacing: 0;
  color: #ddd;
}
.card h2 {
  font-size: 24px;
  margin: 18px 0 22px;
}
.model-link {
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
}
.model-link:hover {
  color: var(--red);
  background: transparent;
}
.vehicle-detail-photo {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin: 24px 0;
}
.vehicle-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.vehicle-specs dt {
  color: var(--muted);
}
.vehicle-specs dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.money {
  font-size: 27px;
  font-weight: bold;
  letter-spacing: -1px;
}
.fine {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.interest {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 11px;
}
.load {
  text-align: center;
  margin: 50px 0 0;
}
.load button {
  padding: 22px 36px;
  font-size: 13px;
  letter-spacing: 2px;
}
.list {
  grid-template-columns: 1fr;
}
.list .card {
  display: grid;
  grid-template-columns: 300px 1fr;
}
.list .photo {
  height: 100%;
}
.list .info {
  padding: 20px 30px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 40px 4%;
  display: flex;
  justify-content: space-between;
  background: #080808;
}
footer nav {
  flex-direction: column;
  font-weight: 400;
}
footer p {
  margin: 24px 0;
}
footer > div > a:not(.logo) {
  font-size: 12px;
  color: var(--muted);
}
.login {
  max-width: 650px;
  margin: 40px auto;
  padding: 48px;
}
.login h1 {
  font-size: 40px;
}
.login label {
  margin-top: 40px;
  font-size: 14px;
  letter-spacing: 0;
}
.login .primary {
  width: 100%;
  margin-top: 20px;
  font-size: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 40px 0;
}
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 28px;
}
.stat p {
  margin: 0;
}
.stat strong {
  display: block;
  font-size: 40px;
  margin-top: 22px;
}
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  overflow: auto;
}
.tabs button {
  border: 0;
  border-radius: 0;
  padding: 22px;
}
.tabs .active {
  background: #ed2f2010;
  border-bottom: 3px solid var(--red);
}
.reservation {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  margin-bottom: 16px;
}
.reservation select {
  max-width: 250px;
}
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  grid-column: 1/-1;
}
dialog {
  width: min(540px, 94vw);
  border: 1px solid #444;
  border-radius: 6px;
  background: #111113;
  color: #eee;
  padding: 35px;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
.close {
  float: right;
  padding: 8px;
  border: 0;
}
dialog label {
  margin: 15px 0;
}
dialog .primary {
  margin-top: 15px;
  width: 100%;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #eee;
  color: #111;
  padding: 15px 25px;
  border-radius: 6px;
  display: none;
  z-index: 10;
}
.demo {
  color: #d6a19a;
  font-size: 12px;
  line-height: 1.7;
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  text-align: left;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1600px) {
  main {
    padding-top: 64px;
  }
}
@media (max-width: 800px) {
  header {
    min-height: 85px;
  }
  .logo {
    font-size: 32px;
  }
  .logo small {
    font-size: 20px;
  }
  header nav a:last-child {
    display: none;
  }
  main {
    padding: 40px 5% 70px;
  }
  h1 {
    font-size: 36px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .info {
    padding: 16px;
  }
  .buy {
    align-items: start;
    flex-direction: column;
  }
  .row {
    gap: 12px;
  }
  .filters {
    padding: 0 0 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .list .card {
    grid-template-columns: 180px 1fr;
  }
  footer {
    gap: 30px;
  }
  footer nav {
    font-size: 10px;
  }
  .login {
    padding: 30px;
  }
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
  }
  .heading {
    gap: 10px;
  }
  .pill {
    white-space: nowrap;
  }
  .toolbar {
    align-items: start;
    gap: 10px;
  }
  .toolbar > div {
    flex-wrap: wrap;
    justify-content: end;
  }
  .toolbar button {
    padding: 12px 9px;
  }
  .list .card {
    display: block;
  }
  .buy {
    flex-direction: row;
    align-items: center;
  }
  footer {
    flex-direction: column;
  }
  .login h1 {
    font-size: 30px;
  }
  .stats .stat {
    padding: 20px;
  }
  .heading .primary {
    padding: 12px;
  }
  .tabs {
    gap: 0;
  }
  nav {
    gap: 12px;
    font-size: 10px;
  }
  table {
    font-size: 12px;
  }
  .panel {
    overflow: auto;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      transform 180ms ease;
  }
  button:not(:disabled):active {
    transform: translateY(1px);
  }
  .heading,
  #app > .login {
    animation: enter-content 280ms ease-out;
  }
  dialog[open] {
    animation: enter-content 180ms ease-out;
  }
  dialog[open]::backdrop {
    animation: fade-in 180ms ease-out;
  }
  .card {
    transition: transform 200ms ease;
  }
  html {
    scroll-behavior: smooth;
  }
  @keyframes enter-content {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .card:hover,
  .card:focus-within {
    transform: translateY(-3px);
  }
}
.heading h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}
.settings {
  max-width: 720px;
}
.settings label {
  margin-bottom: 22px;
  font-size: 12px;
}
.custom-logo {
  font-size: 28px;
  letter-spacing: -1px;
}
.discord-link {
  display: inline-block;
  padding: 16px 24px;
  border-radius: 6px;
  font-weight: bold;
}
.photo img[src$="webp"] {
  object-fit: contain;
  background: var(--panel);
  padding: 12px;
}
@media (max-width: 800px) {
  .filters > .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .filters > .row {
    grid-template-columns: 1fr;
  }
  .heading h1 {
    font-size: 34px;
  }
}
.rotation-toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 28px 0 30px;
}
.rotation-toolbar > input {
  max-width: 390px;
  margin: 0;
  min-height: 50px;
  font-size: 14px;
}
.rotation-toolbar > button {
  min-height: 50px;
  white-space: nowrap;
  padding: 14px 24px;
  font-size: 14px;
}
.rotation-toolbar > span {
  font-size: 16px;
  color: var(--muted);
}
.rotation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.rotation-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 114px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #0c0b0c66;
  cursor: pointer;
  letter-spacing: 0;
  font-size: 14px;
  color: #e8e8e8;
  line-height: 1.5;
}
.rotation-card:hover {
  border-color: #666;
}
.rotation-card.selected {
  border-color: #c14136;
  background: #ed2f200a;
}
.rotation-card > input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}
.rotation-card > img {
  width: 88px;
  height: 65px;
  object-fit: contain;
  background: #18181a;
  flex-shrink: 0;
}
.rotation-card > span {
  min-width: 0;
}
.rotation-card strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.rotation-price {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}
.rotation-card:focus-within {
  outline: 2px solid #eee;
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .rotation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rotation-toolbar {
    flex-wrap: wrap;
  }
  .rotation-toolbar > input {
    flex: 1;
    max-width: none;
  }
  .rotation-toolbar > span {
    width: 100%;
  }
}
@media (max-width: 620px) {
  .rotation-grid {
    grid-template-columns: 1fr;
  }
  .rotation-toolbar {
    gap: 12px;
  }
  .rotation-toolbar > input {
    width: 100%;
    flex: auto;
  }
  .rotation-card {
    min-height: 110px;
  }
  .rotation-card > img {
    width: 100px;
  }
}
.reservation-code {
  font-family: monospace;
  font-size: 18px;
  color: #eee;
  overflow-wrap: anywhere;
}
button:disabled,
input:disabled {
  opacity: 0.55;
  cursor: wait;
}
.local-import {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #424248;
  border-radius: 5px;
  color: #eee;
  background: #09090b;
  font: 13px monospace;
  resize: vertical;
}
.wide-dialog {
  width: min(920px, 95vw);
  max-height: 90vh;
}
.import-fields,
.import-defaults {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.import-defaults {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.import-defaults h3 {
  grid-column: 1/-1;
}
.import-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0;
}
.import-check input {
  width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--red);
}
.import-errors,
#importError {
  color: #ffaaa1;
}
.import-table {
  overflow: auto;
  max-height: 320px;
}
.discord-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
details {
  margin: 20px 0;
  color: #aaa;
  line-height: 1.8;
}
summary {
  cursor: pointer;
  color: #eee;
}
#discordSettings label {
  font-size: 13px;
}
#discordSettings input {
  margin-bottom: 12px;
}
@media (max-width: 620px) {
  .import-fields,
  .import-defaults {
    grid-template-columns: 1fr;
  }
  .wide-dialog {
    padding: 25px;
  }
}
.contact-table {
  margin: 28px 0 32px;
  table-layout: fixed;
}
.contact-table th {
  font-size: 14px;
  font-weight: 500;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.contact-table td {
  color: #bbb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  vertical-align: top;
}
.contact-table th:first-child {
  width: 36%;
}
.contact-edit-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.contact-edit-row label {
  font-size: 12px;
}
.contact-edit-row button {
  align-self: end;
  margin-bottom: 6px;
}
@media (max-width: 700px) {
  .contact-edit-row {
    grid-template-columns: 1fr;
  }
  .contact-edit-row button {
    justify-self: start;
  }
  .contact-table td,
  .contact-table th {
    padding: 14px 8px;
  }
}

.vehicle-image-preview { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 8px; margin: 12px 0; }
.vehicle-image-preview[hidden] { display: none; }
