:root {
  --ink: #14171a;
  --muted: #63707a;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --line: #dfe4de;
  --charcoal: #202326;
  --red: #d8262f;
  --green: #16a36a;
  --amber: #f2b84b;
  --shadow: 0 22px 70px rgba(14, 20, 20, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  color: #fff;
}

.hero__image,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__image {
  background: url("./assets/demo-lanes.jpg") center / cover;
  transform: scale(1.01);
}

.hero__overlay {
  background:
    linear-gradient(90deg, rgba(10, 13, 15, 0.94), rgba(10, 13, 15, 0.56)),
    linear-gradient(180deg, rgba(10, 13, 15, 0.16), rgba(10, 13, 15, 0.82));
}

.topbar,
.hero__content,
.panel {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar,
.hero__content {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
  padding: 4px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
}

.demo-pill {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 900;
}

.hero__content {
  padding: 104px 0 160px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 660px;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.95;
}

.hero__content p:last-child {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.panel {
  position: relative;
  z-index: 2;
  margin-top: -96px;
  margin-bottom: 64px;
  border: 1px solid rgba(24, 28, 28, 0.1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.tab {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.tab--active {
  border-color: rgba(216, 38, 47, 0.35);
  background: rgba(216, 38, 47, 0.08);
  color: var(--red);
}

.view {
  display: none;
}

.view--active {
  display: block;
}

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

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

.field {
  display: grid;
  gap: 8px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
}

.lane-grid,
.time-grid,
.admin-list {
  display: grid;
  gap: 10px;
}

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

.lane-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lane-card {
  position: relative;
  display: grid;
  min-height: 118px;
  align-content: end;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(20, 23, 26, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(20, 23, 26, 0.84), rgba(20, 23, 26, 0.48)),
    url("./assets/demo-lanes.jpg") center 76% / cover;
  color: #fff;
  padding: 16px;
  cursor: pointer;
}

.lane-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.lane-card__number {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  z-index: 1;
}

.lane-card strong,
.lane-card span {
  position: relative;
  z-index: 1;
}

.lane-card span {
  color: rgba(255, 255, 255, 0.78);
}

.lane-grid input:checked + .lane-card {
  border-color: rgba(22, 163, 106, 0.74);
  box-shadow: inset 0 0 0 2px rgba(22, 163, 106, 0.82), 0 14px 28px rgba(18, 45, 32, 0.16);
}

.lane-grid input:checked + .lane-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(22, 163, 106, 0.42);
  pointer-events: none;
}

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

.time-button,
.secondary-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.time-button:hover:not(:disabled),
.time-button--selected {
  border-color: rgba(216, 38, 47, 0.48);
  background: rgba(216, 38, 47, 0.08);
  color: var(--red);
}

.time-button:disabled {
  background: #f0f2ef;
  color: #a2aaa4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 0;
  border: 1px solid rgba(22, 163, 106, 0.28);
  border-radius: 8px;
  background: rgba(22, 163, 106, 0.07);
  padding: 14px 16px;
}

.summary span,
.field-note,
.admin-booking span {
  color: var(--muted);
}

.error {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--red);
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.primary-button:hover {
  background: #bb1e26;
}

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

.admin-head h2,
.manual-panel h2 {
  font-size: 34px;
}

.admin-controls {
  max-width: 320px;
  margin-bottom: 16px;
}

.admin-booking {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.admin-booking strong,
.admin-booking span {
  display: block;
}

.cancel-button {
  min-height: 40px;
  border: 1px solid rgba(216, 38, 47, 0.28);
  border-radius: 8px;
  background: rgba(216, 38, 47, 0.08);
  color: var(--red);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.manual-panel {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.modal {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 14, 0.72);
  padding: 18px;
}

.modal[hidden] {
  display: none;
}

.modal__card {
  width: min(480px, 100%);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .topbar,
  .admin-head,
  .summary {
    display: grid;
  }

  .hero {
    min-height: 560px;
  }

  .hero__content {
    padding-top: 80px;
  }

  .form-grid,
  .manual-grid,
  .lane-grid,
  .admin-booking,
  .tabs {
    grid-template-columns: 1fr;
  }

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