/* Core layout */
:root {
  --brand: #e6561e;
  --brand-dark: #bb3f10;
  --text: #1d1d1f;
  --background: #f6f6f6;
  --card: #ffffff;
  --success: #0a8754;
  --danger: #c0392b;
  --border: #e3e7f0;
  --surface-muted: #f2f4fb;
  --panel-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  --page-gradient-start: rgba(0, 82, 204, 0.08);
  --page-gradient-mid: rgba(230, 86, 30, 0.05);
  --page-gradient-end: rgba(15, 23, 42, 0.04);
  --page-gradient-radial-a: rgba(0, 82, 204, 0.18);
  --page-gradient-radial-b: rgba(230, 86, 30, 0.15);
  --page-gradient-radial-c: rgba(15, 23, 42, 0.16);
  --page-gradient-overlay-opacity: 0.8;
  /* Global spacing + typography tokens for SaaS layout */
  --space-section-y: 2.5rem; /* ~40px between major sections */
  --space-section-y-lg: 3rem; /* ~48px for key page breaks */
  --space-section-padding: 1.5rem; /* 24px vertical padding within sections */
  --space-card-padding: 1rem; /* 16px internal card padding */
  --space-element-gap: 0.75rem; /* 12px between related elements */
  --font-size-base: 0.9375rem; /* ~15px body copy */
  --font-size-page-title: 1.7rem; /* 27–28px page titles */
  --font-size-section-title: 1.125rem; /* 18px section titles */
  --font-size-label: 0.85rem; /* 13–14px labels */
  --text-muted: #6a6f76;
}

* {
  box-sizing: border-box;
}

/* Global elements improvements */
/*
 * Make images within the main content and card components responsive.
 * Restricting the selector scope prevents brand logos and decorative
 * icons from unintentionally scaling to fill their containers.
 */
.content img,
.card img,
.table-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Support modal tabs reuse analytics tab styling */
.support-modal-tabs {
  margin: 0 0 10px 0;
  display: inline-flex;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.18);
}

.support-modal-tabs .analytics-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  color: #4b5563;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.support-modal-tabs .analytics-tab.is-active {
  background: #0f172a;
  color: #f9fafb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.support-modal-panels {
  margin-top: 8px;
}

.support-modal-panel[data-support-modal-panel="open"] .help-support-thread {
  max-height: 360px;
  overflow-y: auto;
}

/* Support ticket thread styling (shared between Help tab and modal) */
.help-support-thread {
  border-radius: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.help-support-thread__subject {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
}

.help-support-thread__messages {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-support-message {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.help-support-message--tenant {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.7);
}

.help-support-message--admin {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.help-support-message__meta {
  margin: 0 0 4px 0;
  color: #6b7280;
}

.help-support-message__body {
  margin: 0;
}

.help-support-thread__reply {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-support-thread__reply textarea {
  width: 100%;
}

.help-support-thread__reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: space-between;
}

.help-support-thread__reply-status {
  flex: 1 1 160px;
}

.help-support-thread__reply-submit {
  flex: 0 0 auto;
}

.support-modal-open-selector {
  margin: 4px 0 8px 0;
  display: flex;
  gap: 6px;
  align-items: center;
}

.support-modal-open-selector select {
  max-width: 100%;
  font-size: 0.8rem;
  padding: 2px 6px;
}

.support-interactive-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-interactive-row input {
  flex: 1 1 auto;
}

.support-interactive-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/*
 * Provide accessible focus outlines on interactive elements only.
 * This ensures that hidden or non-interactive elements do not render
 * unexpected focus indicators on larger screens. The outline offset
 * creates breathing room between the element and the outline.
 */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg,
      var(--page-gradient-start),
      var(--page-gradient-mid) 45%,
      var(--page-gradient-end)),
    var(--background);
  background-attachment: fixed;
  color: var(--text);
  font-size: var(--font-size-base, 0.9375rem);
  line-height: 1.5;
}

body.mobile-nav-open {
  overflow: hidden;
}

.mobile-nav-trigger {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  z-index: 1200;
  cursor: pointer;
  padding: 0;
}

.mobile-nav-trigger span {
  width: 24px;
  height: 2px;
  background: #fff;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-open .mobile-nav-trigger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-open .mobile-nav-trigger span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-open .mobile-nav-trigger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-trigger:focus {
  outline: 2px solid var(--brand);
}

body.mobile-nav-open .mobile-nav-overlay {
  display: block;
  opacity: 1;
}

a {
  color: var(--brand);
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  --sidebar-expanded-width: 208px;
  --sidebar-link-padding: 7px 14px 7px 18px;
  --sidebar-padding-x: 20px;
  --sidebar-accent: var(--brand, #4f82ff);
  --sidebar-scroll-track: rgba(7, 11, 24, 0.92);
  --sidebar-scroll-thumb: rgba(148, 163, 184, 0.8);
  width: var(--sidebar-expanded-width, 240px);
  color: var(--nav-text, #f4f6fb);
  padding: 20px var(--sidebar-padding-x);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: width 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--nav-bg, #0d1222);
  box-shadow:
    0 18px 32px rgba(7, 12, 28, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  /* Custom scrollbar: always visible, branded, clearly not default. */
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-scroll-thumb) var(--sidebar-scroll-track);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background:
    radial-gradient(circle at 30% 0%, rgba(248, 250, 252, 0.05), transparent 55%),
    linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.82)
    );
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.9),
    inset 0 0 0 2px rgba(15, 23, 42, 0.4);
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(148, 163, 184, 0.78),
    rgba(51, 65, 85, 0.98)
  );
  border-radius: 999px;
  border: 1px solid rgba(12, 15, 29, 0.98);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 4px 12px rgba(0, 0, 0, 0.85);
}


.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.03), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(79, 130, 255, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.01), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar h1 {
  font-size: 1.2rem;
  margin: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 0 10px 0;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.sidebar-brand img {
  max-width: 90%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.sidebar-nav__section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav__section + .sidebar-nav__section {
  margin-top: 10px;
}

.sidebar-nav__section-label {
  position: relative;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(
    in srgb,
    var(--button-primary, var(--brand, #e6561e)) 78%,
    rgba(248, 250, 252, 0.88) 22%
  );
  padding: 6px 4px 0;
  margin-top: 2px;
}

.sidebar-nav__section-label::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(15, 23, 42, 0),
      rgba(248, 250, 252, 0.35),
      rgba(15, 23, 42, 0)
    );
  opacity: 0.6;
  transform: translateY(-4px);
}

.sidebar-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav__item {
  margin: 0;
  padding: 0;
}

.sidebar-nav__form {
  margin: 0;
}

.sidebar-nav__form button {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.sidebar-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--sidebar-link-padding);
  border-radius: 10px;
  color: var(--nav-text, rgba(244, 246, 251, 0.9));
  border: none;
  background: transparent;
  position: relative;
  min-height: 34px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--sidebar-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-nav__link:hover,
.sidebar-nav__link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav__link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 600;
}

.sidebar-nav__link.active::before {
  opacity: 1;
}

.sidebar-nav__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: currentColor;
}

.sidebar-nav__icon-svg {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.sidebar-nav__label {
  flex: 1;
  display: block;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.sidebar-nav__chevron {
  display: none;
}

.sidebar-nav__divider {
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
  border-radius: 999px;
}

.sidebar-nav__footer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-nav__link {
    transition: none;
  }

  .sidebar-nav__link:hover,
  .sidebar-nav__link:focus-visible {
    transform: none;
  }

  .sidebar-nav__link::before,
  .sidebar-nav__link.active::before {
    transition: none;
  }
}

.sidebar-nav__link--logout {
  font-size: 0.82rem;
  width: 100%;
  opacity: 0.85;
}

.sidebar-nav__form--logout {
  margin: 0;
}

.sidebar-nav__logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  border: none;
  font: inherit;
  background: transparent;
  color: var(--nav-text, rgba(255, 255, 255, 0.85));
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  opacity: 0.65;
  text-align: left;
}

.sidebar-nav__logout-button span {
  white-space: nowrap;
}

.sidebar-nav__logout-button:hover,
.sidebar-nav__logout-button:focus-visible {
  opacity: 1;
}

.content {
  flex: 1;
  padding: 24px;
  position: relative;
  z-index: 0;
}

.content::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.18), rgba(247, 249, 255, 0) 120px),
    radial-gradient(circle at 12% 16%, var(--page-gradient-radial-a), transparent 55%),
    radial-gradient(circle at 88% 8%, var(--page-gradient-radial-b), transparent 45%),
    radial-gradient(circle at 80% 82%, var(--page-gradient-radial-c), transparent 60%),
    linear-gradient(180deg, rgba(247, 249, 255, 0.85), rgba(247, 249, 255, 0));
  opacity: var(--page-gradient-overlay-opacity, 0.8);
  pointer-events: none;
  z-index: -1;
}

/* Page-level layout + spacing utilities */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-section-y, 2.5rem);
}

.page-main {
  flex: 1 1 auto;
  min-width: 0;
}

.page-sidebar {
  flex: 0 0 320px;
  max-width: 360px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-element-gap, 0.75rem);
  margin-bottom: var(--space-section-y, 2.5rem);
}

.page-section {
  padding: var(--space-section-padding, 1.5rem) 0;
}

.page-section + .page-section {
  margin-top: var(--space-section-y, 2.5rem);
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stack-12 {
  display: flex;
  flex-direction: column;
  gap: var(--space-element-gap, 0.75rem);
}

.stack-24 {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.layout-columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-element-gap, 0.75rem);
}

.layout-columns-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-element-gap, 0.75rem);
}

.show-on-mobile {
  display: none;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.85);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  position: relative;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-page {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-bar-page-subtitle {
  margin: 0;
  font-size: 0.8rem;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-search {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.top-bar-search input {
  border: none;
  background: transparent;
  min-width: 180px;
  font-size: 0.9rem;
}

.top-bar-search input:focus {
  outline: none;
}

.top-bar::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -10px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.18), transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-primary-action {
  padding-inline: 18px;
}

.top-bar-primary-action span:last-child {
  font-weight: 600;
}

.top-bar-utilities {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.top-bar-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(15, 23, 42, 0.72);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.top-bar-utility:hover,
.top-bar-utility:focus-visible {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
  color: var(--button-primary, var(--brand));
}

.top-bar-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.top-bar-notifications__icon svg {
  width: 18px;
  height: 18px;
}

.top-bar-notifications__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #ffffff;
}

.top-bar-notifications__badge[hidden] {
  display: none !important;
}

.top-bar-notifications:hover,
.top-bar-notifications:focus-visible {
  color: var(--button-primary, var(--brand));
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.top-bar-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.top-bar-user:hover,
.top-bar-user:focus-visible {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.top-bar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(135deg, var(--brand, #e6561e), var(--brand-dark, #bb3f10));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
}

.top-bar-user-avatar-initials {
  line-height: 1;
}

.top-bar-user-meta {
  display: inline-flex;
  align-items: center;
}

.top-bar-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.top-bar-user-name::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.9) transparent transparent transparent;
  transform: translateY(1px);
}

/* Top bar icon color language */
.top-bar-actions .btn__icon {
  color: rgba(15, 23, 42, 0.72);
}

.top-bar-primary-action .btn__icon {
  color: #ffffff;
}

.top-bar-actions .btn-secondary-outline:hover .btn__icon,
.top-bar-actions .btn-secondary-outline:focus-visible .btn__icon {
  color: var(--button-primary, var(--brand));
}

.top-bar-help {
  border-radius: 999px;
  border: 1px solid var(--button-primary, var(--brand));
  background: #ffffff;
  color: var(--button-primary, var(--brand));
  padding-inline: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.top-bar-help .btn__icon {
  color: var(--button-primary, var(--brand));
}

.top-bar-help:hover,
.top-bar-help:focus-visible {
  background: #ffffff;
  color: var(--button-primary, var(--brand));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.top-bar-logo img {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.notifications-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 40;
}

.notifications-modal[hidden] {
  display: none !important;
}

.notifications-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.notifications-modal__panel {
  position: relative;
  margin: 78px 24px 24px;
  max-width: 360px;
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.notifications-header h3 {
  margin: 0;
  font-size: 1rem;
}

.notifications-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notifications-mark-all {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
}

.notifications-mark-all:hover {
  background: rgba(148, 163, 184, 0.12);
}

.notifications-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
}

.notifications-close:hover {
  background: rgba(148, 163, 184, 0.12);
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  max-height: 360px;
  overflow-y: auto;
}

.notifications-item {
  padding: 8px 4px;
  border-radius: 8px;
}

.notifications-item + .notifications-item {
  margin-top: 4px;
}

.notifications-item--unread {
  background: rgba(239, 246, 255, 0.9);
}

.notifications-item__title {
  font-size: 0.9rem;
  font-weight: 600;
}

.notifications-item__body {
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 2px;
}

.notifications-item__meta {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 2px;
}

.notifications-empty {
  padding: 12px 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.card-grid {
  display: grid;
  gap: var(--space-element-gap, 0.75rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--card);
  padding: var(--space-card-padding, 1rem);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--panel-shadow);
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-element-gap, 0.75rem);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-element-gap, 0.75rem);
}

.card-header + .card-body,
.card-body + .card-footer {
  margin-top: var(--space-element-gap, 0.75rem);
}

.card + .card {
  margin-top: 20px;
}

.card--surface {
  background: var(--surface-muted);
}

.card--brand {
  border-top: 4px solid var(--brand);
}

.card--timeline {
  background: #ffffff;
}

.card--full-mobile {
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .card:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-color: rgba(148, 163, 184, 0.8);
  }
}

.card--wizard .form-section {
  border: none;
  background: #f5f7ff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.form-progress {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.form-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #7a8090;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.form-progress__step span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  color: #fff;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.stats {
  font-size: 2rem;
  font-weight: 700;
}

.btn,
.btn-primary-modern,
.btn-secondary-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  gap: 8px;
  min-height: 44px;
}

.btn__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-sm-modern {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-lg-modern {
  padding: 14px 22px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--button-primary, var(--brand));
  color: var(--button-primary-text, #fff);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--button-primary-dark, var(--brand-dark));
  color: var(--button-primary-dark-text, var(--button-primary-text, #fff));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(0, 0, 0, 0.02);
  color: var(--button-primary, var(--brand));
  border: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  color: var(--button-primary-dark, var(--brand-dark));
  border-color: currentColor;
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text, #111);
  border: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.btn-primary-modern {
  background: var(--button-primary, var(--brand));
  color: var(--button-primary-text, #fff);
  border: none;
}

.btn-primary-modern:hover,
.btn-primary-modern:focus-visible {
  background: var(--button-primary-dark, var(--brand-dark));
  color: var(--button-primary-dark-text, var(--button-primary-text, #fff));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.btn-secondary-outline {
  background: rgba(0, 0, 0, 0.02);
  color: var(--button-primary, var(--brand));
  border: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-secondary-outline:hover,
.btn-secondary-outline:focus-visible {
  color: var(--button-primary-dark, var(--brand-dark));
  border-color: currentColor;
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--button-primary, var(--brand));
  border: 1px solid transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(15, 23, 42, 0.03);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.8);
}

tbody tr:hover {
  background: rgba(239, 246, 255, 0.9);
}

.table-condensed th,
.table-condensed td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.table-modern {
  font-size: 0.9rem;
}

.table-modern thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: rgba(248, 250, 252, 0.9);
}

.table-modern tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.table-modern tbody tr:hover {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-stack-mobile {
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pass {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.status-fail {
  background: rgba(192, 57, 43, 0.15);
  color: var(--danger);
}

.legacy-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e5e5;
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

form {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  display: grid;
  gap: 12px;
}

.sidebar-nav__form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: block;
  gap: 0;
}

.settings-form,
.component-settings-form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.fire-door-pricing-groups {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.fire-door-pricing-group {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #fff);
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.fire-door-pricing-group summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
}

.fire-door-pricing-group summary::-webkit-details-marker {
  display: none;
}

.fire-door-pricing-group summary strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.fire-door-pricing-group summary p {
  margin: 4px 0 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.fire-door-pricing-group__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #fff;
}

.fire-door-pricing-group[open] summary {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
}

.fire-door-pricing-grid {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.fire-door-pricing-grid__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(204, 212, 230, 0.95);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fire-door-pricing-grid__item:hover,
.fire-door-pricing-grid__item:focus-within {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 18px 36px rgba(15, 23, 42, 0.12);
}

.fire-door-pricing-grid__label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fire-door-pricing-grid__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fire-door-pricing-grid__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(37, 99, 235, 0.8));
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

.fire-door-pricing-grid__info {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.5);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: 700;
  margin-left: auto;
}

.fire-door-pricing-grid__info::after {
  content: 'i';
  font-size: 0.75rem;
}

.fire-door-pricing-grid .input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  background: #fff;
  padding: 0 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.fire-door-pricing-grid .input-with-prefix input {
  border: none;
  flex: 1;
  padding: 10px 8px;
  font: inherit;
  background: transparent;
}

.fire-door-pricing-grid .input-with-prefix span {
  font-weight: 600;
  color: #475569;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.has-tooltip:focus-visible::before,
.has-tooltip:hover::before {
  opacity: 1;
  transform: translate(-50%, -2px);
}

.component-checklist-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.component-checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.component-checklist-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.component-checklist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.component-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.component-stats__card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  min-width: 160px;
  background: rgba(248, 250, 252, 0.85);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.component-stats__value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
}

.component-stats__label {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.component-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.component-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.component-search input {
  border: none;
  padding: 0.25rem 0.1rem;
  font-size: 0.95rem;
  min-width: 180px;
}

.component-search input:focus {
  outline: none;
}

.component-search__icon {
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  position: relative;
}

.component-search__icon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 2px;
  background: #94a3b8;
  border-radius: 2px;
  right: -5px;
  bottom: -3px;
  transform: rotate(40deg);
}

.component-filter-group {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.component-filter {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: #4b5563;
}

.component-filter.is-active {
  background: rgba(230, 86, 30, 0.12);
  border-color: rgba(230, 86, 30, 0.4);
  color: #b5471b;
  box-shadow: 0 6px 14px rgba(230, 86, 30, 0.18);
}

.component-search__meta {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.component-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.settings-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.settings-pill--status {
  box-shadow: 0 12px 28px rgba(230, 86, 30, 0.2);
}

.settings-pill--ghost {
  border-style: dashed;
  box-shadow: none;
  background: rgba(248, 250, 252, 0.9);
}

.settings-pill__divider {
  width: 1px;
  height: 14px;
  background: rgba(15, 23, 42, 0.2);
}

.settings-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.settings-pill--trialing .settings-pill__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.24);
}

.settings-pill--past_due .settings-pill__dot {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.24);
}

.settings-pill__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.settings-pill__icon--team::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0f172a;
  position: absolute;
  top: 4px;
}

.settings-pill__icon--team::after {
  content: '';
  width: 14px;
  height: 6px;
  border-radius: 999px 999px 4px 4px;
  background: #0f172a;
  position: absolute;
  bottom: 3px;
}

.settings-pill__icon--timer::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  border: 2px solid #0f172a;
}

.settings-pill__icon--timer::after {
  content: '';
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: #0f172a;
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 0 0 #0f172a;
}

.component-settings-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.component-settings-item--enabled {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.1);
}

.component-settings-item--disabled {
  opacity: 0.9;
  border-style: dashed;
}

.component-settings-item__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.component-settings-item__key {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #94a3b8;
}

.component-settings-item__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.component-settings-item__toggle span {
  font-size: 0.8rem;
}

.component-flag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.component-flag--on {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.component-flag--off {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

.component-settings-item__insights {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.component-template-pills {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
}

.component-template-pills li {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: rgba(248, 250, 252, 0.9);
}

.component-template-pills__more {
  border-style: dashed;
  color: #475569;
}

.component-template-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.component-reason-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.component-reason-count--empty {
  color: #9ca3af;
}

.component-reasons {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.component-reasons summary {
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}

.component-reasons summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.component-reasons__meta {
  font-size: 0.85rem;
  color: #6b7280;
}

.component-reasons[open] summary {
  border-bottom: 1px solid var(--border);
}

.component-reasons__body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.component-reasons__label {
  display: none;
}

.component-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.component-reasons-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.component-reasons-row input[type="text"] {
  flex: 1;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 0.9rem;
}

/* Generic collapsible / accordion */
.accordion {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  overflow: hidden;
}

.accordion__item + .accordion__item {
  border-top: 1px solid var(--border);
}

.accordion__header {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.accordion__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.accordion__chevron {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.accordion__header[aria-expanded="true"] .accordion__chevron {
  transform: rotate(90deg);
}

.accordion__panel {
  padding: 0 16px 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.22s ease;
}

.accordion__panel[hidden] {
  display: none;
  max-height: 0;
  opacity: 0;
}

.client-logo-card {
  margin: 24px 0;
}

.client-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.client-logo-item {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  background: #fff;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.theme-swatches__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-muted, #f7f9ff);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-customizer {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.theme-preview-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.09);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.theme-preview-card--floating {
  position: fixed;
  bottom: 20px;
  right: 24px;
  width: min(320px, calc(100% - 32px));
  z-index: 60;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 20px;
  padding: 18px;
  animation: themePreviewPop 0.25s ease;
}
.theme-preview-card--floating .theme-preview__hint,
.theme-preview-card--floating .theme-preview__contrast,
.theme-preview-card--floating .theme-preview__contrast-details {
  display: none;
}
.theme-preview-card--floating .theme-preview {
  grid-template-columns: 1fr;
}
.theme-preview-card--floating .theme-preview__sidebar {
  display: none;
}
.theme-preview-card--floating .theme-preview__content {
  min-height: auto;
}
.theme-preview-anchor {
  display: block;
  height: 1px;
  width: 100%;
}
@keyframes themePreviewPop {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.theme-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}

.theme-preview__sidebar {
  background: var(--theme-nav-bg, #111c2b);
  color: var(--theme-nav-text, #f8fafc);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  min-height: 180px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.theme-preview__nav-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-preview__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
  font-size: 0.9rem;
}

.theme-preview__nav-item {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.theme-preview__nav-item--active {
  background: var(--theme-accent, #e6561e);
  box-shadow: 0 6px 12px rgba(5, 5, 5, 0.2);
}

.theme-preview__content {
  background: var(--theme-card-bg, #ffffff);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}

.theme-preview__header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.theme-preview__pill {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme-accent, #e6561e), var(--theme-button, #e6561e));
}

.theme-preview__badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: var(--theme-accent, #e6561e);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
}

.theme-preview__status-dot {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent, #e6561e) 14%, transparent);
  color: color-mix(in srgb, var(--theme-accent, #e6561e) 75%, #0f172a);
}

.theme-preview__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-preview__filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.theme-preview__filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--theme-accent, #e6561e);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #e6561e) 15%, transparent);
}

.theme-preview__tabs {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.theme-preview__tab {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

.theme-preview__tab.is-active {
  background: var(--theme-button, #e6561e);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

/* Generic tabs / segmented controls */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(248, 250, 252, 0.9);
}

.tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.tab:hover,
.tab:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.tab-active,
.tab.is-active {
  background: #0f172a;
  color: #f9fafb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
  transform: translateY(-1px);
}

.theme-preview__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.08);
  background: var(--theme-accent, #e6561e);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.theme-preview__board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.theme-preview__card {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}

.theme-preview__card--quote {
  background: color-mix(in srgb, var(--theme-accent, #e6561e) 8%, var(--theme-card-bg, #fff));
}

.theme-preview__card--stat {
  background: color-mix(in srgb, var(--theme-card-bg, #fff) 90%, rgba(15, 23, 42, 0.04));
}

.theme-preview__card strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.theme-preview__card p {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #475569;
}

.theme-preview__status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-preview__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--theme-accent, #e6561e) 15%, transparent);
  color: color-mix(in srgb, var(--theme-accent, #e6561e) 85%, #0f172a);
}

.theme-preview__chip--muted {
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
}

.theme-preview__sidebar-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.theme-preview__metric-label {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.theme-preview__sidebar .theme-preview__chip {
  background: rgba(255, 255, 255, 0.16);
  color: var(--theme-nav-text, #f8fafc);
}

.theme-preview__progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.theme-preview__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--theme-accent, #e6561e);
}

.theme-preview__progress--inline {
  background: rgba(15, 23, 42, 0.08);
}

.theme-preview__progress--inline span {
  background: var(--theme-button, #e6561e);
}

.theme-preview__job-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.theme-preview__button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  color: var(--theme-button-text, #fff);
  background: var(--theme-button, #e6561e);
  box-shadow: 0 10px 18px rgba(230, 86, 30, 0.35);
  pointer-events: none;
  font-size: 0.78rem;
}

.theme-preview__pill--ghost {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.theme-preview__timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.theme-preview__timeline span {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent, #e6561e) 18%, rgba(15, 23, 42, 0.15));
  opacity: 0.7;
}

.theme-preview__hint {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7280;
}

.theme-preview__contrast-details {
  margin-top: 6px;
}

.theme-preview__contrast-summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  user-select: none;
}

.theme-preview__contrast-summary::-webkit-details-marker {
  display: none;
}

.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.theme-presets__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-logo-item img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
}

.client-logo-item p {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.client-logo-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eee;
  padding: 4px;
}

.client-logo-display {
  margin-bottom: 8px;
}

.client-logo-display img {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
}

.brand-logo-preview {
  border: 1px dashed #d7d7d7;
  border-radius: 12px;
  padding: 12px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  width: fit-content;
  background: #fafafa;
}

.brand-logo-preview img {
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-section {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-section__title {
  margin: 0;
}

.form-hint {
  display: block;
  font-size: 0.85rem;
  color: #6c6c6c;
  margin-top: 4px;
}

.quick-fill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-fill-dropdown {
  border: 1px dashed #dedede;
  border-radius: 10px;
  background: #fafafa;
  margin-top: 8px;
  padding: 8px 10px;
}

.quick-fill-dropdown summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #444;
  list-style: none;
}

.quick-fill-dropdown summary::-webkit-details-marker {
  display: none;
}

.quick-fill-dropdown[open] {
  border-color: var(--brand);
  background: rgba(230, 86, 30, 0.05);
}

.quick-fill-dropdown[open] summary {
  margin-bottom: 6px;
}

.quick-fill {
  border: 1px dashed #d7d7d7;
  background: transparent;
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.quick-fill:hover,
.quick-fill:focus {
  border-color: var(--brand);
  color: var(--brand-dark);
}

label {
  font-size: 0.9rem;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
}

.door-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.door-card {
  border: 1px dashed #ddd;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
}

.door-card + .door-card {
  margin-top: 12px;
}

.door-card__section {
  margin-top: 16px;
  border-top: 1px solid #dfe5f4;
  padding-top: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
}

.door-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.door-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  margin: 0;
  color: #6c6c6c;
}

.door-card__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.door-components__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.door-components summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.component-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.door-stepper__progress,
.door-stepper__controls {
  display: none;
}

.door-stepper--active .door-stepper__controls {
  margin-top: auto;
}

.add-door-app--fullscreen .door-stepper__controls {
  position: sticky;
  bottom: calc(0px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.12);
  z-index: 5;
}

.component-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.component-row + .component-row {
  margin-top: 10px;
}

.component-row__label strong {
  display: block;
  margin-bottom: 4px;
}

.component-row__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.door-spec-grid {
  gap: 16px;
}

.door-spec-grid--update {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 12px;
}

.door-type-fieldset {
  border: 1px solid rgba(0, 82, 204, 0.15);
  border-radius: 16px;
  padding: 12px 16px 16px;
}

.door-type-fieldset legend {
  font-weight: 600;
  padding: 0 6px;
}

.door-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.door-type-option {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.door-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.door-type-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 120px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-weight: 600;
  color: #1f2937;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.door-type-option input:checked + span {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(0, 82, 204, 0.25);
}

.door-type-option input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.door-type-option--inline span {
  border-radius: 10px;
}

.door-type-options--update {
  grid-column: span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.door-type-options--update > span {
  font-weight: 600;
  margin-right: 8px;
}

.door-step--intro {
  display: none;
}

.door-stepper--active .door-step--intro {
  display: block;
}

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

.component-info-trigger {
  display: none;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 82, 204, 0.12);
  color: var(--brand);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.component-info-trigger svg {
  width: 18px;
  height: 18px;
  display: block;
  color: currentColor;
}

.component-info-trigger:focus-visible,
.component-info-trigger:hover {
  background: rgba(0, 82, 204, 0.2);
}

.door-stepper--active .component-info-trigger {
  display: inline-flex;
}

.door-stepper__progress-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.door-stepper__collapse {
  font-size: 0.85rem;
  color: var(--brand);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.door-stepper__resume {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed rgba(0, 82, 204, 0.35);
  border-radius: 12px;
  background: rgba(0, 82, 204, 0.06);
}

.door-stepper--collapsed .door-stepper__resume {
  display: block;
}

.add-door-app {
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 60%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: none;
  overflow: hidden;
}

.add-door-app--fullscreen {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.add-door-app__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 82, 204, 0.12);
  margin-bottom: 24px;
}

.add-door-app__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.add-door-app__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 82, 204, 0.14);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.app-chip--quiet {
  background: rgba(15, 23, 42, 0.06);
  color: #4c5b7a;
}

.add-door-app__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-field-grid {
  gap: 16px;
}

.app-field-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 82, 204, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #fff);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.app-field-card--stacked textarea {
  min-height: 90px;
}

.app-field-card input[type="text"],
.app-field-card input[type="file"],
.app-field-card textarea,
.app-field-card select {
  margin-top: 6px;
}

.door-card__section--app {
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 82, 204, 0.05), rgba(255, 255, 255, 0.95));
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.component-grid--cards {
  gap: 18px;
}

.component-row--app {
  border: none;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.component-row__label--app {
  display: flex;
  align-items: center;
  gap: 12px;
}

.component-row__helper {
  display: block;
  color: #6c7ba5;
  font-size: 0.8rem;
  margin-top: 2px;
}

.component-row__fields--app {
  margin-top: 12px;
}

.component-row__fields--app label {
  background: #f7f9ff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #1f2a44;
}

.component-row__fields--app label select,
.component-row__fields--app label input[type="text"],
.component-row__fields--app label input[type="file"] {
  margin-top: 6px;
  font-weight: 500;
}

.component-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(0, 82, 204, 0.12);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.component-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  color: inherit;
}

.component-icon--door {
  background: rgba(0, 82, 204, 0.15);
  color: #0052cc;
}

.component-icon--frame {
  background: rgba(13, 101, 214, 0.12);
  color: #0d65d6;
}

.component-icon--hinge {
  background: rgba(10, 135, 84, 0.15);
  color: #0a8754;
}

.component-icon--closer {
  background: rgba(241, 153, 36, 0.15);
  color: #d97706;
}

.component-icon--lock {
  background: rgba(126, 87, 194, 0.15);
  color: #6d28d9;
}

.component-icon--vision {
  background: rgba(56, 189, 248, 0.18);
  color: #0284c7;
}

.component-icon--seal {
  background: rgba(45, 212, 191, 0.18);
  color: #0f766e;
}

.component-icon--threshold {
  background: rgba(248, 250, 252, 1);
  color: #6366f1;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.component-icon--gap {
  background: rgba(59, 130, 246, 0.18);
  color: #2563eb;
}

.component-icon--signage {
  background: rgba(248, 113, 113, 0.15);
  color: #dc2626;
}

.component-icon--hardware {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.component-icon--hold {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}

.component-icon--label {
  background: rgba(244, 114, 182, 0.2);
  color: #be185d;
}

.component-icon--general {
  background: rgba(203, 213, 225, 0.35);
  color: #475569;
}

.component-issue-hints--app {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 82, 204, 0.25);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.85);
}

.component-issue-hints--app summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.component-guide-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}

.component-guide-modal[hidden] {
  display: none;
}

.component-guide-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.component-guide-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.25);
}

.component-guide-modal__close {
  position: absolute;
  top: 10px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  color: #475569;
  cursor: pointer;
}

.component-guide-modal__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}

.component-guide-modal__dialog h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.component-guide-modal__dialog ol {
  padding-left: 1.4rem;
  margin: 0 0 12px 0;
}

.component-guide-modal__dialog ul {
  padding-left: 1.2rem;
  margin: 0;
}

/* Generic modal & drawer surfaces */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1500;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1510;
}

.modal[hidden] {
  display: none;
}

.modal__dialog {
  width: min(560px, 100%);
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.38);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.modal__header,
.modal__footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.modal__footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  justify-content: flex-end;
}

.modal__title {
  margin: 0;
  font-size: 1.05rem;
}

.modal__body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal__close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #6b7280;
}

body.modal-open .modal__dialog,
.modal:not([hidden]) .modal__dialog {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.drawer:not([hidden]) .drawer__panel {
  transform: translateX(0);
  opacity: 1;
}

.drawer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  z-index: 1520;
}

.drawer[hidden] {
  display: none;
}

.drawer__panel {
  width: min(420px, 100%);
  max-width: 100%;
  height: 100%;
  background: #ffffff;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateX(12px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.drawer__header,
.drawer__footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer__header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.drawer__footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  justify-content: flex-end;
}

.drawer__body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 600;
}

.flash-success {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.flash-error {
  background: rgba(192, 57, 43, 0.15);
  color: var(--danger);
}

.flash-info {
  background: rgba(37, 99, 235, 0.06);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.quote-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 6px 0;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(420px, calc(100vw - 44px));
}

.toast-stack .flash {
  margin: 0;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
  transition: opacity 240ms ease, transform 240ms ease;
  font-weight: 500;
  line-height: 1.4;
}

.toast-stack .flash-info {
  background: #e0efff;
  color: #0f172a;
  border: 1px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.toast-stack .flash-success {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.toast-stack .flash-error {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.toast-stack__item--fade {
  opacity: 0;
  transform: translateY(6px);
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal__dialog {
  overflow-x: hidden;
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal__dialog :where(table, input, select, textarea, button, fieldset, legend) {
  max-width: 100%;
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal__dialog :where(td, th) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

:where(
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .card > form {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal-inline-form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal-inline-form :where(input, select, textarea) {
  min-width: 0;
  width: 100%;
}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) [data-modal-alert] .flash {
  margin-bottom: 0;
}

.settings-onboarding-banner,
.billing-onboarding-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.settings-onboarding-banner .eyebrow,
.billing-onboarding-banner .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.settings-onboarding-banner a,
.billing-onboarding-banner a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.trial-banner {
  padding: 12px 16px;
  background: rgba(230, 86, 30, 0.1);
  border: 1px solid rgba(230, 86, 30, 0.3);
  border-radius: 10px;
  margin-bottom: 20px;
}

.timeline {
  position: relative;
  padding-left: 68px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 82, 204, 0.15), rgba(0, 82, 204, 0.05));
}

.timeline-empty {
  padding: 8px 0 0 0;
}

.invoice-modal__dialog {
  width: min(980px, 100%);
  max-height: 90vh;
}

.invoice-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.invoice-modal__primary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.invoice-modal__primary .invoice-card {
  max-width: 520px;
  width: 100%;
}

.invoice-modal__secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.invoice-modal__secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.invoice-card {
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 18px 18px 16px;
  background: #f8fafc;
}

.invoice-card legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.invoice-modal__actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.timeline-date {
  padding-left: 12px;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8090;
}

.timeline-item {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  padding: 18px 20px 18px 28px;
  margin-left: 0;
}

.timeline-item__icon {
  position: absolute;
  left: -11px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(0, 82, 204, 0.15);
  color: #0052cc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

.timeline-item__icon svg {
  width: 20px;
  height: 20px;
}

.timeline-item__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-item__time {
  font-weight: 600;
  color: #1c2434;
}

.timeline-item__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.timeline-item__pill--start {
  background: rgba(0, 82, 204, 0.14);
  color: #0052cc;
}

.timeline-item__pill--add {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.timeline-item__pill--edit {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}

.timeline-item__pill--status {
  background: rgba(147, 51, 234, 0.16);
  color: #7e22ce;
}

.timeline-item__pill--update {
  background: rgba(100, 116, 139, 0.2);
  color: #475569;
}

.timeline-item__title {
  font-weight: 600;
  margin: 0;
  color: #1f2937;
}

.timeline-item__door {
  margin: 0;
  font-size: 0.9rem;
}

.timeline-item__summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-chip {
  background: rgba(226, 232, 240, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}

.timeline-chip strong {
  margin-left: 4px;
  color: #111c2b;
}
.timeline-chip--ghost {
  background: rgba(15, 23, 42, 0.08);
  color: #1f2937;
  border: 1px dashed rgba(15, 23, 42, 0.2);
}

.timeline-item__delta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.timeline-item__failures {
  font-size: 0.82rem;
}

.timeline-item--start .timeline-item__icon {
  background: rgba(0, 82, 204, 0.15);
  color: #0052cc;
}

.timeline-item--add .timeline-item__icon {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.timeline-item--edit .timeline-item__icon {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}

.timeline-item--status .timeline-item__icon {
  background: rgba(147, 51, 234, 0.18);
  color: #7e22ce;
}

.timeline-item--update .timeline-item__icon {
  background: rgba(100, 116, 139, 0.2);
  color: #475569;
}

.timeline-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.timeline-controls form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.timeline-controls select {
  min-width: 160px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid.three-col {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.small-text {
  font-size: 0.8rem;
}


.quote-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}


.quote-page__intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: flex-start;
}

.quote-page__intro h2 {
  margin-bottom: 6px;
}

.quote-page__stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 140px;
  background: var(--surface-muted, #f7f9ff);
}

.quote-stat span {
  display: block;
  font-size: 0.8rem;
  color: #6a6f7c;
}

.quote-stat strong {
  font-size: 1.2rem;
}

.quote-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.quote-layout__primary {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.quote-layout__secondary {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.quote-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.quote-summary {
  margin-top: 24px;
  border: 1px solid #e6e8ed;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

.quote-summary__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.quote-summary__header h4 {
  margin: 0 0 4px 0;
}

.quote-summary__total span {
  display: block;
  font-size: 0.85rem;
  color: #6c6c6c;
}

.quote-summary__total strong {
  font-size: 1.8rem;
  color: var(--brand);
}

.quote-line-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.quote-line-items th {
  text-align: left;
  font-size: 0.85rem;
  color: #6c6c6c;
  padding-bottom: 6px;
}

.quote-line-items td {
  padding: 8px 6px;
  border-top: 1px solid #eef1f7;
}

.quote-summary__totals {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  border-top: 1px dashed #e6e8ed;
  padding-top: 16px;
}

.quote-summary__totals-amounts p {
  margin: 4px 0;
}

.quote-history-table {
  width: 100%;
  border-collapse: collapse;
}

.quote-history-table th {
  text-align: left;
  font-size: 0.85rem;
  color: #6c6c6c;
  padding-bottom: 8px;
}

.quote-history-table td {
  padding: 12px 8px;
  border-top: 1px solid #eef1f7;
  vertical-align: top;
}

.quote-history-table__actions {
  text-align: right;
}

.quote-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quote-status--accepted {
  background: rgba(10, 135, 84, 0.12);
  color: var(--success);
  box-shadow: 0 0 0 1px rgba(10, 135, 84, 0.35);
}

.quote-status--completed {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.quote-status--pending {
  background: rgba(230, 86, 30, 0.15);
  color: var(--brand);
}

.quote-status--failed {
  background: rgba(192, 57, 43, 0.15);
  color: var(--danger);
}

.quote-status__meta {
  font-weight: 500;
}

.quote-history-table tbody tr[data-invoice-source-type] {
  cursor: pointer;
}

.quote-history-table tbody tr[data-invoice-source-type]:hover {
  background-color: #f8fafc;
}

.table-delete-btn {
  border: none;
  background: transparent;
  color: #cbd5f5;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 4px 0 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.table-delete-btn:hover {
  color: #e11d48;
}

.table-delete-btn:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}

.client-portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.client-portal-tab {
  padding: 6px 12px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.client-portal-tab--active {
  color: #0f172a;
  border-bottom-color: #0f172a;
  font-weight: 600;
}

.form-errors {
  border: 1px solid rgba(192, 57, 43, 0.3);
  background: rgba(192, 57, 43, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 16px;
}

.auth-wrapper {
  max-width: 420px;
  margin: 80px auto;
  padding: 24px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 12px 44px rgba(17, 17, 17, 0.15);
}

.twofactor-qr {
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.02);
}

.btn-link {
  border: none;
  background: none;
  color: var(--brand);
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}

.btn-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
}

.inspection-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.door-overview-toolbar {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  margin: 16px 0;
}

.door-overview-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.door-overview-toolbar__meta {
  margin: 10px 0 0 0;
}

.door-overview-table--compact th,
.door-overview-table--compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.door-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 20px;
}

.door-detail-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #fff);
}

.door-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.door-detail-card table {
  margin-top: 12px;
}

.door-detail-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.door-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.door-detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.door-spec-chip {
  background: rgba(0, 82, 204, 0.08);
  color: #0f1f3d;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 82, 204, 0.2);
}

.door-notes {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.door-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.property-photo-thumb img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  max-height: 180px;
}

.door-summary {
    margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(230, 86, 30, 0.35);
  background: rgba(230, 86, 30, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.door-summary > div {
  min-width: 120px;
}

.door-summary p {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c6c6c;
}

.door-summary strong {
  font-size: 1.15rem;
  display: block;
  color: var(--brand);
}

.door-summary-detail {
  margin: 0;
  font-size: 0.9rem;
  color: #444;
}

.component-issue-hints {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.component-issue-hints summary {
  font-weight: 600;
  cursor: pointer;
  color: #444;
}

.component-issue-hints[open] summary {
  margin-bottom: 4px;
}

.component-issue-hints ul {
  margin: 0;
  padding-left: 20px;
  color: #555;
}

.component-issue-hints li {
  margin-bottom: 2px;
}

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

.component-table th,
.component-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.component-row--legacy td {
  background: rgba(230, 86, 30, 0.04);
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.severity-low {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.severity-medium {
  background: rgba(255, 193, 7, 0.2);
  color: #9c6b00;
}

.severity-high {
  background: rgba(192, 57, 43, 0.15);
  color: var(--danger);
}

.door-edit {
  margin-top: 16px;
}

.door-edit summary {
  font-weight: 600;
  cursor: pointer;
}

.door-update-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.door-setup {
  padding: 16px;
  border-radius: 12px;
  background: rgba(230, 86, 30, 0.05);
  border: 1px dashed rgba(230, 86, 30, 0.3);
}

.door-setup__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.door-flow {
  margin: 0;
  padding-left: 20px;
  color: #555;
}

.door-flow li + li {
  margin-top: 4px;
}

.door-form-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.draft-status {
  font-size: 0.9rem;
  margin: 0;
}

.text-danger {
  color: var(--danger);
}

.text-muted {
  color: var(--text-muted, #6a6f76);
  font-size: 0.9rem;
}

.text-page-title {
  font-size: var(--font-size-page-title, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

.text-section-title {
  font-size: var(--font-size-section-title, 1.125rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.text-label {
  font-size: var(--font-size-label, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #4b5563;
}

.text-body {
  font-size: var(--font-size-base, 0.9375rem);
  font-weight: 400;
  color: var(--text, #1d1d1f);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dashboard-hero .text-muted {
  color: var(--hero-text-muted, rgba(248, 250, 252, 0.85));
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 1.75rem;
}

.dashboard-hero__intro {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.dashboard-hero__actions .btn {
  justify-content: flex-start;
}

.dashboard-launch {
  margin: 16px 0 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-launch .btn {
  flex: 1 1 220px;
  justify-content: flex-start;
}

.dashboard-activity {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.dashboard-activity__column {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-activity__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-activity__list li {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-activity__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dashboard-activity__actions form {
  margin: 0;
  padding: 0;
}

.section-heading__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading__title h3 {
  margin: 0;
}

.section-heading__title p {
  margin: 4px 0 0;
}

.dashboard-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.06);
  color: var(--brand);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.dashboard-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.dashboard-icon--brand {
  background: rgba(0, 82, 204, 0.12);
  color: var(--brand);
}

.dashboard-icon--slate {
  background: rgba(71, 85, 105, 0.15);
  color: #334155;
}

.dashboard-icon--teal {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}

.dashboard-icon--amber {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

.dashboard-stat-card {
  min-height: 140px;
}

.dashboard-stat {
  display: flex;
  gap: 16px;
  align-items: center;
}

.dashboard-stat__label {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.dashboard-stat__value {
  margin-top: 6px;
}

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

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

.table--inspections th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #7a8090;
  border-bottom: 1px solid rgba(223, 229, 244, 0.8);
  padding: 12px 16px;
}

.table--inspections td {
  padding: 16px;
  border-bottom: 1px solid rgba(223, 229, 244, 0.6);
}

.table--inspections tr:last-child td {
  border-bottom: none;
}

.table-subtext {
  display: block;
  color: #7a8090;
  font-size: 0.85rem;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  align-items: center;
  gap: 6px;
}

.badge--success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.badge--date {
  background: rgba(0, 82, 204, 0.1);
  color: var(--brand);
}

.badge--client {
  background: rgba(122, 128, 144, 0.15);
  color: #565b66;
}

.btn--compact {
  padding: 8px 14px;
}

.dashboard-table {
  margin-top: 24px;
}

.table-actions {
  display: flex;
  gap: 12px;
}

.table-actions__more {
  position: relative;
}

.table-actions__more > summary {
  list-style: none;
}

.table-actions__more > summary::-webkit-details-marker {
  display: none;
}

.table-actions__more-toggle {
  width: 38px;
  padding-left: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.table-actions__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(223, 229, 244, 0.9);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  padding: 6px;
  z-index: 30;
}

.table-actions__menu-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.table-actions__menu-item:hover,
.table-actions__menu-item:focus-visible {
  background: rgba(17, 24, 39, 0.06);
  outline: none;
}

.table-actions__menu-item:active {
  background: rgba(17, 24, 39, 0.1);
}

.clients-page .card {
  margin-bottom: 24px;
}

.clients-form-card h3 {
  margin-top: 0;
}

.clients-form-card__actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
}

.clients-list-card {
  background: var(--card);
}

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

.table--clients th,
.table--clients td {
  padding: 14px;
  border-bottom: 1px solid rgba(223, 229, 244, 0.7);
  text-align: left;
}

.table--clients tr:last-child td {
  border-bottom: none;
}

.client-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-chip img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(223, 229, 244, 0.8);
}

.client-chip__fallback {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 82, 204, 0.1);
  color: var(--brand);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-page .card {
  margin-bottom: 24px;
}

.team-form-card h3 {
  margin-top: 0;
}

.team-form-card__actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
}

.team-list-card {
  background: var(--card);
}

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

.table--team th,
.table--team td {
  padding: 14px;
  border-bottom: 1px solid rgba(223, 229, 244, 0.7);
  text-align: left;
}

.table--team tr:last-child td {
  border-bottom: none;
}

.team-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-chip__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(230, 86, 30, 0.12);
  color: var(--brand-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge--role {
  background: rgba(0, 82, 204, 0.08);
  color: var(--brand);
  text-transform: capitalize;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-warning {
  background: var(--brand);
}

.toast-success {
  background: var(--success);
}

.schedule-range-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.schedule-range-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: #6a6f7c;
  min-width: 160px;
}

.schedule-filters {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.schedule-filter-types {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.schedule-filter-types label {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.schedule-filter-types input[type='checkbox'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.schedule-filter-types label span {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.schedule-filter-types label:hover span {
  background: #eef2ff;
  border-color: #cbd5f5;
}

.schedule-filter-types input[type='checkbox']:checked + span {
  background: #e0edff;
  color: #1f2933;
  border-color: #2563eb;
  box-shadow: none;
}

.schedule-filter-types input[type='checkbox']:focus-visible + span {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.schedule-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.schedule-legend__dot--inspection {
  background: #0052cc;
}

.schedule-legend__dot--prebooking {
  background: #e6561e;
}

.schedule-legend__dot--firedoor {
  background: #6366f1;
}
.schedule-legend__dot--remedial {
  background: #0ea5e9;
}

.prebooking-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.prebooking-status-pill--pending {
  background: rgba(255, 193, 7, 0.15);
  color: #b06c00;
}

.prebooking-status-pill--approved {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.prebooking-status-pill--converted {
  background: rgba(0, 82, 204, 0.15);
  color: #0052cc;
}

.prebooking-status-pill--rejected {
  background: rgba(192, 57, 43, 0.15);
  color: #c0392b;
}

/* Schedule workspace (migrated from app/Views/pre_bookings/index.php) */
.schedule-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.schedule-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    var(--hero-bg-start, #0f172a),
    var(--hero-bg-end, #2563eb)
  );
  color: var(--hero-text, #ffffff);
}

.schedule-hero .text-muted {
  color: var(--hero-text-muted, rgba(248, 250, 252, 0.85));
}

.schedule-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--hero-eyebrow, #93c5fd);
  margin: 0 0 6px 0;
}

.schedule-hero h2 {
  margin: 0 0 8px 0;
  font-size: 2rem;
}

.schedule-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.schedule-hero__actions .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  background: var(--hero-cta-ghost-bg, rgba(15, 23, 42, 0.1));
  border: 1px solid var(--hero-cta-ghost-border, rgba(248, 250, 252, 0.3));
  color: var(--hero-cta-ghost-text, #f8fafc);
}

.schedule-workspace .btn__icon {
  display: inline-flex;
  align-items: center;
}

.schedule-workspace .btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.schedule-hero__actions .btn.btn-secondary {
  background: var(--hero-cta-secondary-bg, #e2e8f0);
  color: var(--hero-cta-secondary-text, #0f172a);
}

.schedule-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.schedule-hero__stats div {
  background: var(--hero-stat-surface, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.schedule-hero__stats dt {
  margin: 0 0 4px 0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0f172a;
}

.schedule-hero__stats dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.schedule-today-strip {
  margin: 12px 0 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.schedule-today-strip__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.schedule-today-strip__summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.today-visit-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.today-visit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.85rem;
}

.today-visit-item:hover {
  background: #eef2ff;
}

.today-visit-item__time {
  font-weight: 600;
  color: #111827;
  min-width: 70px;
}

.today-visit-item__label {
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-flash {
  margin-top: -8px;
}

.schedule-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 24px;
}

@media (max-width: 1050px) {
  .schedule-hero {
    flex-direction: column;
    text-align: left;
  }
  .schedule-shell {
    grid-template-columns: 1fr;
  }
}

.schedule-card,
.schedule-panel,
.schedule-card--bookings {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  margin-top: 16px;
}

.schedule-animate {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 320ms ease-out,
    transform 320ms ease-out,
    box-shadow 180ms ease-out,
    border-color 180ms ease-out;
}

.schedule-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.schedule-card__header,
.schedule-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}

.schedule-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-section-title__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.schedule-section-title__icon svg {
  width: 26px;
  height: 26px;
}

.schedule-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.schedule-stat {
  flex: 1 1 160px;
  min-width: 150px;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.schedule-stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #64748b;
}

.schedule-stat__label-text {
  white-space: nowrap;
}

.schedule-stat__icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
  line-height: 0;
}

.schedule-stat__icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.schedule-stat strong {
  font-size: 1.2rem;
  color: #0f172a;
}

.schedule-stat--inspection .schedule-stat__icon {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}

.schedule-stat--firedoor .schedule-stat__icon {
  background: rgba(249, 115, 22, 0.16);
  color: #ea580c;
}

.schedule-stat--remedial .schedule-stat__icon {
  background: rgba(248, 113, 113, 0.16);
  color: #b91c1c;
}

.schedule-stat--prebooking .schedule-stat__icon {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.schedule-stat:hover {
  background: #f1f5f9;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.schedule-controls {
  margin-bottom: 12px;
}

.schedule-range-form {
  width: 100%;
}

.schedule-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.schedule-filter-row label,
.schedule-filter-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #475569;
}

.schedule-filter-row input[type='date'],
.schedule-filter-row input[type='search'],
.schedule-filter-search input {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.schedule-filter-types {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  background: #fff;
}

.schedule-filter-types label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #0f172a;
  margin: 0;
}

.schedule-filter-apply {
  align-self: flex-end;
  white-space: nowrap;
}

.fire-door-only[hidden] {
  display: none !important;
}

.schedule-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.schedule-view-tabs {
  margin-top: 8px;
  margin-bottom: 6px;
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.schedule-view-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.85rem;
  color: #4b5563;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.schedule-view-tab.is-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.schedule-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-card--firedoor {
  margin-top: 16px;
  padding: 20px 22px;
}

.schedule-empty-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
}

.schedule-empty-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: #4f46e5;
  flex-shrink: 0;
}

.schedule-empty-card__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.schedule-empty-card h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.schedule-empty-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.schedule-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 16px;
  background: #f8fafc;
}

.schedule-status-count {
  font-weight: 600;
  font-size: 1.1rem;
  color: #0f172a;
}

.schedule-panel-table table {
  width: 100%;
}

.schedule-panel-table--scrollable {
  max-height: var(--events-feed-scroll-height, 420px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.35) transparent;
}

.schedule-panel-table--scrollable::-webkit-scrollbar {
  width: 6px;
}

.schedule-panel-table--scrollable::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

.schedule-panel-table--scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.events-feed-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.events-feed-table thead th {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #94a3b8;
  padding: 0 0 6px 0;
  border: none;
}

.events-feed-table tbody td {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 16px;
  vertical-align: top;
}

.events-feed-table tbody td:first-child {
  border-radius: 16px 0 0 16px;
}

.events-feed-table tbody td:last-child {
  border-radius: 0 16px 16px 0;
}

.events-feed-table tbody tr:hover td {
  border-color: #cbd5f5;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  background: #fdfefe;
}

@media (hover: hover) and (pointer: fine) {
  .schedule-card:hover,
  .schedule-card:focus-within,
  .schedule-panel:hover,
  .schedule-panel:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-color: rgba(148, 163, 184, 0.8);
  }
}

.events-feed-event {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.events-feed-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-weight: 600;
}

.events-feed-type--inspection {
  background: rgba(15, 118, 110, 0.18);
  color: #0f766e;
}

.events-feed-type--prebooking {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

.events-feed-type--firedoor {
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

.events-feed-subtext {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.events-feed-client {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.events-feed-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 600;
}

.events-feed-time {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.events-feed-time > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.events-feed-time span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.events-feed-time strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.booking-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.25) transparent;
}

.booking-card-list::-webkit-scrollbar {
  width: 6px;
}

.booking-card-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 999px;
}

.booking-card-list::-webkit-scrollbar-track {
  background: transparent;
}

.booking-card {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  background: #f8fafc;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.booking-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.booking-card__pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.booking-card__title {
  font-size: 1.05rem;
  display: block;
  margin-bottom: 4px;
}

.booking-card__subtext {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.35;
}

.booking-card__subtext--highlight {
  color: #4338ca;
  font-weight: 600;
}

.booking-card__body {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.booking-card__eyebrow {
  margin: 0 0 6px 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.booking-card__actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.booking-card__form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  flex: 1;
  min-width: 260px;
}

.booking-card__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #475569;
  min-width: 160px;
}

.booking-card__field select {
  border: 1px solid #d0d7e5;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.booking-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.booking-type-pill--prebooking {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.booking-type-pill--firedoor {
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

.booking-card__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-card__cta form,
.booking-card__cta a {
  display: inline-flex;
  align-items: center;
}

.booking-card__meta-group div {
  line-height: 1.4;
}

.booking-card__header .prebooking-status-pill {
  white-space: nowrap;
}

.booking-card:hover {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .schedule-range-form,
  .schedule-filters,
  .schedule-card__stats {
    flex-direction: column;
    align-items: flex-start;
  }
  .schedule-status-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .events-feed-event {
    flex-direction: column;
  }
  .events-feed-time {
    flex-direction: column;
  }
  .events-feed-table {
    border-spacing: 0 10px;
  }
  .booking-card__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .booking-card__form {
    width: 100%;
  }
  .booking-card__cta {
    width: 100%;
  }
  .booking-card__cta .btn,
  .booking-card__cta form,
  .booking-card__cta a {
    width: 100%;
  }
}

.firedoor-card {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  background: #f8fafc;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.firedoor-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.firedoor-card__status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.firedoor-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #0f172a;
}

.firedoor-pill--unscheduled {
  background: rgba(148, 163, 184, 0.25);
}

.firedoor-pill--scheduled {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

.firedoor-pill--installing {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.firedoor-pill--completed {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.firedoor-pill--reminder {
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

.firedoor-card:hover {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.firedoor-pill--reminder.firedoor-pill--success {
  background: rgba(5, 150, 105, 0.18);
  color: #047857;
}

.firedoor-card__subtext {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.35;
}

.firedoor-card__body {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: flex-start;
}

.firedoor-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #475569;
}

.firedoor-card__meta p {
  margin: 0;
}

.firedoor-card__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-type-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d7e5;
  border-radius: 999px;
  margin-bottom: 16px;
  background: #f8fafc;
  overflow: hidden;
  min-height: 36px;
  padding: 2px;
}

.booking-type-toggle__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  color: #475569;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.booking-type-toggle__option.is-active {
  background: #fff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.booking-pane[hidden] {
  display: none !important;
}

.fire-door-summary {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  color: #475569;
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.4;
}

.schedule-calendar {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  min-height: 160px;
}

.schedule-calendar--loading {
  opacity: 0.6;
}

.schedule-calendar__column {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.schedule-calendar__heading {
  font-weight: 600;
  font-size: 0.95rem;
}

.schedule-calendar__empty {
  color: #8a92a6;
  font-size: 0.9rem;
  margin: 0;
}

.schedule-calendar__column--dragover {
  border-color: rgba(0, 82, 204, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 82, 204, 0.25);
  background-color: rgba(0, 82, 204, 0.02);
}

.schedule-event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-event {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px 18px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  cursor: grab;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.schedule-event:hover {
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.schedule-event-list--scrollable {
  max-height: var(--schedule-event-scroll-height, 13rem);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.35) transparent;
}

.schedule-event-list--scrollable::-webkit-scrollbar {
  width: 6px;
}

.schedule-event-list--scrollable::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

.schedule-event-list--scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.schedule-event__title {
  font-size: 0.95rem;
}

.schedule-event__time {
  font-weight: 600;
}

.schedule-event__client,
.schedule-event__meta {
  font-size: 0.8rem;
  color: #6a6f7c;
}

.schedule-event__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  margin-top: 4px;
}

.schedule-event__actions {
  position: absolute;
  top: 6px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-event__delete-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.schedule-event__delete-btn:hover {
  color: #e11d48;
}

.schedule-event__delete-btn:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}

.schedule-event--actionable {
  cursor: pointer;
}

.schedule-event--dragging {
  opacity: 0.75;
  cursor: grabbing;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.schedule-event--conflict {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.7);
  border-style: solid;
}

.schedule-event--highlight {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.85);
}

.inspector-load-table th,
.inspector-load-table td {
  font-size: 0.8rem;
}

.inspector-load-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.inspector-load-status--free {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.inspector-load-status--ok {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.inspector-load-status--busy {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.inspector-load-status--over {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.schedule-event--actionable:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 3px;
}

.prebooking-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prebooking-modal__section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-muted, #f7f9ff);
}

.prebooking-modal__section h4 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: #3f4657;
}

.prebooking-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.prebooking-modal__grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prebooking-modal__grid textarea {
  min-height: 70px;
}

.prebooking-modal__grid--dates label,
.prebooking-modal__grid--contact label {
  min-width: 0;
}

.prebooking-modal__notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-status-modal__summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted, #f7f9ff);
}

.schedule-status-modal__summary strong {
  font-size: 1rem;
}

.schedule-status-modal__badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.8rem;
  color: #6a6f7c;
}

.schedule-status-modal__badge strong {
  font-size: 0.95rem;
  color: #0052cc;
  background: rgba(0, 82, 204, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

.schedule-status-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-status-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.schedule-status-modal__field select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 500;
}

.schedule-status-modal__hint {
  margin: 0;
}

.schedule-event--inspection {
  border-color: rgba(0, 82, 204, 0.6);
  background: rgba(0, 82, 204, 0.08);
}

.schedule-event--pre-booking {
  border-color: rgba(230, 86, 30, 0.5);
  background: rgba(230, 86, 30, 0.08);
}

.schedule-event--fire-door {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.12);
}

.schedule-event--remedial {
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.12);
}

.schedule-event--status-scheduled,
.schedule-event--status-pending {
  border-color: rgba(37, 99, 235, 0.65);
  background: rgba(59, 130, 246, 0.12);
}

.schedule-event--status-in_progress {
  border-color: rgba(234, 179, 8, 0.8);
  background: rgba(250, 204, 21, 0.18);
}

.schedule-event--status-completed,
.schedule-event--status-verified {
  border-color: rgba(22, 163, 74, 0.8);
  background: rgba(34, 197, 94, 0.18);
}

.schedule-event--status-cancelled,
.schedule-event--status-rejected {
  border-color: rgba(239, 68, 68, 0.85);
  background: rgba(248, 113, 113, 0.22);
}

/* Utility spacing helpers (migrated from inline styles) */
.u-mt-0 {
  margin-top: 0;
}

.u-mt-neg-6 {
  margin-top: -6px;
}

.u-mt-2 {
  margin-top: 2px;
}

.u-mt-4 {
  margin-top: 4px;
}

.u-mt-6 {
  margin-top: 6px;
}

.u-mt-8 {
  margin-top: 8px;
}

.u-mt-10 {
  margin-top: 10px;
}

.u-mt-12 {
  margin-top: 12px;
}

.u-mt-14 {
  margin-top: 14px;
}

.u-mt-16 {
  margin-top: 16px;
}

.u-mt-20 {
  margin-top: 20px;
}

.u-mt-24 {
  margin-top: 24px;
}

.u-mb-0 {
  margin-bottom: 0;
}

.u-mb-4 {
  margin-bottom: 4px;
}

.u-mb-6 {
  margin-bottom: 6px;
}

.u-mb-8 {
  margin-bottom: 8px;
}

.u-mb-10 {
  margin-bottom: 10px;
}

.u-mb-12 {
  margin-bottom: 12px;
}

.u-mb-16 {
  margin-bottom: 16px;
}

.u-flex {
  display: flex;
}

.u-flex-col {
  flex-direction: column;
}

.u-flex-1 {
  flex: 1;
}

.u-inline-flex {
  display: inline-flex;
}

.u-flex-wrap {
  flex-wrap: wrap;
}

.u-align-center {
  align-items: center;
}

.u-align-end {
  align-items: flex-end;
}

.u-justify-center {
  justify-content: center;
}

.u-justify-between {
  justify-content: space-between;
}

.u-gap-4 {
  gap: 4px;
}

.u-gap-6 {
  gap: 6px;
}

.u-gap-8 {
  gap: 8px;
}

.u-gap-10 {
  gap: 10px;
}

.u-gap-12 {
  gap: 12px;
}

.u-gap-16 {
  gap: 16px;
}

.u-block {
  display: block;
}

.u-minw-220 {
  min-width: 220px;
}

.u-minw-180 {
  min-width: 180px;
}

.u-maxw-180 {
  max-width: 180px;
}

.u-inline-form {
  display: inline;
  margin: 0;
}

.u-pl-16 {
  padding-left: 16px;
}

.u-p-12 {
  padding: 12px;
}

.u-pt-12 {
  padding-top: 12px;
}

.u-pt-16 {
  padding-top: 16px;
}

.u-m-0 {
  margin: 0;
}

.u-icon-32 {
  width: 32px;
  height: 32px;
}

.u-icon-inline {
  margin-right: 4px;
  vertical-align: text-bottom;
}

.u-rounded-full {
  border-radius: 999px;
}

.u-rounded-12 {
  border-radius: 12px;
}

.u-border {
  border: 1px solid #e2e8f0;
}

.u-border-top {
  border-top: 1px solid #e2e8f0;
}

.u-border-danger {
  border: 1px solid #fee2e2;
}

.u-bg-muted {
  background: rgba(15, 23, 42, 0.06);
}

.u-bg-faint {
  background: rgba(15, 23, 42, 0.02);
}

.u-bg-surface {
  background: #ffffff;
}

.u-bg-danger-soft {
  background: #fef2f2;
}

.u-text-center {
  text-align: center;
}

.u-fs-90 {
  font-size: 0.9rem;
}

.u-ml-auto {
  margin-left: auto;
}

.u-ml-4 {
  margin-left: 4px;
}

.u-ml-8 {
  margin-left: 8px;
}

.u-list-reset {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.text-brand {
  color: var(--brand, #e6561e);
}

.text-success {
  color: var(--success, #0a8754);
}

.text-indigo {
  color: #6366f1;
}

.text-sky {
  color: #0ea5e9;
}

.text-green {
  color: #22c55e;
}

.text-amber {
  color: #f59e0b;
}

.icon-surface-indigo {
  background: #eef2ff;
  color: #4338ca;
}

/* Inspections index page (app/Views/inspections/index.php) */
.inspections-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.insp-hero {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    var(--hero-bg-start, #0f172a),
    var(--hero-bg-end, #2563eb)
  );
  background: linear-gradient(
    135deg,
    color-mix(
      in srgb,
      var(--hero-bg-start, #0f172a) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    ),
    color-mix(
      in srgb,
      var(--hero-bg-end, #2563eb) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    )
  );
  color: var(--hero-text, #ffffff);
}

.insp-hero .text-muted {
  color: var(--hero-text-muted, rgba(248, 250, 252, 0.85));
}

.insp-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--hero-eyebrow, #93c5fd);
  margin: 0 0 6px 0;
}

.insp-hero h2 {
  margin: 0 0 10px 0;
  font-size: 2.1rem;
}

.insp-hero__actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.insp-hero__actions .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  background: var(--hero-cta-ghost-bg, rgba(15, 23, 42, 0.1));
  border: 1px solid var(--hero-cta-ghost-border, rgba(248, 250, 252, 0.3));
  color: var(--hero-cta-ghost-text, #f8fafc);
}

.insp-hero__actions .btn.btn-primary {
  background: var(--hero-cta-secondary-bg, #e2e8f0);
  color: var(--hero-cta-secondary-text, #0f172a);
  border-color: transparent;
}

.insp-hero__actions .btn__icon {
  display: inline-flex;
  align-items: center;
}

.insp-hero__actions .btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.insp-hero__actions .btn.btn-secondary {
  background: var(--hero-cta-secondary-bg, #e2e8f0);
  color: var(--hero-cta-secondary-text, #0f172a);
}

.insp-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 0;
}

.insp-hero__stats div {
  background: var(--hero-stat-surface, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.insp-hero__stats dt {
  margin: 0 0 6px 0;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0f172a;
}

.insp-hero__stats dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
}

.insp-step-card,
.insp-panel {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.insp-step-card__header,
.insp-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}

.insp-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insp-section-title__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.insp-section-title__icon svg {
  width: 26px;
  height: 26px;
}

.insp-step-card__header h3,
.insp-panel__header h3 {
  margin: 0;
  color: #0f172a;
}

.insp-step-card p,
.insp-panel p {
  color: #475569;
  margin-top: 4px;
}

.insp-step-animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}

.insp-step-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.insp-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 12px;
}

.insp-signature-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.insp-signature-preview__img {
  max-width: 220px;
  max-height: 90px;
  border: 1px solid #d0d7e5;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
}

.insp-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #0f172a;
}

.insp-form input,
.insp-form textarea,
.insp-form select {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  width: 100%;
}

.insp-form textarea {
  min-height: 68px;
  resize: vertical;
}

.insp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.insp-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insp-panel--activity {
  padding: 0;
  position: sticky;
  top: 80px;
}

.insp-panel--activity .insp-panel__header {
  padding: 22px 22px 0 22px;
  margin-bottom: 0;
}

.insp-panel--activity .insp-panel__header + p,
.insp-panel--activity .insp-activity-list {
  padding: 0 22px 22px 22px;
}

.insp-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 260px;
  overflow: auto;
}

.insp-activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #eef2f8;
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}

.insp-activity__meta p {
  margin: 0;
}

.insp-activity__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 140px;
}

.insp-activity__actions .btn.btn-link {
  background: none;
  border: none;
  color: #2563eb;
  padding: 0;
}

.insp-wizard-modal__dialog {
  max-width: 820px;
}

.insp-wizard-header {
  align-items: flex-start;
}

.insp-wizard-step-label {
  margin: 0 0 4px 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.insp-history-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 960px) {
  .insp-history-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.insp-history-toolbar {
  grid-column: 1 / -1;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 18px 20px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.insp-history-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.insp-history-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 200px;
  min-width: 200px;
}

.insp-history-filter input,
.insp-history-filter select {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  width: 100%;
}

.insp-history-toolbar__meta {
  margin: 10px 0 0 0;
}

.insp-history-scroll {
  max-height: 55vh;
  overflow-y: auto;
  padding: 0 4px 4px 0;
  margin-top: 8px;
}

.insp-history-panel {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.insp-history-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}

.insp-history-table {
  width: 100%;
  border-collapse: collapse;
}

.insp-history-table th,
.insp-history-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #eef2f8;
}

.insp-history-table__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.insp-history-table tr[data-insp-link] {
  cursor: pointer;
}

.insp-history-table tr[data-insp-link]:hover {
  background: #f8fafc;
}

.insp-reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 6px;
}

.insp-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  background: rgba(99, 102, 241, 0.12);
  color: #4c1d95;
}

.insp-status--in_progress {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
}

.insp-status--scheduled {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.insp-status--completed {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.insp-status--cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.file-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-field > label {
  font-weight: 600;
  color: #0f172a;
}

.file-upload-card {
  border: 1px dashed #94a3b8;
  border-radius: 18px;
  background: #f8fafc;
  padding: 6px;
}

.file-upload-card input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-upload-card__action {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 12px 16px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.file-upload-card__action:hover,
.file-upload-card--has-value .file-upload-card__action {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.file-upload-card__icon {
  font-size: 1.4rem;
}

.file-upload-card__action strong {
  display: block;
  color: #0f172a;
}

.file-upload-card__action p {
  margin: 0;
  color: #475569;
  font-size: 0.85rem;
}

.insp-flash {
  margin-top: 8px;
}

.floorplan-repeater {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.floorplan-repeater__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.floorplan-card {
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.floorplan-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.floorplan-card__header h4 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.floorplan-card__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.floorplan-card__notes textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5f5;
  padding: 10px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
}

.floorplan-card__label-inputs {
  display: flex;
  gap: 8px;
}

.floorplan-card__label-inputs select,
.floorplan-card__label-inputs input {
  flex: 1;
}

.floorplan-repeater__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.floorplan-repeater__limit {
  font-size: 0.85rem;
  color: #475569;
}

/* Analytics page (app/Views/analytics/index.php) */
.analytics-tabs {
  margin: 18px auto 20px;
  display: inline-flex;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.22);
}

.analytics-banner {
  margin: 8px auto 22px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.8);
  background: rgba(248, 250, 252, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.analytics-banner--stripe {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.96));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.analytics-banner--stripe strong {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
  color: #1d4ed8;
}

.analytics-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: #4b5563;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analytics-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.analytics-tab__icon svg {
  width: 16px;
  height: 16px;
}

.analytics-tab.is-active {
  background: #0f172a;
  color: #f9fafb;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.25);
}

[data-analytics-tab-panel] {
  display: none;
}

[data-analytics-tab-panel].is-active {
  display: block;
}

.analytics-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    var(--hero-bg-start, #0f172a),
    var(--hero-bg-end, #2563eb)
  );
  background: linear-gradient(
    135deg,
    color-mix(
      in srgb,
      var(--hero-bg-start, #0f172a) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    ),
    color-mix(
      in srgb,
      var(--hero-bg-end, #2563eb) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    )
  );
  color: var(--hero-text, #ffffff);
}

.analytics-hero__copy h2 {
  margin: 0 0 10px 0;
  font-size: 2.1rem;
}

.analytics-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hero-eyebrow, #93c5fd);
}

.analytics-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.analytics-hero__actions .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  background: var(--hero-cta-ghost-bg, rgba(15, 23, 42, 0.1));
  border: 1px solid var(--hero-cta-ghost-border, rgba(248, 250, 252, 0.3));
  color: var(--hero-cta-ghost-text, #f8fafc);
}

.analytics-hero__actions .btn__icon {
  display: inline-flex;
  align-items: center;
}

.analytics-hero__actions .btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.analytics-hero__actions .btn.btn-secondary {
  background: var(--hero-cta-secondary-bg, #e2e8f0);
  color: var(--hero-cta-secondary-text, #0f172a);
}

.analytics-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.analytics-hero__stats div {
  background: var(--hero-stat-surface, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.analytics-hero__stats dt {
  margin: 0 0 4px 0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0f172a;
}

.analytics-hero__stats dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.analytics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-end;
}

.analytics-filters label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}

.analytics-filters select,
.analytics-filters input[type='text'] {
  min-width: 140px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
}

.analytics-filters .btn-small {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.analytics-panel {
  padding: 20px 24px;
}

.analytics-animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}

.analytics-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.analytics-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.analytics-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analytics-section-title__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.analytics-section-title__icon svg {
  width: 26px;
  height: 26px;
}

.analytics-headline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.analytics-headline-grid--overview {
  margin-top: 8px;
}

.analytics-headline-subtitle {
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
}

.analytics-kpi {
  padding: 6px 8px;
  border-radius: 10px;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analytics-kpi-grid--muted .analytics-kpi {
  background: #f9fafb;
}

.analytics-kpi__label {
  font-size: 0.75rem;
  color: #6b7280;
}

.analytics-kpi__value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.analytics-kpi__value--accent {
  color: #2563eb;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.analytics-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  background: #f9fafb;
}

.analytics-card--wide {
  grid-column: span 2;
}

.analytics-card h4 {
  margin: 0 0 8px 0;
}

.analytics-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analytics-list--compact li {
  font-size: 0.9rem;
}

.analytics-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-list span {
  color: #64748b;
}

.analytics-list strong {
  font-weight: 600;
}

.analytics-metric {
  margin: 0 0 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analytics-metric--trend {
  margin-bottom: 6px;
}

.analytics-metric strong {
  font-size: 1.4rem;
}

.analytics-metric__label {
  font-size: 0.9rem;
  color: #64748b;
}

.analytics-passfail-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.analytics-passfail-bar__segment {
  height: 100%;
}

.analytics-passfail-bar__segment--pass {
  background: rgba(22, 163, 74, 0.9);
}

.analytics-passfail-bar__segment--fail {
  background: rgba(239, 68, 68, 0.9);
}

.analytics-passfail-legend {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #475569;
}

.analytics-severity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.analytics-severity-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  background: #f9fafb;
}

.analytics-severity-card[data-level='high'] {
  border-color: rgba(239, 68, 68, 0.5);
  background: #fef2f2;
}

.analytics-severity-card[data-level='medium'] {
  border-color: rgba(245, 158, 11, 0.5);
  background: #fffbeb;
}

.analytics-severity-card[data-level='low'] {
  border-color: rgba(34, 197, 94, 0.4);
  background: #f0fdf4;
}

.analytics-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.analytics-trend-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 14px 16px 16px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out, border-color 180ms ease-out, background 180ms ease-out;
}

.analytics-trend-card--inspections {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.06), transparent 55%), #ffffff;
  border-color: rgba(59, 130, 246, 0.16);
}

.analytics-trend-card--remedials {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.06), transparent 55%), #ffffff;
  border-color: rgba(34, 197, 94, 0.18);
}

.analytics-trend-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
}

.analytics-trend-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.analytics-trend-card__header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.analytics-trend-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.analytics-sparkline {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #f9fafb;
  padding: 4px 6px;
  border: 1px solid #e2e8f0;
}

.analytics-sparkline polyline {
  fill: none;
  stroke: #6366f1;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-failure-list {
  margin-top: 8px;
}

.analytics-failure-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
}

.analytics-failure-row__label {
  flex: 1 1 auto;
}

.analytics-failure-row__meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.85rem;
}

.analytics-failure-row__count {
  font-weight: 600;
}

.analytics-failure-row__percent {
  color: #64748b;
}

.analytics-failure-row__severity {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 600;
}

.analytics-failure-row:hover {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}

.analytics-failure-scroll {
  max-height: 260px;
  overflow-y: auto;
}

.analytics-geo-list {
  margin-top: 8px;
}

.analytics-geo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
}

.analytics-geo-row__label {
  flex: 1 1 auto;
}

.analytics-geo-row__meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.85rem;
}

.analytics-geo-row__value {
  white-space: nowrap;
}

.analytics-geo-row__badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 600;
}

.analytics-geo-row:hover {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}

.analytics-activity {
  margin-top: 4px;
}

.analytics-activity-scroll {
  margin-top: 2px;
  max-height: 260px;
  overflow-y: auto;
}

.analytics-activity-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-activity-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
}

.analytics-activity-item:last-child {
  border-bottom: none;
}

.analytics-activity-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.analytics-activity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.analytics-activity-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.analytics-activity-context {
  margin: 0;
}

.analytics-activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.analytics-activity-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
  background: #e5e7eb;
}

.analytics-activity-pill--inspection {
  background: #eef2ff;
  color: #4338ca;
}

.analytics-activity-pill--quote {
  background: #ecfeff;
  color: #0891b2;
}

.analytics-activity-pill--invoice {
  background: #fef9c3;
  color: #92400e;
}

.analytics-activity-pill--fire_door_quote {
  background: #f5f3ff;
  color: #6d28d9;
}

.analytics-activity-pill--pre_booking {
  background: #f0fdf4;
  color: #15803d;
}

.analytics-activity-pill--other {
  background: #e5e7eb;
  color: #374151;
}

.analytics-collapse {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  background: #f9fafb;
}

.analytics-collapse > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.analytics-collapse > summary::-webkit-details-marker {
  display: none;
}

.analytics-trend-meta {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #64748b;
}

.analytics-trend-meta > div {
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.analytics-trend-meta__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.analytics-trend-meta__value {
  font-weight: 600;
  color: #111827;
}

.analytics-email-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.analytics-email-preview__panel {
  display: none;
}

.analytics-email-preview__panel.is-active {
  display: block;
}

.analytics-email-preview__iframe {
  width: 100%;
  height: min(70vh, 720px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
}

.analytics-email-preview__text {
  width: 100%;
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.analytics-inspector-row {
  cursor: pointer;
}

.analytics-inspector-row:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* Fire doors configurator page (app/Views/fire_doors/index.php) */
.fd-hero {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    var(--hero-bg-start, #0f172a),
    var(--hero-bg-end, #2563eb)
  );
  background: linear-gradient(
    135deg,
    color-mix(
      in srgb,
      var(--hero-bg-start, #0f172a) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    ),
    color-mix(
      in srgb,
      var(--hero-bg-end, #2563eb) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    )
  );
  color: var(--hero-text, #ffffff);
}

.fd-hero h2 {
  margin: 0 0 8px 0;
  font-size: 2rem;
}

.fd-hero .text-muted {
  color: var(--hero-text-muted, rgba(226, 232, 240, 0.9));
}

.fd-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--hero-eyebrow, #93c5fd);
  margin: 0 0 6px 0;
}

.fd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.fire-doors-page .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fire-doors-page .btn__icon {
  display: inline-flex;
  align-items: center;
}

.fire-doors-page .btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.fd-hero-actions .btn-icon {
  font-weight: 600;
  background: var(--hero-cta-ghost-bg, rgba(15, 23, 42, 0.12));
  border: 1px solid var(--hero-cta-ghost-border, rgba(248, 250, 252, 0.3));
  color: var(--hero-cta-ghost-text, #f8fafc);
}

.fire-doors-page .btn.btn-secondary {
  background: var(--hero-cta-secondary-bg, #e2e8f0);
  color: var(--hero-cta-secondary-text, #0f172a);
}

.fd-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 0;
}

.fd-hero-stats div {
  background: var(--hero-stat-surface, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.fd-hero-stats dt {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  color: #0f172a;
}

.fd-hero-stats dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.fd-layout {
  margin-top: 24px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
}

.fd-config-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fd-step-card {
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.fd-step-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}

.fd-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fd-section-title__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.fd-section-title__icon svg {
  width: 26px;
  height: 26px;
}

.fd-step-card__header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

.fd-step-card__header p {
  margin: 4px 0 0 0;
  color: #475569;
  font-size: 0.92rem;
}

.fd-accordion {
  padding: 0;
}

.fd-accordion__header {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 20px;
  border-radius: 22px;
  text-align: left;
  cursor: pointer;
}

.fd-accordion__header:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.fd-accordion__body {
  border-top: 1px solid #e2e8f0;
  padding: 16px 20px 20px 20px;
}

.fd-accordion__body[hidden] {
  display: none !important;
}

.fd-accordion__chevron {
  margin-left: auto;
  font-size: 0.9rem;
  transform: rotate(0deg);
  transition: transform 0.18s ease-out;
}

[data-fd-accordion-open] .fd-accordion__chevron {
  transform: rotate(180deg);
}

.fd-size-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 12px;
}

.fd-presets-card {
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.03), rgba(37, 99, 235, 0.06));
}

.fd-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fd-preset {
  border: 1px solid #cbd5f5;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  min-width: 180px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fd-preset__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fd-preset__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.fd-preset__reason {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

.preset-card__headline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.fd-preset strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.fd-preset > span:not(.fd-preset__heading) {
  font-size: 0.8rem;
  color: #475569;
}

.fd-preset.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.fd-preset--ghost {
  border-style: dashed;
  border-color: rgba(15, 23, 42, 0.3);
  background: rgba(15, 23, 42, 0.04);
  flex: 1 1 auto;
  min-width: 220px;
  text-align: left;
}

.fd-size-grid label,
.fd-note-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #0f172a;
}

.preset-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cbd5f5;
  border-radius: 999px;
  padding: 6px 14px;
  background: #eff6ff;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.preset-banner__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.preset-banner__label {
  font-weight: 600;
  color: #1d4ed8;
}

.preset-banner__action {
  border: none;
  background: transparent;
  color: #1f2937;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
}

.fd-presets-actions {
  margin: 10px 0 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #b91c1c;
}

.field-error.is-visible {
  display: block;
}

.fd-panel label.is-invalid > input,
.fd-panel label.is-invalid > textarea {
  border-color: rgba(185, 28, 28, 0.8);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.basket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px 0;
}

.basket-inline-fields {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  margin-top: 8px;
}

.basket-inline-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: #475569;
}

.basket-inline-fields input,
.basket-inline-fields textarea {
  border: 1px solid #d0d7e5;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.basket-inline-fields textarea {
  resize: vertical;
  min-height: 42px;
}

.fd-summary-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fire-doors-page .fd-panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fd-size-grid input,
.fd-note-field textarea {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.fd-note-field textarea {
  resize: vertical;
  min-height: 70px;
}

.fd-option-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.config-section {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #475569;
  margin: 0 0 4px 0;
}

.config-description {
  color: #475569;
  font-size: 0.88rem;
  margin: 0;
}

.config-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.config-info {
  border: none;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.config-info:hover {
  background: rgba(37, 99, 235, 0.2);
}

.config-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-options--scrollable {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.config-options--scrollable::-webkit-scrollbar {
  width: 6px;
}

.config-options--scrollable::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

.config-option {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  min-width: 120px;
  flex: 1 1 130px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.config-options--scrollable .config-option {
  flex: 1 1 auto;
}

.config-option[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.config-option strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.config-option span {
  color: #475569;
  font-size: 0.78rem;
}

.option-price {
  font-weight: 600;
  color: #0f172a;
}

.option-price--included {
  font-weight: 500;
  color: #16a34a;
}

.config-option.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 16px 26px rgba(37, 99, 235, 0.18);
}

.config-note {
  font-size: 0.82rem;
  color: #475569;
  margin: 4px 0 0 0;
}

.fd-ral-panel__row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.fd-ral-panel__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fd-ral-panel__field--code {
  min-width: 180px;
}

.fd-ral-panel__input {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  background: #fff;
  width: 100%;
}

.fd-ral-panel__swatch {
  width: 56px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  background: #fff;
}

.fd-ral-panel__help {
  display: block;
  margin-top: 8px;
}

.fd-workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fd-panel {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.fd-animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}

.fd-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fd-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.fd-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.fd-panel-header p {
  margin: 4px 0 0 0;
  color: #475569;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.summary-grid div {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 0.85rem;
  color: #334155;
}

.summary-grid div strong {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
}

.fd-summary-panel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fd-blueprint {
  flex: 1 1 40%;
  border-radius: 16px;
  border: 1px solid #d0d7e5;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 55%), #f8fafc;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.fd-blueprint::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(37, 99, 235, 0.25);
  border-radius: 12px;
}

.fd-blueprint::before {
  content: '';
  position: absolute;
  inset: 28px;
  border-radius: 6px;
  border: 2px solid rgba(37, 99, 235, 0.45);
}

.fd-blueprint span {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 600;
}

.fd-blueprint__rating {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1d4ed8;
}

.fd-blueprint__dimensions {
  font-size: 0.8rem;
  color: #475569;
}

.fd-blueprint__hinge {
  font-size: 0.78rem;
  color: #94a3b8;
}

.summary-total {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #475569;
}

.summary-total strong {
  font-size: 1.6rem;
  color: #0f172a;
}

.summary-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fire-doors-page .btn.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
}

.fire-doors-page .btn.btn-link.fd-action-subtle {
  color: #64748b;
  font-weight: 500;
  font-size: 0.85rem;
}

.fire-doors-page .btn.btn-link.fd-action-subtle.fd-action-subtle--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fire-doors-page .fd-action-subtle__icon {
  font-size: 0.95em;
  opacity: 0.75;
}

.fire-doors-page .text-muted {
  color: #475569;
}

.basket-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.basket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.basket-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
}

.basket-toggle__meta {
  font-size: 0.82rem;
  color: #475569;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basket-toggle__chevron {
  font-size: 0.9rem;
  color: #64748b;
  flex: 0 0 auto;
}

.basket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.basket-inline-fields--compact {
  grid-template-columns: 110px;
  max-width: 140px;
  margin-top: 10px;
}

.basket-details {
  margin-top: 8px;
}

.fd-review {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.fd-review-door + .fd-review-door {
  border-top: 1px solid #e2e8f0;
  margin-top: 10px;
  padding-top: 10px;
}

.fd-review-door__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.fd-review-door__meta {
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
}

.fd-review-list {
  margin: 10px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 14px;
}

.fd-review-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.fd-review-check {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
  margin-top: 2px;
}

.fd-review-item.is-missing .fd-review-check {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.fd-review-item.is-missing .fd-review-value {
  color: #b45309;
  font-weight: 650;
}

.fd-review-label {
  color: #0f172a;
  font-weight: 650;
}

.fd-review-value {
  color: #475569;
}

.basket-item.is-editing {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.fd-panel textarea,
.fd-panel input,
.fd-panel select {
  border: 1px solid #d0d7e5;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  width: 100%;
  background: #fff;
}

.fd-panel textarea[readonly] {
  background: #f8fafc;
  min-height: 150px;
}

.fd-form-section + .fd-form-section {
  margin-top: 20px;
}

.fd-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fd-form-grid--stacked {
  grid-template-columns: 1fr;
}

.fd-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #0f172a;
}

.fd-form-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.fd-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.fd-pricing-grid div {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
}

.fd-pricing-grid dt {
  margin: 0 0 4px 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
}

.fd-pricing-grid dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.fd-pill {
  border: 1px solid #d0d7e5;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #475569;
}

.fd-flash {
  margin: 16px 0;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

[data-firedoor-pricing-modal] .modal__dialog {
  max-width: 760px;
}

.fd-pricing-modal-footer {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.fd-pricing-modal-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.modal__list {
  padding-left: 0;
  margin: 10px 0 0 0;
  list-style: none;
}

.modal__list li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}

.modal__list li strong {
  display: block;
  margin: 0;
}

.modal__list li div span {
  display: block;
  font-size: 0.85rem;
  color: #475569;
}

.modal__list--profiles li {
  justify-content: flex-start;
}

.info-callouts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.info-callout {
  display: flex;
  gap: 12px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbff;
  align-items: center;
}

.info-callout__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.info-callout strong {
  margin: 0;
  color: #0f172a;
}

.info-callout p {
  margin: 2px 0 0 0;
  color: #475569;
  font-size: 0.88rem;
}

.preset-modal-heading {
  margin: 18px 0 6px 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.preset-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.preset-card {
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fbff;
  min-height: 140px;
}

.preset-card__copy strong {
  font-size: 1rem;
  margin: 0;
  display: block;
  color: #0f172a;
}

.preset-card__copy p {
  margin: 4px 0 0 0;
  font-size: 0.88rem;
  color: #475569;
}

.preset-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-tag {
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
}

.preset-card__actions {
  margin-top: auto;
}

.architrave-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #cbd5f5;
  background-color: #e2e8f0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.architrave-icon--chamfered {
  background-image: url("../images/fire-doors/architrave/chamfered.png");
}

.architrave-icon--ogee {
  background-image: url("../images/fire-doors/architrave/ogee.png");
}

.architrave-icon--torus {
  background-image: url("../images/fire-doors/architrave/torus.png");
}

.architrave-icon--ovolo {
  background-image: url("../images/fire-doors/architrave/ovolo.png");
}

.architrave-icon--bullnose {
  background-image: url("../images/fire-doors/architrave/bullnose.png");
}

.architrave-profile-tabs {
  margin-top: 12px;
}

.architrave-profile-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.architrave-profile-tab {
  appearance: none;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #0f172a;
  font-size: 0.85rem;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.architrave-profile-tab:active {
  transform: translateY(1px);
}

.architrave-profile-tab.is-active {
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.architrave-profile-tab .architrave-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border-color: rgba(203, 213, 245, 0.9);
}

.architrave-profile-panel {
  margin-top: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

.architrave-profile-panel h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.architrave-profile-panel p {
  margin: 0 0 10px 0;
  color: #475569;
  font-size: 0.88rem;
}

.architrave-profile-panel figure {
  margin: 0;
}

.architrave-profile-panel img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #f8fafc;
}

.architrave-profile-panel.is-missing img {
  display: none;
}

.architrave-profile-image-fallback {
  display: none;
  border-radius: 14px;
  border: 1px dashed rgba(226, 232, 240, 0.95);
  background: #f8fafc;
  padding: 14px;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.architrave-profile-panel.is-missing .architrave-profile-image-fallback {
  display: block;
}

.fd-preview-layout {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.fd-preview-copy {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fd-preview-note {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.floating-door-preview {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(240px, calc(100% - 48px));
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(37, 99, 235, 0.8));
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  z-index: 80;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.floating-door-preview.is-collapsed {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

.floating-door-preview.expanded {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  max-height: none;
  z-index: 200;
}

.floating-door-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: transparent;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-header strong {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(248, 250, 252, 0.85);
}

.fd-preview-toggle-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--brand, #e6561e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  z-index: 90;
}

.fd-preview-toggle-fab__icon {
  font-size: 1.2rem;
}

/*
 * Dark mode support
 *
 * Adapt the core colour palette when users prefer a dark interface. By changing
 * the base colour variables we automatically update backgrounds, text and
 * component surfaces across the application without duplicating rules. The
 * neutral navy and slate tones help preserve contrast and readability on
 * low‑light displays while aligning with the overall brand aesthetic.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0c0f1a;
    --card: #18223d;
    --text: #e4e9f4;
    --border: #2b3a5d;
    --surface-muted: #1a2340;
  }
}
