:root {
  --ink: #061846;
  --muted: #566071;
  --line: #d8deea;
  --soft: #f4f7fb;
  --surface: #ffffff;
  --accent: #0a3d91;
  --accent-strong: #062d72;
  --green: #16964f;
  --orange: #d57911;
  --red: #cf2931;
  --shadow: 0 18px 50px rgba(6, 24, 70, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 74px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand img {
  display: block;
  width: 180px;
  max-width: 34vw;
  height: auto;
  image-rendering: auto;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 46px);
  font-size: 15px;
  font-weight: 700;
}

.desktop-nav a,
.header-contact a {
  transition: color 180ms ease;
}

.desktop-nav a:hover,
.header-contact a:hover {
  color: var(--accent);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 690px;
  padding: clamp(58px, 7vw, 92px) clamp(20px, 4vw, 56px) 132px;
  overflow: hidden;
  background: #071846;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 55% 0 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(6, 24, 70, 0.98) 0%, rgba(6, 24, 70, 0.95) 62%, rgba(6, 24, 70, 0) 63%),
    linear-gradient(180deg, rgba(8, 28, 72, 0.96), rgba(2, 12, 38, 0.96));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 190px;
  background: linear-gradient(180deg, rgba(7, 24, 70, 0), rgba(7, 24, 70, 0.85));
}

.hero-bg {
  position: absolute;
  inset: 0 0 0 38%;
  z-index: -2;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(530px, 48vw);
  padding-top: 8px;
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  color: #fff;
  font-size: clamp(50px, 5.4vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 520px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-banner {
  display: block;
  width: min(100%, 580px);
  height: auto;
}

.hero-plaque {
  position: absolute;
  right: clamp(44px, 8vw, 135px);
  bottom: 78px;
  z-index: 3;
  width: min(42vw, 620px);
  padding: 9px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 222, 234, 0.8);
  border-radius: 8px;
  box-shadow: 0 22px 65px rgba(2, 12, 38, 0.34);
  backdrop-filter: blur(8px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--accent-strong);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(6, 24, 70, 0.15);
}

.primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.secondary {
  color: var(--accent-strong);
  background: #fff;
}

.hero .secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.72);
}

.compact {
  min-height: 42px;
  padding-inline: 18px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 720px;
  margin: 0;
}

.hero-stats-shell {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  bottom: 38px;
  z-index: 3;
  width: min(560px, 43vw);
}

.hero-stats div {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-stats dt {
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.toolbar-band {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(260px, 360px) 1fr;
  gap: 18px;
  align-items: center;
  width: min(calc(100% - 40px), 1320px);
  margin: -38px auto 0;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(6, 24, 70, 0.14);
}

.toolbar-band h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.2;
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label,
.vehicle-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-wrap input,
.vehicle-form input,
.vehicle-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd4e3;
  border-radius: 6px;
  outline: none;
}

.search-wrap input:focus,
.vehicle-form input:focus,
.vehicle-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 61, 145, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter {
  min-height: 42px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.filter.active {
  color: #fff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.inventory-section,
.admin-section,
.company-section {
  padding: clamp(44px, 6vw, 76px) clamp(20px, 4vw, 56px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p,
.admin-copy p,
.company-section p {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.vehicle-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(6, 24, 70, 0.06);
}

.vehicle-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #edf2f7, #c8d3e1);
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #fff;
  background: var(--green);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
}

.status.incoming {
  background: var(--orange);
}

.status.sold {
  background: var(--red);
}

.vehicle-body {
  padding: 18px;
}

.vehicle-body h3 {
  min-height: 48px;
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

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

.price {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.facts strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.sold-note {
  margin: 14px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.services article {
  padding: 28px clamp(20px, 3vw, 42px);
  background: #fff;
}

.services h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.services p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.company-section {
  display: block;
  background: var(--soft);
}

.admin-section {
  background: #fff;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
  gap: 24px;
  margin-top: 26px;
}

.vehicle-form,
.admin-panel {
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.vehicle-form label {
  display: grid;
  gap: 8px;
}

.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 20px;
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-actions button,
.data-actions label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--accent-strong);
  background: #fff;
  border: 1px solid #cbd4e3;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.data-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-cards div {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.status-cards strong {
  display: block;
  font-size: 26px;
}

.status-cards span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.row-vehicle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-vehicle img {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  background: #d8deea;
}

.row-vehicle strong,
.row-vehicle span {
  display: block;
}

.row-vehicle span {
  color: var(--muted);
  font-size: 12px;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-actions button {
  min-width: 34px;
  min-height: 34px;
  color: var(--accent-strong);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.admin-actions button.danger {
  color: var(--red);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 4vw, 56px);
  color: #fff;
  background: var(--ink);
}

.site-footer img {
  width: 160px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 4px;
}

.site-footer p {
  margin: 10px 0 0;
  color: #dce5f4;
}

.site-footer div:last-child {
  display: grid;
  align-content: center;
  gap: 8px;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .desktop-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 720px;
    padding-bottom: 180px;
  }

  .hero::before {
    inset: 0 42% 0 0;
  }

  .hero-bg {
    inset: 0 0 0 30%;
    width: 70%;
  }

  .hero-copy {
    width: min(510px, 58vw);
  }

  .hero-plaque {
    right: clamp(24px, 4vw, 42px);
    bottom: 96px;
    width: min(56vw, 560px);
  }

  .hero-stats-shell {
    width: min(520px, 52vw);
  }

  .toolbar-band {
    grid-template-columns: 1fr;
    margin-top: -42px;
  }

  .admin-layout,
  .company-section {
    grid-template-columns: 1fr;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
  }

  .brand img {
    width: 150px;
    max-width: 58vw;
  }

  .header-contact {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    white-space: normal;
  }

  .desktop-nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    width: 100%;
    justify-content: start;
    gap: 10px 20px;
    font-size: 13px;
  }

  .header-contact {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-copy {
    width: 100%;
    padding-top: 0;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 0 20px 28px;
  }

  .hero::before {
    inset: 240px 0 0 0;
    background: linear-gradient(180deg, rgba(6, 24, 70, 0.05) 0%, rgba(6, 24, 70, 0.96) 16%, rgba(3, 14, 43, 0.98) 100%);
  }

  .hero-bg {
    position: relative;
    inset: auto;
    width: calc(100% + 40px);
    height: 330px;
    margin: 0 -20px;
    object-position: center top;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    margin-top: -70px;
  }

  .hero-plaque {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 20px;
    padding: 5px;
  }

  .hero-stats-shell {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 22px;
  }

  .hero-stats,
  .toolbar-band,
  .inventory-grid,
  .services,
  .form-grid,
  .status-cards {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }

  .section-heading,
  .panel-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .vehicle-form,
  .admin-panel {
    padding: 16px;
  }
}
