:root {
  --bg: #0b0d0c;
  --card: #121514;
  --line: #303633;
  --text: #f2f5f1;
  --muted: #9aa39d;
  --lime: #b2ff2a;
  --amber: #ffc247;
  --danger: #ff775e;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 15% -10%, #b2ff2a14, transparent 34rem), var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.shell {
  max-width: 1120px;
  margin: auto;
  padding: 30px 24px 108px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.brand span > * {
  display: block;
}

.brand small, .muted {
  color: var(--muted);
}

.logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--lime);
  color: #152007;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 24px #b2ff2a2e;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #171b19, #101211);
}

.hero aside {
  padding: 25px;
  border: 1px solid #29302b;
  border-radius: 14px;
  background: #0d100f;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 11px;
  font-weight: 800;
}

.odometer {
  display: block;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -.05em;
}

.odometer small {
  font-size: .34em;
  letter-spacing: 0;
  color: var(--muted);
}

.hero .muted {
  max-width: 460px;
  margin: 20px 0;
}

.primary, .outline, .link, .danger {
  border-radius: 11px;
  padding: 11px 14px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: var(--lime);
  color: #19210f;
}

.outline {
  border: 1px solid #4b5b37;
  background: #b2ff2a0b;
  color: var(--lime);
}

.link {
  border: 0;
  background: none;
  color: var(--lime);
}

.danger {
  border: 1px solid #7d3b30;
  background: #321712;
  color: #ff9b87;
}

.status {
  display: inline-block;
  margin: 2px 0 14px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #b2ff2a16;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.status.warning {
  background: #ffc24716;
  color: var(--amber);
}

.status.overdue {
  background: #ff775e16;
  color: var(--danger);
}

h1, h2, h3 {
  letter-spacing: -.03em;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #29302c;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.section-title, .page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 38px 0 16px;
}

.section-title h2, .page-title h1 {
  margin: 0;
}

.actions, .dialog-actions, .service-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card, .service-row, .history-row {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}

.card.overdue {
  border-color: #ff775e5c;
}

.card h3 {
  margin: 0;
}

.schedule, .due {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.due {
  margin: 9px 0;
}

.time-note {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #292f2b;
  border-radius: 11px;
  background: #0c0f0d;
}

.time-note.overdue {
  border-color: #71372c;
  background: #211411;
  color: #ff9b87;
}

.time-note b {
  display: block;
  font-size: 12px;
}

.time-note p {
  margin: 3px 0 0;
  color: inherit;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--card);
}

.stats article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 19px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border: 0;
}

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

.stats em {
  color: inherit;
  font-style: normal;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-title {
  align-items: center;
  margin-top: 0;
}

.page-title > div {
  max-width: 720px;
}

.list {
  display: grid;
  gap: 12px;
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #18260d;
  color: var(--lime);
  font-size: 21px;
}

.service-row h2 {
  margin: 0;
  font-size: 17px;
}

.service-row p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 13px;
}

.service-row .time {
  margin-top: 8px;
  color: var(--amber);
}

.service-right {
  text-align: right;
}

.service-right small {
  display: block;
  max-width: 220px;
  color: var(--muted);
}

.service-actions button {
  border: 1px solid #4b5b37;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}

.service-actions .edit {
  border-color: var(--line);
  color: var(--text);
}

.service-actions .delete {
  border-color: #71372c;
  color: var(--danger);
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.history-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  grid-column: 1/-1;
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #0b0d0cf2;
  backdrop-filter: blur(12px);
}

nav button {
  display: grid;
  min-width: 96px;
  padding: 7px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

nav button.active {
  background: #b2ff2a12;
  color: var(--lime);
}

nav small {
  font-size: 12px;
}

dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 25px 80px #0009;
}

dialog::backdrop {
  background: #000a;
}

dialog form {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 25px;
}

dialog h2 {
  margin: 0 0 6px;
}

dialog label {
  color: var(--muted);
  font-size: 13px;
}

dialog input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0e0d;
  color: var(--text);
}

.close {
  position: absolute;
  top: 13px;
  right: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 27px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid div {
  display: grid;
  gap: 7px;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .shell {
    padding: 20px 16px 100px;
  }
  .badge {
    display: none;
  }
  .hero, .cards, .stats {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 23px;
  }
  .stats article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .section-title {
    align-items: flex-start;
  }
  .actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .service-row {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .service-right {
    grid-column: 2;
    text-align: left;
  }
  .service-actions {
    justify-content: flex-start;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  nav button {
    min-width: 0;
    flex: 1;
  }
}
