:root {
  --red: #d92832;
  --red-dark: #a81924;
  --red-soft: #fff3f4;
  --red-line: #ffd6da;
  --green: #168a4a;
  --green-soft: #e7f6ed;
  --gray-900: #24262b;
  --gray-700: #555b65;
  --gray-500: #858c96;
  --gray-200: #e7e9ee;
  --gray-100: #f5f6f8;
  --white: #ffffff;
  --amber: #b86b00;
  --shadow: 0 12px 36px rgba(36, 38, 43, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: var(--white);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  min-height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-900);
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: #cfd3dc;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 700;
}

.button--primary:hover {
  background: var(--red-dark);
}

.button--danger {
  background: #fff1f1;
  border-color: #ffc9c9;
  color: var(--red-dark);
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 5vw;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.brand {
  color: var(--red);
  font-weight: 900;
  font-size: 1.3rem;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.topbar a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 650;
}

.hero {
  min-height: calc(100vh - 64px);
  max-height: 760px;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-200);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 38%, rgba(255, 255, 255, 0.18) 70%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(620px, 90vw);
  margin-left: 5vw;
  padding: 4rem 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1;
  margin: 0 0 1rem;
}

.hero p {
  max-width: 54ch;
  color: var(--gray-700);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section {
  padding: 4rem 5vw;
}

.section--tint {
  background: var(--gray-100);
}

.section__head {
  width: min(780px, 100%);
  margin-bottom: 1.5rem;
}

.section h2,
.admin-head h1,
.manage-card h1,
.login-panel h1 {
  margin: 0 0 0.7rem;
  line-height: 1.1;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.feature-grid,
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature,
.price-card,
.calendar-shell,
.side-panel section,
.login-panel,
.manage-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature,
.price-card {
  padding: 1.1rem;
}

.feature span {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.feature h3,
.price-card h3 {
  margin: 0 0 0.4rem;
}

.feature p,
.price-card p,
.muted {
  color: var(--gray-700);
}

.price-card strong {
  font-size: 1.5rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.2rem;
  align-items: center;
}

.saving-box {
  display: grid;
  gap: 0.6rem;
  background: #fff7e9;
  border: 1px solid #ffd89c;
  border-radius: 8px;
  padding: 1rem;
}

.saving-box div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.fleet {
  background: #f0f8ff;
  border-top: 1px solid #cfe8ff;
  border-bottom: 1px solid #cfe8ff;
}

.contact-section {
  background: linear-gradient(180deg, #fff, var(--red-soft));
}

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

.contact-card,
.contact-map {
  min-height: 120px;
  border: 1px solid var(--red-line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
}

.contact-card span {
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-map {
  color: var(--white);
  background: var(--red);
  text-decoration: none;
  font-weight: 900;
  text-align: center;
  justify-content: center;
}

.gallery-grid {
  display: grid;
  gap: 0.8rem;
}

.gallery-viewer {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

.gallery-viewer img {
  width: 100%;
  height: min(64vw, 560px);
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(17, 24, 39, 0.5);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.gallery-arrow--prev {
  left: 0.8rem;
}

.gallery-arrow--next {
  right: 0.8rem;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.6rem;
}

.gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.gallery-thumb.active {
  border-color: var(--red);
}

.gallery-thumb img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  display: block;
}

.calendar-shell {
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(217, 40, 50, 0.055), rgba(255, 255, 255, 0.92) 210px),
    var(--white);
  border-color: var(--red-line);
  box-shadow: 0 16px 42px rgba(217, 40, 50, 0.08), var(--shadow);
}

.calendar-toolbar,
.admin-head,
.dialog__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 220px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 40px;
}

.segmented button.active {
  background: var(--red);
  color: var(--white);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex: 1;
}

.calendar-nav strong {
  min-width: 190px;
  text-align: center;
  color: var(--red-dark);
}

.status-line {
  min-height: 26px;
  margin: 0.75rem 0;
  color: var(--gray-700);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.day-column,
.month-day {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  min-width: 0;
}

.day-column {
  padding: 0.7rem;
  border-top: 3px solid var(--red-line);
}

.day-column h3 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
}

.slot-list {
  display: grid;
  gap: 0.45rem;
}

.slot {
  width: 100%;
  min-height: 58px;
  padding: 0.55rem;
  justify-content: space-between;
  border-radius: 8px;
  text-align: left;
  color: var(--gray-900);
  background: var(--gray-100);
}

.slot small {
  display: block;
  color: var(--gray-700);
}

.slot--available {
  border-color: #b8e2c9;
  background: var(--green-soft);
}

.slot--booked {
  border-color: #ffc4c4;
  background: #fff0f0;
}

.slot--closed {
  border-color: #d9dce3;
  background: #eef0f4;
}

.slot--past {
  opacity: 0.5;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.month-weekdays span {
  padding: 0 0.35rem;
}

.month-empty {
  min-height: 112px;
  border-radius: 8px;
  background: rgba(217, 40, 50, 0.035);
}

.month-day {
  min-height: 112px;
  padding: 0.7rem;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  justify-items: stretch;
  gap: 0.48rem;
  text-align: left;
  border-color: #ece0e2;
  background: linear-gradient(180deg, #fffefe, var(--red-soft));
}

.month-day:hover {
  border-color: #f3a3ab;
  box-shadow: 0 10px 24px rgba(217, 40, 50, 0.1);
}

.month-date {
  display: block;
  white-space: nowrap;
  color: var(--gray-900);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.availability-badge {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: #ffffff;
  border: 1px solid var(--red-line);
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.month-day.is-past {
  opacity: 0.5;
}

.month-note {
  margin-top: 0.28rem;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--red-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
  margin-top: auto;
  align-self: end;
}

.dot {
  height: 9px;
  border-radius: 999px;
  background: var(--gray-200);
}

.dot--available {
  background: var(--green);
}

.dot--booked {
  background: var(--red);
}

.dot--closed {
  background: var(--gray-500);
}

.dialog {
  width: min(720px, calc(100vw - 1.5rem));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 70px rgba(36, 38, 43, 0.28);
}

.dialog::backdrop {
  background: rgba(36, 38, 43, 0.42);
}

.dialog__panel {
  margin: 0;
  padding: 1.2rem;
}

.icon-close {
  float: right;
  min-width: 42px;
  padding: 0;
  font-size: 1.6rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--gray-700);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: var(--gray-900);
  background: var(--white);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin: 1rem 0;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.second-fields,
.notice {
  border-radius: 8px;
  background: #fff7e9;
  border: 1px solid #ffd89c;
  padding: 0.85rem;
}

.form-error {
  min-height: 24px;
  color: var(--red-dark);
  font-weight: 700;
  margin: 0.5rem 0;
}

.confirmation-slots,
.booking-list,
.search-results {
  display: grid;
  gap: 0.55rem;
}

.booking-pill,
.search-item {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 0.7rem;
  background: var(--gray-100);
}

.booking-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.booking-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking-row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "when name"
    "car contact";
  gap: 0.15rem 0.9rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--red-dark);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #ffffff;
  cursor: pointer;
}

.booking-row:hover {
  background: var(--gray-100);
}

.booking-row__when {
  grid-area: when;
  font-weight: 850;
  color: var(--red-dark);
  white-space: nowrap;
}

.booking-row__name {
  grid-area: name;
  font-weight: 800;
  color: var(--gray-900);
}

.booking-row__car {
  grid-area: car;
  color: var(--gray-700);
  font-size: 0.9rem;
  white-space: nowrap;
}

.booking-row__contact {
  grid-area: contact;
  color: var(--gray-500);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-past {
  border-top: 1px solid var(--gray-200);
  padding-top: 0.6rem;
}

.list-past > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--gray-700);
  padding: 0.3rem 0;
}

.list-past .booking-list {
  margin-top: 0.6rem;
}

.list-past .booking-row {
  border-left-color: var(--gray-500);
  opacity: 0.85;
}

.list-empty {
  color: var(--gray-500);
  padding: 0.8rem 0;
}

.admin-main,
.manage-main {
  padding: 2rem 5vw 4rem;
}

.login-panel,
.manage-card {
  max-width: 620px;
  margin: 2rem auto;
  padding: 1.2rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
}

.admin-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1.4fr;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}

.admin-tabs button {
  border: 0;
  border-radius: 0;
  min-height: 42px;
}

.admin-tabs button.active {
  background: var(--red);
  color: var(--white);
  font-weight: 900;
}

.customization-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1rem;
  align-self: start;
}

.settings-card--wide {
  min-width: 0;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.side-panel section {
  padding: 1rem;
}

.stack-form {
  display: grid;
  gap: 0.75rem;
}

.content-section {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--red-line);
  border-radius: 8px;
  padding: 0.85rem;
  margin: 0;
  background: rgba(255, 243, 244, 0.55);
}

.content-section legend {
  padding: 0 0.35rem;
  color: var(--red-dark);
  font-weight: 900;
}

.price-row,
.gallery-row {
  display: grid;
  grid-template-columns: 1fr 0.7fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

@media (max-width: 980px) {
  .feature-grid,
  .price-grid,
  .contact-grid,
  .admin-layout,
  .customization-layout {
    grid-template-columns: 1fr 1fr;
  }

  .side-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 1rem;
  }

  .topbar nav {
    gap: 0.55rem;
  }

  .hero {
    min-height: 680px;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.7));
  }

  .hero__content {
    margin: 0 auto;
    padding-top: 3rem;
    align-self: start;
  }

  .section,
  .admin-main,
  .manage-main {
    padding: 2.6rem 1rem;
  }

  .feature-grid,
  .price-grid,
  .contact-grid,
  .split,
  .admin-layout,
  .customization-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .gallery-viewer img {
    height: 260px;
  }

  .price-row,
  .gallery-row {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    align-items: stretch;
  }

  .segmented,
  .calendar-nav {
    width: 100%;
  }

  .calendar-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-nav strong {
    min-width: 0;
    order: -1;
  }

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

  .month-weekdays {
    display: none;
  }

  .month-empty {
    display: none;
  }

  .dialog__actions {
    align-items: stretch;
  }

  .dialog__actions > * {
    width: 100%;
  }
}
