/* CheckInn — UI aligned with Bolt React (Tailwind-like light theme) */

:root {
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --green-50: #f0fdf4;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --orange-100: #ffedd5;
  --orange-600: #ea580c;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --focus: 2px solid var(--blue-600);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: var(--gray-50);
}

a {
  color: var(--blue-600);
  text-decoration: none;
}
a:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

/* ---------- Public / auth ---------- */
.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
}

.public-top {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.public-top__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.public-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
}
.public-brand:hover {
  text-decoration: none;
  color: var(--gray-900);
}
.public-brand .brand-logo {
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}
.brand-logo--nav {
  height: 2.25rem;
}
.brand-logo--nav-lg {
  height: 2.5rem;
}
.brand-logo--contact {
  height: 2rem;
}
.brand-logo--sidebar {
  height: 1.75rem;
  max-width: 8rem;
}
.brand-logo--footer {
  height: 2rem;
  filter: brightness(0) invert(1);
}
.landing-footer__brand {
  color: var(--white);
  text-decoration: none;
}
.landing-footer__brand:hover {
  color: var(--white);
  text-decoration: none;
}
.landing-footer__brand span {
  color: var(--white);
}
.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.admin-sidebar__brand-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.public-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.public-nav a {
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-lg);
}
.public-nav a:hover {
  color: var(--gray-900);
  text-decoration: none;
  background: var(--gray-100);
}
.public-nav .btn-nav-primary {
  background: var(--blue-600);
  color: var(--white) !important;
  border-radius: var(--radius-lg);
  padding: 0.625rem 1.5rem;
  text-decoration: none !important;
}
.public-nav .btn-nav-primary:hover {
  background: var(--blue-700);
  color: var(--white) !important;
  text-decoration: none !important;
}

.public-main {
  flex: 1;
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem;
}

/* ---------- Landing ---------- */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, var(--blue-50), var(--white));
}
.landing-main {
  flex: 1;
}
.landing-hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}
.landing-hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}
.landing-hero p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.landing-section {
  padding: 4rem 1.5rem;
}
.landing-section--white {
  background: var(--white);
}
.landing-section__inner {
  max-width: 72rem;
  margin: 0 auto;
}
.landing-section h3 {
  font-size: 1.875rem;
  font-weight: 800;
  text-align: center;
  color: var(--gray-900);
  margin: 0 0 3rem;
}
.landing-grid-3 {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .landing-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.landing-step {
  text-align: center;
}
.landing-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}
.landing-step__icon--blue {
  background: var(--blue-100);
  color: var(--blue-600);
}
.landing-step__icon--orange {
  background: var(--orange-100);
  color: var(--orange-600);
}
.landing-step__icon--green {
  background: var(--emerald-100);
  color: var(--emerald-600);
}
.landing-step h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--gray-900);
}
.landing-step p {
  margin: 0;
  color: var(--gray-600);
}
.landing-features {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .landing-features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .landing-features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.landing-feature-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.landing-feature-card:hover {
  box-shadow: var(--shadow-lg);
}
.landing-feature-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--gray-900);
}
.landing-feature-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}
.landing-cta-band {
  background: var(--blue-600);
  color: var(--white);
  padding: 4rem 1.5rem;
  text-align: center;
}
.landing-cta-band h3 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
}
.landing-cta-band p {
  font-size: 1.25rem;
  margin: 0 0 2rem;
  opacity: 0.92;
}
.landing-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 3rem 1.5rem;
}
.landing-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
}
.landing-footer__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .landing-footer__row {
    flex-direction: row;
    justify-content: space-between;
  }
}
.landing-footer a {
  color: var(--gray-400);
}
.landing-footer a:hover {
  color: var(--white);
}
.landing-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.landing-footer__copy {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-800);
  text-align: center;
  font-size: 0.875rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--blue-700);
  color: var(--white);
}
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-200);
}
.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}
.btn-success {
  background: var(--green-600);
  color: var(--white);
}
.btn-success:hover {
  background: var(--green-700);
  color: var(--white);
}
.btn-danger {
  background: var(--red-600);
  color: var(--white);
}
.btn-danger:hover {
  background: var(--red-700);
  color: var(--white);
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}
.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-xl);
}
.btn-hero {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.btn-outline-light {
  background: var(--white);
  color: var(--gray-900);
  border: 2px solid var(--gray-300);
}
.btn-outline-light:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* Client hero check-in buttons */
.btn-checkin-ok {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: none;
  background: var(--green-600);
  color: var(--white);
  font-size: 1.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-checkin-ok:hover {
  background: var(--green-700);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  color: var(--white);
}
.btn-checkin-ok .sub {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
}
.btn-emergency {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: none;
  background: var(--red-600);
  color: var(--white);
  font-size: 1.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.15s, background 0.15s;
}
.btn-emergency:hover {
  background: var(--red-700);
  color: var(--white);
}
.btn-emergency .sub {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.card--flush {
  padding: 0;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 0.25rem;
}
.card-sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0 0 1rem;
}
.card--next-window {
  background: var(--blue-50);
  border: 2px solid var(--blue-100);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.card--soft {
  background: var(--blue-50);
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: none;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-900);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  outline: none;
  box-shadow: 0 0 0 3px var(--blue-100);
}
textarea {
  min-height: 6rem;
}
.form-row {
  margin-bottom: 1rem;
}
.help,
.form-hint {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0.25rem 0 0;
}

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th,
table.data td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}
table.data th {
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
}
table.data tbody tr:hover {
  background: var(--gray-50);
}

/* ---------- Flash ---------- */
.flash {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--gray-200);
}
.flash-success {
  background: var(--green-50);
  border-color: #bbf7d0;
  color: #166534;
}
.flash-error {
  background: var(--red-50);
  border-color: #fecaca;
  color: #991b1b;
}

/* ---------- Admin layout ---------- */
.admin-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--gray-50);
}
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 16rem;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.admin-sidebar.is-open {
  transform: translateX(0);
}
@media (min-width: 1024px) {
  .admin-sidebar {
    position: static;
    height: auto;
    transform: none;
    flex-shrink: 0;
  }
}
.admin-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.admin-sidebar__close {
  display: flex;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius);
}
@media (min-width: 1024px) {
  .admin-sidebar__close {
    display: none;
  }
}
.admin-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
}
.admin-nav a:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  text-decoration: none;
}
.admin-nav a.is-active {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 600;
}
.admin-nav svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.85;
}
.admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 40;
}
.admin-overlay.is-open {
  display: block;
}
@media (min-width: 1024px) {
  .admin-overlay.is-open {
    display: none;
  }
}
.admin-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.admin-header {
  flex-shrink: 0;
  height: 4rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}
.admin-menu-btn {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.admin-menu-btn:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}
@media (min-width: 1024px) {
  .admin-menu-btn {
    display: none;
  }
}
.admin-header__title {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-bell {
  position: relative;
  padding: 0.5rem;
  color: var(--gray-500);
  background: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
}
.admin-bell:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}
.admin-bell::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #ef4444;
  border-radius: 9999px;
}
.admin-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}
.admin-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Stat cards (admin dashboard) */
.stat-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-card .label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  margin: 0;
}
.stat-card .value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0.5rem 0 0;
  letter-spacing: -0.02em;
}
.stat-card .icon-wrap {
  padding: 0.75rem;
  border-radius: var(--radius-lg);
}
.stat-card .icon-wrap--blue {
  background: var(--blue-50);
  color: var(--blue-600);
}
.stat-card .icon-wrap--red {
  background: var(--red-50);
  color: var(--red-600);
}
.stat-card .icon-wrap--green {
  background: var(--green-50);
  color: var(--green-600);
}
.stat-card .icon-wrap--purple {
  background: #f5f3ff;
  color: #7c3aed;
}
.stat-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.stat-card .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Client layout ---------- */
.client-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--white);
}
.client-header {
  flex-shrink: 0;
  position: relative;
  background: var(--white);
  color: var(--gray-900);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.client-header__inner {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.client-header .brand-logo {
  height: 2.5rem;
  max-width: none;
  margin: 0;
}
.client-main {
  flex: 1 0 auto;
  padding: 2rem 1rem 8rem;
}
.client-main__inner {
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
}

/* Client portal: center-align main content */
.client-app .client-main__inner {
  text-align: center;
}
.client-app .client-main__inner > .card,
.client-app .client-main__inner > form.card,
.client-app .client-main__inner > .table-scroll,
.client-app .client-main__inner > .client-schedule-page,
.client-app .client-main__inner > .bolt-client-dash {
  margin-left: auto;
  margin-right: auto;
}
.client-app .bolt-next-window__row {
  justify-content: center;
}
.client-app .bolt-next-window {
  text-align: center;
}
.client-app .bolt-contacts-card__title {
  text-align: center;
}
.client-app .bolt-contacts-list {
  align-items: center;
}
.client-app .bolt-contact-pill {
  justify-content: center;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.client-app .card--soft {
  text-align: center;
}
.client-app .card--soft .btn {
  margin-left: auto;
  margin-right: auto;
}
.client-app .bolt-pwa-install-card__btn {
  margin-top: 0.75rem;
}
.client-app .bolt-pwa-install-card__hint {
  margin-top: 0.75rem;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.client-app table.data {
  text-align: left;
}
.client-app table.data th,
.client-app table.data td {
  text-align: left;
}
.client-app .client-schedule-page .sched-rules-table {
  text-align: left;
}
.client-app .client-schedule-page .sched-rules-table th,
.client-app .client-schedule-page .sched-rules-table td {
  text-align: left;
}
.client-app .bolt-client-dash > .card {
  margin-left: auto;
  margin-right: auto;
  max-width: 36rem;
}
.client-app .client-main__inner > ul,
.client-app .card ul {
  display: inline-block;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}
.client-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.06);
  z-index: 30;
}
.client-bottom-nav__inner {
  max-width: 56rem;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.client-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 4.5rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  border-radius: var(--radius-lg);
}
.client-bottom-nav a:hover {
  color: var(--blue-600);
  text-decoration: none;
  background: var(--gray-50);
}
.client-bottom-nav a.is-active {
  color: var(--blue-600);
  font-weight: 600;
}
.client-bottom-nav svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Client / admin schedule rules editor */
.sched-rules-wrap {
  margin: 1rem 0;
}
.sched-rules-table .sched-when-cell {
  min-width: 11rem;
  vertical-align: top;
}
.sched-rules-table .sched-monthly-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
}
.sched-page-intro .card-sub {
  color: var(--gray-600);
}

/* Schedule rules: stack as labeled rows on narrow viewports */
@media (max-width: 767px) {
  .sched-rules-wrap.table-scroll {
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
  }
  .sched-rules-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .sched-rules-table tbody tr {
    display: block;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    padding: 0.25rem 0.5rem 0.5rem;
    background: var(--gray-50);
  }
  .sched-rules-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .sched-rules-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.75rem, 38%) 1fr;
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding: 0.65rem 0.35rem;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
  }
  .sched-rules-table tbody td:last-child {
    border-bottom: none;
  }
  .sched-rules-table tbody td:not(.sched-cell--actions)::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.6875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    align-self: start;
    padding-top: 0.35rem;
  }
  .sched-rules-table tbody td.sched-when-cell {
    min-width: 0;
    align-items: start;
  }
  .sched-rules-table tbody td.sched-when-cell::before {
    grid-column: 1;
    grid-row: 1;
  }
  .sched-rules-table tbody td.sched-when-cell > .sched-when {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    align-self: start;
  }
  .sched-rules-table tbody td.sched-cell--actions {
    display: block;
    padding: 0.75rem 0.35rem 0.35rem;
  }
  .sched-rules-table tbody td.sched-cell--actions .sched-remove-row {
    width: 100%;
  }
  #sched-add-row,
  .sched-form-save {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .client-schedule-page .card {
    padding: 1.125rem;
  }
  .client-schedule-page .sched-page-intro .card-title {
    font-size: 1.0625rem;
    line-height: 1.35;
  }
  .client-schedule-page .sched-page-intro ul.help {
    padding-left: 1.1rem;
    font-size: 0.8125rem;
  }
}

.client-large .client-header .brand-logo {
  height: 3rem;
}
.client-large .client-bottom-nav a {
  font-size: 0.85rem;
  min-height: 48px;
}
.client-large .btn-checkin-ok,
.client-large .btn-emergency {
  font-size: 2.25rem;
  padding: 2.25rem;
}

/* ---------- Contact portal ---------- */
.contact-app {
  min-height: 100vh;
  background: var(--gray-50);
}
.contact-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.contact-header__inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.contact-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}
.contact-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.contact-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ---------- Grids ---------- */
.grid-2 {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.grid-3 {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.page-sub {
  margin: 0 0 1.5rem;
  color: var(--gray-500);
  font-size: 0.9375rem;
}

/* ---------- Lists / activity ---------- */
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.activity-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.activity-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
}
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
}
.badge--success {
  background: var(--green-50);
  color: var(--green-700);
}
.badge--warning {
  background: #fff7ed;
  color: #c2410c;
}
.badge--info {
  background: var(--blue-50);
  color: var(--blue-700);
}
.admin-client-inc-row:hover {
  background: var(--gray-100) !important;
}
.admin-client-loc-map--empty {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-200);
  color: var(--gray-500);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Map ---------- */
#map {
  height: 16rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Install page uses same tokens */
body.install-body {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* ---------- Bolt parity: client dashboard ---------- */
.bolt-client-dash {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.bolt-client-dash__hero {
  text-align: center;
  margin-bottom: 0.5rem;
}
.bolt-client-dash__title {
  margin: 0 0 0.75rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
}
.bolt-client-dash__subtitle {
  margin: 0;
  font-size: 1.5rem;
  color: var(--gray-600);
}
.bolt-next-window {
  background: var(--blue-50);
  border: 2px solid var(--blue-100);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
}
.bolt-next-window__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.bolt-next-window__label {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-next-window__time {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--blue-600);
}
.bolt-next-window__utc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
}
.bolt-next-window__meta {
  margin: 0;
  font-size: 1.05rem;
  color: var(--gray-600);
}
.bolt-next-window__countdown {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--blue-100);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue-700);
  text-align: center;
}
.bolt-next-window__countdown.is-open {
  background: var(--green-50);
  border-color: #bbf7d0;
  color: var(--green-700);
}
.bolt-next-window__countdown.is-grace {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.bolt-btn-checkin,
.bolt-btn-emergency {
  width: 100%;
  border: none;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.15s, transform 0.15s;
  font: inherit;
}
.bolt-btn-checkin:hover,
.bolt-btn-emergency:hover {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.12);
}
.bolt-btn-checkin {
  background: var(--green-600);
  color: #fff;
}
.bolt-btn-checkin:hover {
  background: var(--green-700);
}
.bolt-btn-emergency {
  background: var(--red-600);
  color: #fff;
}
.bolt-btn-emergency:hover {
  background: var(--red-700);
}
.bolt-btn-checkin__title,
.bolt-btn-emergency__title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}
.bolt-btn-checkin__sub,
.bolt-btn-emergency__sub {
  font-size: 1.25rem;
  opacity: 0.95;
  margin: 0;
}
.bolt-card-white {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.bolt-card-white__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.bolt-checkin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bolt-checkin-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-xl);
}
.bolt-checkin-row--done {
  background: var(--green-50);
  border: 1px solid #bbf7d0;
}
.bolt-checkin-row__body {
  flex: 1;
  min-width: 0;
}
.bolt-checkin-row__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-checkin-row__meta {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: var(--gray-600);
}
.bolt-checkin-row__status {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gray-600);
}
.bolt-checkin-row__status.is-done {
  color: var(--green-600);
}
.bolt-contacts-card {
  background: var(--blue-50);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
}
.bolt-contacts-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}
.bolt-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.bolt-contact-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-radius: var(--radius-xl);
}
.bolt-contact-pill__name {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gray-900);
}
.bolt-contact-pill__phone {
  margin: 0.15rem 0 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* Modals (client + admin) */
body.bolt-modal-open {
  overflow: hidden;
}
.bolt-modal[hidden] {
  display: none !important;
}
.bolt-modal:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
}
.bolt-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
}
.bolt-modal__panel {
  position: relative;
  margin: 2rem auto;
  max-width: 32rem;
  width: calc(100% - 2rem);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.bolt-modal__panel--lg {
  max-width: 42rem;
}
.bolt-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.bolt-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-modal__x {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.25rem;
}
.bolt-modal__x:hover {
  color: var(--gray-600);
}
.bolt-modal__body {
  padding: 1rem 1.5rem 1.5rem;
  overflow-y: auto;
}
.bolt-modal__body--center {
  text-align: center;
  padding: 1.5rem;
}
.bolt-modal__hero-icon {
  display: block;
  margin: 0 auto 1rem;
}
.bolt-modal__prompt {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 1rem;
}
.bolt-modal__hint {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin: 0 0 1.5rem;
}
.bolt-modal__actions {
  display: flex;
  gap: 1rem;
}
.bolt-modal__btn {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}
.bolt-modal__btn--block {
  flex: none;
  width: 100%;
}
.bolt-modal__btn--muted {
  background: var(--gray-100);
  color: var(--gray-900);
}
.bolt-modal__btn--muted:hover {
  background: var(--gray-200);
}
.bolt-modal__btn--green {
  background: var(--green-600);
  color: #fff;
}
.bolt-modal__btn--green:hover {
  background: var(--green-700);
}
.bolt-modal__btn--red {
  background: var(--red-600);
  color: #fff;
}
.bolt-modal__btn--red:hover {
  background: var(--red-700);
}
.bolt-modal__btn--blue {
  background: var(--blue-600);
  color: #fff;
}
.bolt-modal__btn--blue:hover {
  background: var(--blue-700);
}

/* ---------- Bolt parity: admin incidents & analytics ---------- */
.admin-main .bolt-admin-page,
.admin-app .bolt-admin-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.bolt-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.bolt-page-head__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.bolt-page-head__sub {
  margin: 0.25rem 0 0;
  color: var(--gray-500);
  font-size: 0.9375rem;
}
.bolt-page-head__actions {
  display: flex;
  gap: 0.75rem;
}
.bolt-page-head__actions--wrap {
  flex-wrap: wrap;
}

/* Admin clients list (Bolt React parity) */
.bolt-clients-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .bolt-clients-toolbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}
.bolt-clients-toolbar__search {
  display: flex;
  flex: 1;
  gap: 0.75rem;
  align-items: center;
  min-width: min(100%, 12rem);
}
.bolt-clients-toolbar__search .bolt-search-wrap {
  flex: 1;
}
.bolt-clients-search-input {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.bolt-clients-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.bolt-clients-filter-btn {
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--gray-700);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  font: inherit;
}
.bolt-clients-filter-btn:hover {
  background: var(--gray-200);
  color: var(--gray-900);
  text-decoration: none;
}
.bolt-clients-filter-btn.is-active {
  background: var(--blue-600);
  color: #fff;
}
.bolt-clients-filter-btn.is-active:hover {
  background: var(--blue-700);
  color: #fff;
}
.bolt-clients-table-wrap {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}
.bolt-clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.bolt-clients-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.bolt-clients-table tbody td {
  padding: 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-100);
}
.bolt-clients-table tbody tr:hover {
  background: var(--gray-50);
}
.bolt-clients-table__actions {
  text-align: right;
  width: 1%;
}
.bolt-clients-table__client-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.bolt-clients-table__client-link:hover .bolt-clients-table__name {
  color: var(--blue-600);
}
.bolt-clients-table__name {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}
.bolt-clients-table__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.bolt-clients-table__contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}
.bolt-clients-table__contact-line + .bolt-clients-table__contact-line {
  margin-top: 0.35rem;
}
.bolt-clients-table__muted {
  color: var(--gray-600);
}
.bolt-clients-open-inc {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red-600);
}
.bolt-clients-next-due {
  font-size: 0.875rem;
  color: var(--gray-600);
}
.bolt-clients-next-due.is-overdue {
  color: var(--red-600);
  font-weight: 600;
}
.bolt-clients-table__schedule-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}
.bolt-clients-table__schedule-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.bolt-clients-action-icon {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  color: var(--gray-500);
  text-decoration: none;
}
.bolt-clients-action-icon:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}
.bolt-clients-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-500);
}
.bolt-clients-export {
  margin: 0;
}

.bolt-btn--primary {
  background: var(--blue-600);
  color: #fff;
}
.bolt-btn--primary:hover {
  background: var(--blue-700);
  color: #fff;
}
.bolt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  box-sizing: border-box;
}
a.bolt-btn:hover {
  text-decoration: none;
}
.bolt-btn--secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}
.bolt-btn--secondary:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}
.bolt-btn--sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}
.bolt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .bolt-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.bolt-kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  padding: 1.25rem;
  text-align: center;
}
.bolt-kpi-card--left {
  text-align: left;
}
.bolt-kpi-card__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
}
.bolt-kpi-card__value {
  margin: 0.5rem 0 0;
  font-size: 1.875rem;
  font-weight: 700;
}
.bolt-kpi-card__value--orange {
  color: var(--orange-600);
}
.bolt-kpi-card__value--red {
  color: var(--red-600);
}
.bolt-kpi-card__value--green {
  color: var(--green-600);
}
.bolt-kpi-card__value--blue {
  color: var(--blue-600);
}
.bolt-kpi-card__value--dark {
  color: var(--gray-900);
}
.bolt-card-admin {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  padding: 1.5rem;
}
.bolt-incidents-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.bolt-search-wrap {
  position: relative;
  flex: 1;
  min-width: 12rem;
}
.bolt-search-wrap__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.bolt-search-wrap__input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font: inherit;
}
.bolt-search-wrap__input:focus {
  outline: 2px solid var(--blue-600);
  outline-offset: 1px;
}
.bolt-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.bolt-filter-chip {
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--gray-700);
  background: var(--gray-100);
  text-transform: capitalize;
}
.bolt-filter-chip:hover {
  background: var(--gray-200);
  text-decoration: none;
  color: var(--gray-900);
}
.bolt-filter-chip.is-active {
  background: var(--blue-600);
  color: #fff;
}
.bolt-filter-chip.is-active:hover {
  color: #fff;
  background: var(--blue-700);
}
.bolt-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  text-transform: capitalize;
}
.bolt-badge--default {
  background: var(--gray-100);
  color: var(--gray-800);
}
.bolt-badge--success {
  background: #dcfce7;
  color: #166534;
}
.bolt-badge--warning {
  background: #fef9c3;
  color: #854d0e;
}
.bolt-badge--danger {
  background: #fee2e2;
  color: #991b1b;
}
.bolt-badge--info {
  background: var(--blue-50);
  color: #1e40af;
}
.bolt-severity {
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: lowercase;
}
.bolt-severity--critical {
  color: var(--red-600);
  background: var(--red-50);
}
.bolt-severity--high {
  color: var(--orange-600);
  background: var(--orange-100);
}
.bolt-severity--medium {
  color: #ca8a04;
  background: #fef9c3;
}
.bolt-severity--low {
  color: var(--blue-600);
  background: var(--blue-50);
}
/* Incident card list (standalone cards, one per incident) */
.bolt-incident-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bolt-inc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bolt-inc-card:hover {
  border-color: var(--blue-600);
  box-shadow: var(--shadow);
}
.bolt-inc-card:focus {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Card header: left badges row + right response-time */
.bolt-inc-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.bolt-inc-card__head-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  min-width: 0;
}
.bolt-inc-card__client {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gray-900);
  text-decoration: none;
}
.bolt-inc-card__client:hover {
  color: var(--blue-600);
  text-decoration: none;
}
.bolt-inc-card__hash {
  font-size: 0.8125rem;
  color: var(--gray-400);
}
.bolt-inc-card__rt {
  text-align: right;
  flex-shrink: 0;
}
.bolt-inc-card__rt-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.bolt-inc-card__rt-value {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
}

/* Description */
.bolt-inc-card__desc {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Meta row */
.bolt-inc-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}
.bolt-inc-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.bolt-inc-card__last-update {
  margin-left: auto;
  font-style: italic;
}
@media (max-width: 640px) {
  .bolt-inc-card__last-update {
    margin-left: 0;
  }
}
.bolt-inc-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.bolt-inc-modal__h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-inc-modal__desc {
  margin: 0 0 1.25rem;
  color: var(--gray-600);
}
.bolt-inc-modal__mapblock {
  margin: 0 0 1.25rem;
}
.bolt-inc-modal__map-caption {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}
.bolt-inc-modal__map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.bolt-incident-map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  z-index: 0;
}
.bolt-inc-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 520px) {
  .bolt-inc-modal__grid {
    grid-template-columns: 1fr;
  }
}
.bolt-inc-modal__lbl {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.bolt-inc-modal__val {
  margin: 0.25rem 0 0;
  font-weight: 500;
  color: var(--gray-900);
}
.bolt-inc-modal__timeline {
  margin-bottom: 1rem;
}
.bolt-inc-modal__h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-tl-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.bolt-tl-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
}
.bolt-tl-dot--blue {
  background: var(--blue-600);
}
.bolt-tl-dot--green {
  background: var(--green-600);
}
.bolt-tl-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
}
.bolt-tl-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.bolt-inc-modal__actions {
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

/* Analytics */
.bolt-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .bolt-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .bolt-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.bolt-stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}
.bolt-stat-trend.is-good {
  color: var(--green-600);
}
.bolt-stat-trend.is-bad {
  color: var(--red-600);
}
.bolt-stat-trend__pct {
  font-weight: 600;
}
.bolt-stat-trend__vs {
  color: var(--gray-500);
  font-weight: 400;
}
.bolt-analytics-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .bolt-analytics-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.bolt-card-header {
  margin-bottom: 1rem;
}
.bolt-card-header__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-card-header__sub {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.bolt-bar-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bolt-bar-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.bolt-bar-day__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}
.bolt-bar-day__counts {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}
.bolt-bar-day__ok {
  color: var(--green-600);
  font-weight: 500;
}
.bolt-bar-day__bad {
  color: var(--red-600);
  font-weight: 500;
}
.bolt-bar-day__track {
  display: flex;
  gap: 0.25rem;
  height: 2rem;
  width: 100%;
  align-items: stretch;
}
.bolt-bar-day__fill {
  border-radius: 0.25rem;
  min-width: 2px;
  transition: width 0.2s;
}
.bolt-bar-day__fill--green {
  background: #22c55e;
}
.bolt-bar-day__fill--red {
  background: #ef4444;
}
.bolt-type-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bolt-type-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.bolt-type-bar__count {
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-type-bar__pct {
  font-size: 0.75rem;
  color: var(--gray-500);
}
.bolt-type-bar__track {
  height: 0.75rem;
  background: var(--gray-100);
  border-radius: 9999px;
  overflow: hidden;
}
.bolt-type-bar__fill {
  height: 100%;
  border-radius: 9999px;
}
.bolt-type-bar__fill.bg-orange {
  background: var(--orange-600);
}
.bolt-type-bar__fill.bg-red {
  background: var(--red-600);
}
.bolt-type-bar__fill.bg-yellow {
  background: #eab308;
}
.bolt-rt-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bolt-rt-row__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}
.bolt-rt-row__track {
  height: 2.5rem;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bolt-rt-row__fill {
  height: 100%;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  transition: width 0.2s;
}
.bolt-health {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.bolt-health__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}
.bolt-health__val--green {
  color: var(--green-600);
  font-weight: 600;
}
.bolt-health__val--blue {
  color: var(--blue-600);
  font-weight: 600;
}
.bolt-health__val--purple {
  color: #9333ea;
  font-weight: 600;
}
.bolt-health__track {
  height: 0.75rem;
  background: var(--gray-100);
  border-radius: 9999px;
  overflow: hidden;
}
.bolt-health__fill {
  height: 100%;
  border-radius: 9999px;
}
.bolt-health__fill--green {
  background: #22c55e;
}
.bolt-health__fill--blue {
  background: var(--blue-600);
}
.bolt-health__fill--purple {
  background: #9333ea;
}
.bolt-health__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-health__grade {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bolt-health__letter {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-600);
}
.bolt-quick-reports {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .bolt-quick-reports {
    grid-template-columns: repeat(3, 1fr);
  }
}
.bolt-qr-tile {
  display: block;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.bolt-qr-tile:hover {
  border-color: var(--blue-600);
  background: var(--blue-50);
  text-decoration: none;
  color: inherit;
}
.bolt-qr-tile svg {
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}
.bolt-qr-tile:hover svg {
  color: var(--blue-600);
}
.bolt-qr-tile h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}
.bolt-qr-tile p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}
