:root {
  --trades-brand: #1f6feb;
  --trades-brand-dark: #0d5fd6;
  --trades-bg: #f6f8fa;
}

[data-bs-theme="light"] {
  --trades-bg: #f6f8fa;
}

[data-bs-theme="dark"] {
  --trades-bg: #0d1117;
  --trades-brand: #3f8cff;
}

body {
  background-color: var(--trades-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.navbar-brand {
  letter-spacing: 0.01em;
}

.stat-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a > .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #57606a;
  border-bottom-width: 1px;
}

.card-header {
  border-bottom: 1px solid #eaeef2;
}

.footer {
  margin-top: 2rem;
}

/* Card headers/footers hardcode bg-white in templates — let them follow the theme. */
[data-bs-theme="dark"] .card-header.bg-white,
[data-bs-theme="dark"] .card-footer.bg-white {
  background-color: var(--bs-card-bg) !important;
  border-bottom-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .card-footer.bg-white {
  border-top-color: var(--bs-border-color);
}

/* Public contact page — reason picker cards */
.reason-card {
  border-radius: 0.5rem;
  white-space: normal;
}

.btn-check:checked + .reason-card {
  background-color: var(--trades-brand);
  border-color: var(--trades-brand);
  color: #fff;
}

.btn-check:checked + .reason-card .opacity-75 {
  opacity: 0.85 !important;
}

.btn-check:focus-visible + .reason-card {
  box-shadow: 0 0 0 0.25rem rgba(31, 111, 235, 0.25);
}

.service-group .form-check {
  margin-bottom: 0.15rem;
}

/* Calendar day cells */
.calendar-day {
  min-height: 96px;
  border-radius: 0.375rem;
}

.calendar-day .job-pill {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.calendar-day.other-month {
  background-color: transparent;
}

@media (max-width: 575.98px) {
  .table-responsive {
    font-size: 0.875rem;
  }

  .calendar-day {
    min-height: 64px;
  }

  .calendar-day .job-pill {
    font-size: 0.65rem;
  }
}
