:root {
  --ink: #172233;
  --muted: #647084;
  --line: #d7dee8;
  --surface: #ffffff;
  --page: #eef3f8;
  --blue: #1d75d8;
  --green: #218a55;
  --amber: #d57a00;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page);
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
}

.site-logo-link {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 6;
  display: block;
}

.site-logo {
  display: block;
  max-width: 150px;
  max-height: 74px;
  object-fit: contain;
}

.kiosk {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 110px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.brand span,
.admin-header span {
  display: block;
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
}

h1 {
  margin: 8px 0 0;
  font-size: 56px;
  line-height: 1.05;
}

.admin-cog,
.battery-shortcut {
  position: fixed;
  top: 18px;
  z-index: 5;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(23, 34, 51, .16);
}

.admin-cog {
  right: 18px;
  font-size: 24px;
}

.battery-shortcut {
  right: 82px;
  color: var(--green);
  padding: 0;
  overflow: hidden;
}

.battery-shortcut svg {
  display: block;
  width: 30px;
  max-width: 30px;
  height: 30px;
  max-height: 30px;
  flex: none;
}

.choice-grid {
  display: grid;
  gap: 22px;
}

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

.big-choice,
.primary-button {
  min-height: 180px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-size: 54px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(29, 117, 216, .25);
}

.primary-button:disabled {
  background: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button {
  min-height: 92px;
  border: 2px solid var(--red);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--red);
  font-size: 34px;
  font-weight: 900;
  cursor: pointer;
}

.big-choice.return {
  background: var(--green);
}

.big-choice.collect {
  background: var(--amber);
}

.back-link {
  width: fit-content;
  font-size: 24px;
  font-weight: 700;
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.message,
.empty {
  font-size: 24px;
  font-weight: 700;
}

.name-form {
  display: grid;
  gap: 22px;
}

.name-grid,
.vehicle-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.name-tile input {
  position: absolute;
  opacity: 0;
}

.name-tile span,
.manual-name,
.vehicle-card,
.status-card,
.history-row {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.name-tile span {
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 16px;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
}

.name-tile input:checked + span {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 4px var(--blue);
}

.route-kiosk {
  min-height: 100vh;
  justify-content: start;
  gap: 12px;
  overflow: visible;
}

.route-kiosk .brand h1 {
  font-size: 42px;
}

.route-kiosk .brand span {
  font-size: 22px;
}

.route-form {
  display: grid;
  gap: 10px;
}

.route-name-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-content: start;
  height: auto;
  overflow: visible;
}

.route-continue {
  min-height: 66px;
  font-size: 28px;
}

.manual-name {
  display: grid;
  gap: 10px;
  padding: 18px;
  font-size: 22px;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 56px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 22px;
  background: white;
}

textarea {
  padding: 14px;
  font-family: inherit;
  resize: vertical;
}

.primary-button {
  min-height: 92px;
  font-size: 34px;
}

.vehicle-card {
  overflow: hidden;
}

.return-confirm {
  display: grid;
  gap: 22px;
}

.confirmed-vehicle {
  padding: 22px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.confirmed-vehicle img {
  width: min(100%, 260px);
  height: 150px;
  object-fit: contain;
}

.confirmed-vehicle strong {
  font-size: 42px;
}

.confirmed-vehicle span {
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

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

.return-controls {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 20px;
  align-items: center;
  background: white;
}

.vehicle-button {
  width: 100%;
  min-height: 220px;
  border: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  place-items: center;
  background: white;
  cursor: pointer;
}

.vehicle-button img {
  width: min(100%, 210px);
  height: 120px;
  object-fit: contain;
}

.vehicle-button span {
  font-size: 32px;
  font-weight: 900;
}

.vehicle-button small {
  min-height: 44px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.battery-panel {
  display: none;
  padding: 18px;
  border-top: 2px solid var(--line);
  gap: 18px;
}

.battery-panel.open {
  display: grid;
}

.battery-label {
  display: grid;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
}

.battery-label strong {
  font-size: 40px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.check-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 26px;
  font-weight: 800;
}

.check-row input {
  width: 42px;
  height: 42px;
}

.thanks {
  align-items: center;
  text-align: center;
}

.thanks h1 {
  font-size: 86px;
}

.admin-shell {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 110px 24px 24px;
}

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

.admin-header h1 {
  font-size: 42px;
}

.admin-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-header a,
.admin-add button,
.admin-row button {
  border: 0;
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.status-card {
  min-height: 190px;
  padding: 18px;
  display: grid;
  gap: 8px;
  text-decoration: none;
  border-left: 10px solid var(--muted);
}

.status-card.returned {
  border-left-color: var(--green);
}

.status-card.collected {
  border-left-color: var(--amber);
}

.status-card strong {
  font-size: 32px;
}

.status-card p {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.status-card span,
.status-card small,
.history-row span,
.history-row time,
.history-row small {
  color: var(--muted);
  font-size: 18px;
}

.admin-add,
.admin-row {
  display: grid;
  grid-template-columns: 180px 180px minmax(200px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-add {
  grid-template-columns: 180px 180px minmax(200px, 1fr) auto;
  margin-bottom: 26px;
}

.admin-add.compact,
.admin-row.compact {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.vehicle-admin-form {
  grid-template-columns: 180px minmax(220px, 1fr) auto auto;
}

.admin-add select:first-of-type + input {
  grid-column: span 2;
}

.vehicle-admin-form select:first-of-type + input {
  grid-column: auto;
}

.admin-row .danger {
  background: var(--red);
}

.section-title {
  font-size: 34px;
}

.view-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.view-switch a {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  background: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
}

.view-switch a.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
}

.status-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.status-table th,
.status-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 18px;
}

.status-table th {
  color: var(--muted);
  font-size: 15px;
  text-transform: uppercase;
}

.status-table th button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-transform: inherit;
  cursor: pointer;
}

.status-table th button::after {
  content: " sort";
  margin-left: 6px;
  font-size: 13px;
}

.status-table th button[aria-sort="ascending"]::after {
  content: " asc";
}

.status-table th button[aria-sort="descending"]::after {
  content: " desc";
}

.status-table tr {
  cursor: pointer;
}

.status-table tbody tr:hover {
  background: #f7faff;
}

.charge-cell {
  min-width: 180px;
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 54px;
  gap: 10px;
  align-items: center;
}

.charge-bar {
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #edf1f5;
}

.charge-bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

.rapid-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-weight: 900;
}

.rapid-mark svg {
  width: 22px;
  height: 22px;
}

.table-button {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 900;
}

.table-submit {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--green);
  color: white;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.issues-button {
  background: var(--red);
}

.issue-add-form {
  grid-template-columns: 160px 180px minmax(260px, 1fr) auto;
  align-items: stretch;
}

.issue-add-form select:first-of-type + input {
  grid-column: auto;
}

.issue-add-form textarea {
  min-height: 72px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font: inherit;
  font-size: 18px;
  resize: vertical;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-row {
  padding: 18px;
  display: grid;
  grid-template-columns: 160px 1fr 180px 1fr;
  gap: 12px;
  align-items: center;
}

.history-row strong {
  font-size: 22px;
}

.issue-row {
  grid-template-columns: 180px 180px 1fr;
}

.issue-row p,
.issue-history-row p {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.issue-history-row {
  border-color: #f1b8b4;
  background: #fff7f6;
}

@media (max-width: 760px) {
  .kiosk {
    padding: 96px 22px 22px;
    justify-content: start;
  }

  .site-logo {
    max-width: 118px;
    max-height: 58px;
  }

  h1 {
    font-size: 40px;
  }

  .choice-grid.two,
  .admin-header,
  .admin-add,
  .admin-row,
  .admin-add.compact,
  .admin-row.compact,
  .history-row {
    grid-template-columns: 1fr;
  }

  .big-choice {
    min-height: 150px;
    font-size: 42px;
  }

  .return-controls {
    grid-template-columns: 1fr;
  }

  .route-kiosk {
    padding: 82px 14px 14px;
    gap: 8px;
  }

  .route-kiosk .brand h1 {
    font-size: 30px;
  }

  .route-kiosk .brand span {
    font-size: 18px;
  }

  .route-name-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    height: auto;
    gap: 6px;
  }

  .route-name-grid .name-tile span {
    min-height: 78px;
    padding: 10px;
    font-size: 20px;
  }

  .route-continue {
    min-height: 54px;
    font-size: 23px;
  }

  .confirm-actions {
    grid-template-columns: 1fr;
  }

  .name-grid,
  .vehicle-grid,
  .status-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
