:root,
html[data-theme="night"] {
  --bg: #030608;
  --surface: #080d12;
  --surface-2: #101820;
  --border: #1d2a33;
  --text: #f5f7fa;
  --muted: #a8b0b8;
  --brand: #e10613;
  --brand-2: #ff2a2f;
  --warn: #f5a524;
  --done: #108b2e;
  --blue: #123e76;
  --shadow: rgba(0, 0, 0, .45);
}

html[data-theme="day"] {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --border: #d7dde3;
  --text: #101418;
  --muted: #5f6b76;
  --brand: #d9040f;
  --brand-2: #a9000b;
  --warn: #b7791f;
  --done: #087a24;
  --blue: #1f5f9b;
  --shadow: rgba(16, 20, 24, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% -10%, rgba(225, 6, 19, .12), transparent 30%),
    var(--bg);
}

.screen {
  min-height: 100dvh;
}

.padded {
  padding: 22px 18px 110px;
}

.has-nav {
  padding-bottom: 132px;
}

.topbar,
.dash-top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
}

.topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 1.28rem;
  line-height: 1.2;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
}

.logo {
  text-align: center;
  line-height: .9;
  font-weight: 900;
  font-style: italic;
}

.logo span {
  display: block;
  font-size: 2.15rem;
  color: var(--text);
}

.logo strong {
  display: block;
  color: var(--brand);
  font-size: 1.16rem;
}

.primary {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 1rem;
}

.primary:disabled {
  opacity: .45;
}

.fixed-action {
  margin-top: 28px;
}

.splash {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(3, 6, 8, .05), rgba(3, 6, 8, .88)),
    url("../img/splash-mountain.jpeg") center / cover;
  display: flex;
  align-items: flex-end;
  padding: 26px;
}

.splash-overlay {
  width: 100%;
  text-align: center;
  padding-bottom: 18px;
}

.splash p {
  margin: 10px 0 26px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
}

.welcome {
  min-height: 100dvh;
  padding: 0 28px 28px;
}

.hero-img {
  height: 44dvh;
  margin: 0 -28px 18px;
  background:
    linear-gradient(180deg, transparent 45%, var(--bg) 100%),
    url("../img/intro-beach.jpeg") center / cover;
}

.feature-list {
  display: grid;
}

.feature-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr 24px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 14px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.feature-row span {
  grid-row: span 2;
  color: var(--brand);
}

.feature-row strong {
  font-size: 1.08rem;
}

.feature-row small {
  color: var(--muted);
  font-size: .88rem;
}

.feature-row em {
  grid-row: span 2;
}

.login-link {
  color: var(--muted);
  text-align: center;
}

.login-link button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  text-align: center;
}

.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.brand-card,
.brand-wide,
.selected-brand,
.model-list,
.form-card,
.info-card,
.panel,
.vehicle-card,
.history-list,
.check-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: 0 16px 28px var(--shadow);
}

.brand-card {
  min-height: 112px;
  display: grid;
  place-items: center;
}

.brand-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(225, 6, 19, .4);
}

.brand-logo {
  font-size: 1.36rem;
  font-weight: 900;
}

.brand-logo.canam {
  color: #f5c022;
}

.brand-logo.cfmoto {
  color: #18c8d8;
}

.brand-logo.kawasaki {
  color: #39b54a;
}

.brand-logo.yamaha,
.brand-logo.honda {
  color: var(--brand);
}

.brand-wide {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  color: var(--text);
  text-transform: uppercase;
  font-weight: 800;
}

.selected-brand {
  padding: 16px;
  margin-bottom: 12px;
}

.selected-brand small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.selected-brand strong {
  font-size: 1.3rem;
}

.model-list {
  overflow: hidden;
}

.model-row {
  width: 100%;
  display: grid;
  grid-template-columns: 78px 1fr 30px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.model-row:last-child {
  border-bottom: 0;
}

.model-thumb,
.vehicle-photo {
  background:
    linear-gradient(90deg, rgba(3, 6, 8, .2), rgba(3, 6, 8, .9)),
    url("../img/ref-dashboard.jpeg") center / cover;
}

.model-thumb {
  width: 68px;
  height: 46px;
  margin-left: 10px;
  border-radius: 6px;
}

.model-row em {
  width: 26px;
  height: 26px;
  border: 2px solid #45505b;
  border-radius: 50%;
}

.model-row.selected em {
  display: grid;
  place-items: center;
  border-color: var(--brand);
  background: var(--brand);
}

.model-row.selected em::before {
  content: "✓";
  color: #fff;
  font-weight: 900;
}

.form-card,
.info-card {
  padding: 18px;
}

.form-card {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
}

.vehicle-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr 42%;
  gap: 10px;
  align-items: center;
  padding: 18px;
  margin: 10px 0 22px;
  overflow: hidden;
}

.vehicle-card.compact {
  min-height: 98px;
  grid-template-columns: 1fr 34%;
}

.vehicle-card small {
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1rem;
}

.vehicle-card h2 {
  margin: 8px 0;
  font-size: 1.32rem;
}

.vehicle-card p,
.vehicle-card dd {
  margin: 0;
  color: var(--muted);
}

.vehicle-card p span,
.next-review span,
.last-service em,
.history-list p span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 10px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.vehicle-photo {
  height: 92px;
  border-radius: 8px;
}

.dash-top {
  padding: 22px 18px 8px;
}

.dashboard {
  padding: 0 18px 132px;
}

.panel {
  padding: 16px 12px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.next-review,
.last-service {
  position: relative;
  width: 100%;
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.next-review em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.next-review small {
  color: var(--muted);
}

.next-review b {
  position: absolute;
  top: 18px;
  right: 14px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #ffd21f;
  color: #111;
}

.last-service {
  grid-template-columns: 1fr 28px;
}

.last-service span {
  color: var(--muted);
}

.last-service strong {
  grid-column: 1;
}

.last-service svg {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.shortcut-grid button {
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.shortcut-grid svg {
  width: 2rem;
  height: 2rem;
  margin-bottom: 10px;
}

.shortcut-grid span {
  display: block;
  font-size: .84rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 5;
  width: min(440px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr 86px 1fr 1fr;
  align-items: center;
  min-height: 92px;
  padding: 10px 16px env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: rgba(3, 6, 8, .94);
  backdrop-filter: blur(18px);
}

html[data-theme="day"] .bottom-nav {
  background: rgba(255, 255, 255, .94);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 5px;
}

.bottom-nav .active {
  color: var(--brand);
}

.bottom-nav .fab {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  justify-self: center;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 10px;
}

.tabs.three {
  grid-template-columns: repeat(3, 1fr);
}

.tabs button {
  min-height: 54px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tabs .active {
  border-color: var(--brand);
  color: var(--brand);
}

.review-list {
  display: grid;
  gap: 8px;
}

.review-card {
  display: grid;
  grid-template-columns: 1fr auto 28px;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.review-card.focus {
  border-color: var(--warn);
}

.review-card strong {
  display: block;
  font-size: 1.28rem;
}

.review-card small {
  color: var(--muted);
}

.review-card b {
  padding: 8px 11px;
  border-radius: 7px;
}

.review-card .done {
  background: var(--done);
  color: #fff;
}

.review-card .todo {
  background: rgba(245, 165, 36, .18);
  color: var(--text);
}

.section-title {
  margin: 28px 0 14px;
  font-size: 1.18rem;
}

.check-list {
  overflow: hidden;
  margin-bottom: 24px;
}

.check-list button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.check-list button:last-child {
  border-bottom: 0;
}

.check-list span {
  width: 22px;
  height: 22px;
  border: 2px solid #535f69;
  border-radius: 4px;
}

.disclaimer {
  display: flex;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.disclaimer::before {
  content: "i";
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  color: var(--brand);
  font-weight: 700;
}

.select-service {
  position: relative;
  margin: 28px 0 22px;
  font-size: 1.05rem;
}

.select-service input {
  margin-top: 12px;
  padding-right: 44px;
  font-size: 1.12rem;
}

.select-service svg {
  position: absolute;
  right: 12px;
  bottom: 14px;
}

.data-card label {
  position: relative;
  grid-template-columns: 1fr 1fr 26px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
}

.data-card label:last-child {
  border-bottom: 0;
}

.data-card input {
  min-height: 44px;
  border: 0;
  background: transparent;
  text-align: right;
}

.data-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.photo-row span,
.photo-row button,
.history-list em {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)),
    url("../img/ref-dashboard.jpeg") center / cover;
}

.photo-row button {
  display: grid;
  place-items: center;
  background: var(--surface);
}

.history-head {
  position: relative;
}

.history-head > button {
  position: absolute;
  right: 12px;
  top: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: transparent;
  color: var(--brand);
  text-transform: uppercase;
  font-weight: 800;
}

.history-list {
  overflow: hidden;
}

.history-list article {
  display: grid;
  grid-template-columns: 1fr auto 74px;
  gap: 12px;
  align-items: center;
  min-height: 118px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.history-list article:last-child {
  border-bottom: 0;
}

.history-list p,
.history-list h2 {
  margin: 0 0 8px;
}

.history-list p,
.history-list small {
  color: var(--muted);
}

.history-list b {
  padding: 9px 10px;
  border-radius: 7px;
  color: #fff;
}

.history-list .blue {
  background: var(--blue);
}

.history-list .green {
  background: var(--done);
}

.info-card svg {
  width: 42px;
  height: 42px;
  color: var(--brand);
}

.info-card h2 {
  margin: 12px 0 8px;
}

.info-card p {
  color: var(--muted);
  line-height: 1.45;
}

.info-card dl {
  display: grid;
  gap: 12px;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

@media (max-width: 360px) {
  .shortcut-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-list article {
    grid-template-columns: 1fr;
  }

  .history-list em {
    width: 74px;
  }
}
