:root {
  --ink: #17201d;
  --muted: #5f6f69;
  --line: #d9e0dc;
  --paper: #f7f8f4;
  --white: #ffffff;
  --green: #176b4d;
  --blue: #285f8f;
  --red: #b94a48;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.topbar,
.footer {
  min-height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.94);
}

.footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
}

.brand,
.nav,
.actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 21px;
  font-weight: 900;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--white);
  font-weight: 900;
}

.nav {
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav form {
  margin: 0;
}

.nav button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.nav-cta {
  color: var(--ink);
}

.hero,
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 32px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 48px;
  align-items: center;
}

.narrow {
  max-width: 760px;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.eyebrow,
.status {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
}

h2 {
  font-size: 34px;
  line-height: 1.18;
}

h3 {
  font-size: 23px;
}

.lead,
.page-heading p,
article p,
.company-meta,
.empty {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  max-width: 680px;
  font-size: 20px;
}

.actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn,
.card-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.primary {
  background: var(--ink);
  color: var(--white);
}

.secondary:hover,
.card-link:hover,
.text-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.google-btn {
  width: 100%;
  background: var(--white);
  border-color: var(--ink);
}

.login-options {
  margin-bottom: 16px;
}

.divider {
  margin: 12px 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.preview-card,
.form-card,
.success-card,
.table-card,
.list-card,
.qr-card,
article {
  border: 1px solid var(--line);
  background: var(--white);
}

.preview-card,
.form-card,
.success-card,
.qr-card,
article {
  padding: 26px;
}

.slot-list,
.tag-grid,
.card-grid {
  display: grid;
  gap: 14px;
}

.slot-list {
  grid-template-columns: repeat(2, 1fr);
}

.slot-list span,
.tag-grid span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 800;
}

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

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

.service-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.service-button {
  min-height: 112px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}

.service-button:hover,
.service-button.selected {
  border-color: var(--green);
  background: #f2f7f4;
}

.service-button strong,
.service-button small,
.service-button em {
  display: block;
}

.service-button strong {
  margin-bottom: 6px;
  font-size: 21px;
}

.service-button small {
  color: var(--muted);
  line-height: 1.45;
}

.service-button em {
  flex: 0 0 auto;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.public-hint {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.calendar-shell {
  margin-top: 30px;
  border: 1px solid var(--line);
  background: var(--white);
}

.calendar-toolbar {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.calendar-toolbar h2 {
  margin-bottom: 0;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  min-height: 420px;
  overflow-x: auto;
}

.day-column {
  min-width: 150px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.day-column:last-child {
  border-right: 0;
}

.day-column.active-day {
  background: #f8fbf9;
}

.day-head {
  min-height: 92px;
  padding: 16px;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.day-head strong {
  font-size: 18px;
}

.day-head span,
.day-head small {
  color: var(--muted);
  font-weight: 800;
}

.time-grid {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.time-pill {
  min-height: 48px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
}

.time-pill span,
.time-pill small {
  display: block;
}

.time-pill span {
  color: var(--ink);
  font-weight: 900;
}

.time-pill small {
  font-size: 12px;
  font-weight: 800;
}

.time-pill.free {
  background: var(--white);
  border-color: var(--green);
  color: var(--green);
}

.time-pill.free:hover,
.time-pill.free.selected {
  background: var(--green);
  color: var(--white);
}

.time-pill.free:hover span,
.time-pill.free:hover small,
.time-pill.free.selected span,
.time-pill.free.selected small {
  color: var(--white);
}

.time-pill.busy {
  background: #fff7f7;
  border-color: #efd0d0;
}

.time-pill.busy span,
.time-pill.busy small {
  color: var(--red);
}

.time-pill.past {
  opacity: 0.48;
}

.closed-day {
  padding: 14px;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-weight: 800;
  text-align: center;
}

.booking-details {
  margin-top: 24px;
}

.selected-slot-summary {
  margin-bottom: 18px;
  padding: 16px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--green);
  background: #f2f7f4;
}

.selected-slot-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-slot-summary strong {
  font-size: 22px;
}

.company-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.company-header img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--white);
}

.company-meta {
  display: grid;
  gap: 8px;
}

form p {
  margin: 0 0 16px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 110px;
}

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

.compact {
  margin-bottom: 22px;
}

.messages {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 0 32px;
}

.message {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 800;
}

.dashboard-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
}

.side-nav {
  align-self: start;
  padding: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.side-nav h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.side-nav a {
  padding: 10px 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.side-nav a:hover {
  border-color: var(--line);
  color: var(--green);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper);
  font-size: 13px;
  text-transform: uppercase;
}

.badge {
  padding: 5px 8px;
  border: 1px solid var(--line);
  font-weight: 900;
}

.badge.confirmed {
  color: var(--green);
  border-color: var(--green);
}

.badge.declined,
.badge.cancelled,
.danger {
  color: var(--red);
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-cell form,
.list-row form {
  margin: 0;
}

.list-card {
  margin-top: 22px;
}

.list-row {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.list-row span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.qr-card {
  max-width: 520px;
}

.qr-card img {
  width: 240px;
  max-width: 100%;
  display: block;
  margin-bottom: 18px;
}

@media (max-width: 860px) {
  .topbar,
  .footer {
    padding: 16px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero,
  .page,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero,
  .dashboard-shell,
  .form-grid,
  .card-grid,
  .tag-grid,
  .service-picker {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    padding: 18px;
  }

  .table-card {
    overflow-x: auto;
  }
}
